Another Newbie needin' help
I have written a couple of simple perl scripts(I am learing a new language, like I can control my native language.) and they work great on my PC. However when I upload them to my server they don't seem to work at all. The first line is the typical unix line /usr/bin/perl but I get an Internal Server Error when I run then. Does anyone know of a script that will allow me to look at how my server is set up to see the path to perl?
Thanks for helping a newbie!
P.S. My server error log tells me nothing
If you're sure it is a problem with your path to Perl then you should be able to find it in your server's documentation. If not contact, the administrator.
If this doesn't solve the problem, another common mistake to upload your scripts in binary rather than ASCII. Perl scripts are plain text and should be handled as such.
If this still doesn't solve the problem, try adding this to your script.
use CGI::Carp 'fatalsToBrowser';
If there are errors in your code that are preventing the script from compiling, this will output the error messages to the browser.
I am pretty sure the problem is with the path to Perl. The scripts seem to run fine on my IIS server on my PC. There is nothing in the server documentation, in fact, I think this guy really doesn't know what he is doing and is reselling part of his hosting account. I do know that it is a virtual host.
As far a contacting server admin, I did that about a week ago too and still haven't heard anything back from their 27/7 technical support desk.
Thanks for the suggestion though.
Actually to be fair though, I sent an email early in the day 12/24 and it is morning 12/26 now, I will give him a break what with the holiday and all
Another common error is not printing a header. If you are printing anything to the browser make sure you use the command print header(); before you print anything to the browser.
If you are printing something other than HTML use:
Another common problem is not leaving a blank line after the path to perl.
notice also the hash and exclaimation marks before the path.
If line 2 of your example code is the blank line you're referring to, them it's not actually required.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)