Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: GD newbee question

by matthewb (Curate)
on Nov 02, 2003 at 01:45 UTC ( [id://303885]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to GD newbee question

As Mr. Muskrat suggests, this is more to do with your appreciation of web server layout and permissions than Perl. If I run your script right here and then tail the error.log, I get:
[Sun Nov 2 06:36:56 2003] [error] [client 127.0.0.1] file permissions + deny server execution: /usr/lib/cgi-bin/image.png
If, however, I modify the open line to write a file in the document root and, in the HTML section, change the img src to look like this:
<img src="/image.png" alt="a red circle" />
...I get a red circle, which I guess is what you are after.

MB

Replies are listed 'Best First'.
Re: Re: GD newbee question
by Plankton (Vicar) on Nov 03, 2003 at 10:51 UTC
    Ah! Thanks!
    I changed these lines ...
    open( FH, '>image.png' ) or die "Can't image.png:$!\n"; . . . <img src='image.png'>
    ... to ...
    open( FH, '>../public_html/image.png' ) or die "Can't image.png:$!\n"; . . . <img src='/image.png'>
    ... and now it works! Thanks.

    Plankton: 1% Evil, 99% Hot Gas.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://303885]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.