This is a discussion on imagejpeg generating string not image even with header("Content-type:image/jpeg") within the PHP Language forums, part of the PHP Programming Forums category; Jerry Stuckle wrote: > cman wrote: > > you can access it at: > > www.marketopp.com/test.php &...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Jerry Stuckle wrote:
> cman wrote: > > you can access it at: > > www.marketopp.com/test.php > > > > the thing is i don't get any errors the source only contains 'ÿØÿà' > > > > OK, here's the header I get from your page: > > > HTTP/1.x 200 OK > Date: Fri, 03 Mar 2006 03:36:23 GMT > Server: Apache > X-Powered-By: ModLayout/3.2.1 > Cache-Control: no-cache > Keep-Alive: timeout=15, max=98 > Connection: Keep-Alive > Transfer-Encoding: chunked > Content-Type: text/html > > Note the content-type. > > Either you have something causing the headers to be sent prematurely > (i.e. even a blank line or a space before the first '<') or you're > getting an error somewhere and not telling us. > > What does phpinfo() show about error reporting? > > -- > ================== > Remove the "x" from my email address > Jerry Stuckle > JDS Computer Training Corp. > jstucklex@attglobal.net > ================== > X-Powered-By: ModLayout/3.2.1 Could it possibly be this: http://tangent.org/index.pl?lastnode_id=41&node_id=449 It sounds like ModLayout may be sending premature headers. Can you disable this in your apache config and test? > Copied from a forum on this page : http://gallery.menalto.com/node/21768 FAQ entry: Apache ModLayout If you use mod_layout with Apache, make sure it is disabled for gallery files. Gallery sometimes sends binary data back from a php file, so adding a header or footer to these requests will corrupt the data! After adding the following lines to your apache config, it should work: ---------------------------------------------------- # Disable layout header and footer for Gallery2 LayoutIgnoreHeaderURI /path/to/gallery2/*.* LayoutIgnoreFooterURI /path/to/gallery2/*.* # PHP Gallery2 overide Layout <Directory /path/to/gallery2/> LayoutHeaderOff LayoutFooterOff </Directory> - JS http://www.endeavorpub.com/ |
|
|||
|
PROBLEM SOLVED!
Thanks guys for all your help to get to the bottom of it. The problem was in fact because of APACHE MODLAYOUT which corrupted the outputed image by redisplaying the page as text. cheers! -ca |