Mick, did you run the code yourself (if so, could you explain how) or did you run it off my website?
Thanks | [reply] |
Well, if you are able, run the script from the command line. If your program fails to compile, that may be the problem.
Quick checklist:
- Correct permissions.
- Correct shebang line
- In the correct directory?
- Is a particular extension required (i.e., do you have myprog.pl instead of myprog.cgi)?
Another thing to do (in test only, don't use this for production), is to add the following line to the script:
use CGI::Carp qw(fatalsToBrowser);
If your script actually gets as far as compiling and the program tries to run, this will output the error messages to your browser, which aids debugging. Make sure that you take this out when you move the code to production as there is no sense in giving hackers additional information.
From what you are describing, it sounds like the problem is not with your code, but with the configuration. You have your code in the wrong place or something.
Is there any chance that you made corrections to your code that you forgot to upload to the server? | [reply] [d/l] |
Ovid, when I added the line
use CGI::Carp qw(fatalsToBrowser);
I got an error: Software error:
Can't locate object method "new" via package "CGI" at .......
So I presume that the program is compiling. And when I run it from the command line it's all good. Thanks a lot for helping a very bad perl programmer.
| [reply] [d/l] |
I ran it (without any modifications) on my intranet webserver. It's an HP-UX running Netscape Suitespot server, if that helps. :-)
Mick
| [reply] |