HELP! None of my scripts work! What's wrong?


Ok, first make sure that the #! line at the top of the script is set correctly. This line states where the perl program is on the system.
If is is a Windows system it will be something like C:\perl\bin\perl.exe
On a Linux system usually /usr/bin/perl
On a linux system you can use the command "which perl" (no quotes) to find
the location of the perl program.
Make sure that it is the very FIRST line in the file and there are NO spaces before the #!

Check the file permissions! The Script files should be chmod 777 or 755.

When you try to run the script from a browser you should get some kind of error like:
"500 Internal Server Error"
Use the headings on the FAQ to find the error you are getting and follow those instructions.



BACK












I am geetting "500 Internal Server Error" when I run the script!

Most times when people see this error it is because they changed something in the script or the server is not configured properly.

There are a couple of things that you can do to track down the problem. The first one is to check to make sure that you didn't mess up the script by deleting a ; or that the first line in the script is not indented or anything like that.

If that is OK then it could be that you modified the script with a windows text editor and it has inserted a bunch of CR/LF that linux has a problem with. Reference this for the solution:
The script is generating a "premature end of script headers" error!

Another potentail problem is that some servers are not configured to use the .pl extention. In this case you will have to change the extention of the asconfig.pl and asgbv3.pl files to .cgi ie asgonfig.cgi
if you do this then in a text editor do a global search and replace in both script files and replace asgbv3.pl with asgbv3.cgi and asconfig.pl with asconfig.cgi.

If that is ok they check the server error logs. If you dont have access to the server error logs then open up the script in a text editor. Near the top of the script you will see some lines that look like this:
#BEGIN
#{
#    print "Content-type: text/html\n\n";
#    use CGI::Carp('fatalsToBrowser');
#}
Delete the # in front of each line, resave the file, upload it to the server and run it again. This time the error message will be displayed in the browser. Once you have fixed the problem make sure that you comment out the debugging code again by putting the # in front of each line again.

Remember, if your server is linux and you are using Windows you will have to run dos2unix on it after you save it to put the file back to a linux format.


BACK









The script is generating a "premature end of script headers" error!

Since all of the scripts have been tested you are most likely getting this error (if you are on a Linux system) because the (older) script files were created on a windows system. They way that Windows and linux treat CR/LF in text files is different. Don't panic,
there is an easy solution. Included in most Linux distributions is a program called dos2unix. Simply run the program on the script and it will fix it into a linux format. The command syntax is: dos2unix -o scriptname.pl
If you are on windows and you don't have access to a server shell you can download a
free version of the windows based dos2unix.exe and unix2dos.exe programs
here or on the downloads page
Run the script through them and it should be ok.


BACK