Odd,  I have the ability to load an image URL and right-click anywhere in
the browser page that is not part of the image and get a popup menu with
'View Source'.  Of course I run Firefox.  You need to see the response that
you are getting at your URL.  You can use a variety of methods to do this.
if you have curl or wget on your machine you could try those.  You may also
have something in your server log files.

From past experience, I usually get this message when PHP emits a warning
before my image is output.  So, your browser expects data that will be GIF
and you send it some text then a GIF.

Fast test, change the content-type header to 'text/plain' and you'll get the
output in your browser.

Lee

On 12/26/06, Don Reeves <[EMAIL PROTECTED]> wrote:

I have actually tried to 'view source' but the option is not available
when I am viewing this page.

----- Original Message ----
From: Lee Saferite <[EMAIL PROTECTED]>
To: Don Reeves <[EMAIL PROTECTED]>; Zend Framework General <
fw-general@lists.zend.com>
Sent: Tuesday, December 26, 2006 8:17:56 AM
Subject: Re: [fw-general] dynamic image generation

Generally, in firefox, you can 'view source' and get the actual error
message the server sent.

Send us that error please.

Lee

On 12/25/06, Don Reeves <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am new to the Zend Framework but am very happy with what I have seen
> so far.  I have decided to try integrating the framework into an application
> that I wrote previously.  Things have been going smoothly except for some
> scripts that I have written to handle dynamically displaying  images.  These
> images are charts that I use in the application.  Here is a script that I
> have converted into a controller in my application.  I access it from a url
> in the following manner:
>
> http://localhost/chart/index/dir/dir123/file/chart123.gif
>
> The controller is pretty basic at the moment:
>
> class ChartController extends Zend_Controller_Action
> {
>   function indexAction()
>   {
>     $runDir = $this->_getParam('dir');
>     $file = $this->_getParam('file');
>
>     header("Content-type: image/gif");
>
>     $image = imagecreatefromgif(RUNS_DIR . '/' . $runDir . '/' . $file);
>
>     imagegif($image);
>     imagedestroy($image);
>   }
> }
>
> An almost identical script allowed me to generate the gif images
> previously.  I have also confirmed that the image referenced in
> imagecreatefromgif is referencing a valid gif file.
>
> When I access the url 
http://localhost/chart/index/dir/dir123/file/chart123.gif
> , I get the following message:
>
> "The image "http://localhost/chart/index/dir/dir123/file/chart123.gif "
> cannot be displayed, because it contains errors."
>
> I am curious if there is anything about the Zend Framework that prevents
> this image from displaying correctly.  I was wondering if it had to do with
> how I am setting my header but examining the header using Tamper Data for
> Firefox, the headers seem to be getting set correctly.  Can anyone see a
> problem with my implementation that needs to change to generate images
> dynamically within the ZF?
>
> Thanks for the help.
>
> D
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Reply via email to