Re: bargraph gd not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oooop!

Hit Send too soon.

After you put the header BACK IN, the image should work, except some
versions of IE are so badly-broken that they've cached the fact that that
URL is text, not an image, and will refuse to display it as an image, and
will dump out the image contents to the browser.

Quit IE completely (all windows) and re-start IE to fix that.  Or just use
Netscape/Firefox/Mozilla/whatever to fix it once and for all. :-)

jm wrote:
> Hi guys:
> I'm using php5 on winxp with IIS. I'm trying to run a simple bar graph
> demo
> found it on phpbuilder site. When I run it I get nothing but an x in the
> top
> left corner of my web page(no errors nothing).
> GD is uncommented in my php.ini, ext dir set and I have verified that GD
> is
> installed through php -m,phpinfo() , and gd_info(). Can anyone offer me
> some
> advice on how to troubleshoot this problem.
> I searched google, and did see other posts like mine but no solutions. Any
> thoughts or suggestions would be appreciated

Comment out the header("Content-type: ...") line in your script.

Then surf directly to the image:
http://example.com/bargraph.php

You should then be able to read the error messages PHP is probably
printing instead of an image.

The browser isn't smart enough to tell that that PHP error message isn't
supposed to be an image at all, and tries to interpret it as an image. 
Oddly enough, it never quite works, eh? :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux