Re: [PHP] TIFF display problem...
Are you certain there are no other characters being sent (introduced by the addition) in the 'body' beside the image? Will you get any output (characters and all) if you request the image file directly - without embedding it into a page using img src or whatever? While I have used only the supported by default images like jpg, png and the like, that always turned out to be the problem for me ... Richard -Original Message- Sent: Monday, June 21, 2004, 9:43:19 PM Hi All, I've run into a jam.. I have the follow PHP script: ? header(Content-type: image/tiff); $_GET['id'] = str_replace( ., , $_GET['id'] ); $_GET['id'] = str_replace( /, , $_GET['id'] ); $blah = /usr/local/apache/chm-images/ . $_GET['id'] . .A; readfile( $blah ); ? This works just fine... When I add... session_start(); if ( !$_SESSION['user_id'] ) { exit(); } ...to it, the image does not display. What I need to do is read in images from a secured directory and display it on the page. I was using JPGs before and now need to display TIFF files. We have the plugins for IE all setup. Could someone tell me how I could fix this? I'm at a complete loss... -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TIFF display problem...
Argh, I see your problem was already solved (answers haven't been listed as one thread, so I missed em). Oh well. -Original Message- Sent: Thursday, June 24, 2004, 11:58:15 AM Are you certain there are no other characters being sent (introduced by the addition) in the 'body' beside the image? Will you get any output (characters and all) if you request the image file directly - without embedding it into a page using img src or whatever? While I have used only the supported by default images like jpg, png and the like, that always turned out to be the problem for me ... Richard -Original Message- Sent: Monday, June 21, 2004, 9:43:19 PM Hi All, I've run into a jam.. I have the follow PHP script: ? header(Content-type: image/tiff); $_GET['id'] = str_replace( ., , $_GET['id'] ); $_GET['id'] = str_replace( /, , $_GET['id'] ); $blah = /usr/local/apache/chm-images/ . $_GET['id'] . .A; readfile( $blah ); ? This works just fine... When I add... session_start(); if ( !$_SESSION['user_id'] ) { exit(); } ...to it, the image does not display. What I need to do is read in images from a secured directory and display it on the page. I was using JPGs before and now need to display TIFF files. We have the plugins for IE all setup. Could someone tell me how I could fix this? I'm at a complete loss... -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] TIFF display problem...
Hi All, I've run into a jam.. I have the follow PHP script: ? header(Content-type: image/tiff); $_GET['id'] = str_replace( ., , $_GET['id'] ); $_GET['id'] = str_replace( /, , $_GET['id'] ); $blah = /usr/local/apache/chm-images/ . $_GET['id'] . .A; readfile( $blah ); ? This works just fine... When I add... session_start(); if ( !$_SESSION['user_id'] ) { exit(); } ...to it, the image does not display. What I need to do is read in images from a secured directory and display it on the page. I was using JPGs before and now need to display TIFF files. We have the plugins for IE all setup. Could someone tell me how I could fix this? I'm at a complete loss... -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TIFF display problem...
[snip] session_start(); if ( !$_SESSION['user_id'] ) { exit(); } [/snip] Are you sure you are getting past the if ( !$_SESSION['user_id'] ) condition? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
Hi, Yeah, positive, I should probably clarify more. session_start(); is what causes it not to display, and gives me the error. The error is that the site cannot download the file. -Dan Joseph -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 3:57 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] TIFF display problem... [snip] session_start(); if ( !$_SESSION['user_id'] ) { exit(); } [/snip] Are you sure you are getting past the if ( !$_SESSION['user_id'] ) condition? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
[snip] Yeah, positive, I should probably clarify more. session_start(); is what causes it not to display, and gives me the error. The error is that the site cannot download the file. [/snip] I dont know much about the plugins to view the tiff's, but maybe some of the http headers that session_start puts out are messing it up. That is just a guess though. You could try to turn off the headers that are coming from session_start -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
Hi, The only problem with turning them off is I need the page to be secured. My only option is session tracking. -Dan Joseph -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 4:42 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] TIFF display problem... [snip] Yeah, positive, I should probably clarify more. session_start(); is what causes it not to display, and gives me the error. The error is that the site cannot download the file. [/snip] I dont know much about the plugins to view the tiff's, but maybe some of the http headers that session_start puts out are messing it up. That is just a guess though. You could try to turn off the headers that are coming from session_start -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TIFF display problem...
Do you want... if ( !isset($_SESSION['user_id']) ) [snip] session_start(); if ( !$_SESSION['user_id'] ) { exit(); } [/snip] Are you sure you are getting past the if ( !$_SESSION['user_id'] ) condition? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
Hi, that probably would work better, however, the if control isn't what's fouling it up. I can omit that and leave session_start() in there, and its fouled up. Session_start() is the culprit. -Dan Joseph -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 4:47 PM To: Matt Matijevich Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] TIFF display problem... Do you want... if ( !isset($_SESSION['user_id']) ) [snip] session_start(); if ( !$_SESSION['user_id'] ) { exit(); } [/snip] Are you sure you are getting past the if ( !$_SESSION['user_id'] ) condition? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
Do you have a temp directory setup for your session variables? Hi, that probably would work better, however, the if control isn't what's fouling it up. I can omit that and leave session_start() in there, and its fouled up. Session_start() is the culprit. -Dan Joseph -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 4:47 PM To: Matt Matijevich Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] TIFF display problem... Do you want... if ( !isset($_SESSION['user_id']) ) [snip] session_start(); if ( !$_SESSION['user_id'] ) { exit(); } [/snip] Are you sure you are getting past the if ( !$_SESSION['user_id'] ) condition? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
[snip] The only problem with turning them off is I need the page to be secured. My only option is session tracking. [/snip] session management does not require that these headers be sent to the browser to work. Try turning off the cache-control headers. The cookie and the headers are the only thing different to the browser (that I know of) when session_start() is in your file, so I think that might be what is messing up the display. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] TIFF display problem...
Hey Matt, That was the trick, thanks.. I passed that function... what is it... session limit cache something or another. Worked like a charm! Thanks much! -Dan Joseph -Original Message- From: Matt Matijevich [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 5:02 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] TIFF display problem... [snip] The only problem with turning them off is I need the page to be secured. My only option is session tracking. [/snip] session management does not require that these headers be sent to the browser to work. Try turning off the cache-control headers. The cookie and the headers are the only thing different to the browser (that I know of) when session_start() is in your file, so I think that might be what is messing up the display. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php