http://www.perlmonks.org?node_id=152814


in reply to Re: Re: Flat File Database & GD::Graph (REVISITED)
in thread Flat File Database & GD::Graph (REVISITED)

Hi Tim,

Thanks for your help! When I tried it it still gave me a 500 error. I checked the code again for another hour and noticed that you commented out the:
# I don't know where you want this, but putting it # in the png doesn't seem to work :-P #print $q->header( -type => "image/png", -expires => "-1d" );
When I uncommented it, it worked fine! What was your reasoning as to why this is not needed? When I initially started this project, I took the bare sample from the CGI programming book (mouse book). It had that line of code in there so I just left it there.
Slowly but surely, I'll get down Perl like the rest of you cool cats! Thank you everyone who contributed. I've gain tons of wisdom from your help. :)
I'm always learning. http://www.zen-designs.com

Replies are listed 'Best First'.
Re: Re: Re: Re: Flat File Database & GD::Graph (REVISITED)
by tfrayner (Curate) on Mar 19, 2002 at 19:11 UTC
    Hi,

    I think I was misinterpreting what was to be returned by your code. I assumed it was to be a bare png file, and by examining an example of my own determined that the header was not needed. If this code snippet is used in the shell, you get just the png file. I must confess that I have no experience with CGI, and did not spot that the header might be required. Ah well, glad I could help anyway :-)

    Tim