You are here: Re: imagejpeg generating string not image even with header("Content-type:image/jpeg") « PHP Programming Language « IT news, forums, messages
Re: imagejpeg generating string not image even with header("Content-type:image/jpeg")

Posted by jshanman on 10/09/91 11:41

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация