I have an unusual problem in which I have been unable to figure out. On my website, in the HTML I have an image tag which loads an image from a PHP page. This image loads in the browser, and then is replaced by a broken link placeholder. It does this on every browser.
If I browse to the image it displays just fine. It’s just when I load it into a page that it breaks.
Firebug gives me this error:
Image corrupt or truncated: <image_url>
<img src="ajax.php?action=chart&chart=projectCompletion" title="Click to view tabular data." />
The ajax page grabs the data, and then sends it to Google’s Charting API to be charted. I use header(‘content-type: image/png’) and then output the image given back by Google using fpassthru(fopen()).
This has worked fine for me for over a year. I recently moved to a new server and am currently porting my code to work on it. This was the first page I got working. I had another project which took priority and when I came back to this, it is no longer working. I’ve bashed my head out for two days trying to figure it out. Any ideas would be appreciated. Thanks!