|
Edit: Re-reading your post I figured you probably know a bit about this stuff anyway, so I'd skip numbers 1, 3 and probably 4, but I'll leave them in incase their of use to anyone else.
Couldn't get Dave's web site link to load, so a few hints for anyone hitting CGI problems:
1) In your FTP software, the file should be listed with permissions rwx-xr-r and if not, chmod the file with the value 755
2) Just after the line that looks something like #!/usr/bin/perl put the following code:
[code:1:d70c4e6b8a]use CGI::Carp qw(fatalsToBrowser);[/code:1:d70c4e6b8a]
That'll hopefully give you a more friendly error message.
3) If that doesn't work, you may need to change your shebang line which looks something like: [code:1:d70c4e6b8a]#!/usr/bin/perl[/code:1:d70c4e6b8a]
Ask your hosts tech support what that should say although from my experience that one generally works.
This must be the first line with no line breaks or spaces above it!
4) Before you print anything to the screen you need to put a line such as:
[code:1:d70c4e6b8a]print "Content-type: text/html\n\n";[/code:1:d70c4e6b8a]
I used to put that somewhere near the top of the script during debugging then the script was ready for any outputs.
Finally, check your server logs as those will give the best indication of the causes.
Trev - who's really glad he doesn't do much Perl these days
|