Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: GD newbee question

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


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 15: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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-19 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found