Re: [MacPerl] GD.pm How to call images created on the fly.
[email protected] Sat, 7 Apr 2001 06:15:14 +0900
| Newsgroups | perl.macperl.webcgi |
|---|---|
| Message-ID | <v04011708b6f3d8c7b78f@[211.19.93.153]> |
Hi Lucia it's not clear from your posting if this script runs from the command line on the server or not - if you have shell access on the server try running the script from there, make sure you have the various warning pragma set '-w' use strict; use diagnostics; which might highlight what's happening. If you don't have direct access to the system, put this at the top of your script: use CGI::Carp qw(fatalsToBrowser); which will redirect any error messages to the browser - don't forget to take this out once you've eliminated the bug, or later you may have some surprised and puzzled users if something breaks and the cgi begins spitting out errors, and also the errors won't show up on the server error log. >I then tried to invoke the script by pointing my browser to the URL >.../cgi-bin/stein_png.pl the '.pl' postfix might be the cause of your troubles depending on the set up of the server. Some admins are wary of giving Mr Wil. E. Hacker a way to access system commands with the same permissions as the user account it is run from and force their users to postfix CGI's with a '.cgi' so that any potential attacks can be kept in the user account's domain. So basically change the '.pl' to '.cgi' - if this doesn't work a generic cgi troubleshooting list is: 1) Line endings - if you move the script between 2 OSs make sure the line endings have been changed accordingly 2) the shebang line (starts with '#!') - make sure the path to the perl interpreter is correct 3) file permissions - make sure the script has the correct permissions set (0755) Technical glitches aside, nobody will be able to help you the script itself if they can't see the source code, so if you've already done all of the stuff above and the script's still not working post it to the list - get into the habit of posting scripts anyway One final thing - as your posting is more CGI than Perl you should really send queries here: [email protected] HTH Robin