| | |
Internal Server Error
Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2007
Posts: 4
Reputation:
Solved Threads: 0
Hi Kevin,
Your right, it does work!
However, if I try a different script which uses a range of Perl functions, it doesn't work, unless I declare use of CGI Standard. I've never ever tested a simple print script before.
So I guess heres some other tips which have probably already been suggested:
1) Chmod your script with permissions 755 (on 1and1 Webspace Explorer, right click the script file, and then permissions).
2) Upload your scripts in ASCII format (which is default on 1and1 Webspace Explorer).
3) ALWAYS use lowercase letters in your script file name, this may not always be a problem, but sometimes the script will not work properly. Its just a good habit to have in case future scripts do not work. I.e. use script.pl NOT Script.pl
4) Of course, always declare print "Content-type: text/html\n\n"; before printing a statement in CGI.
5) Use a syntax checker to check that your syntax is good. I.e. http://ult-tex.net/tools/ultra/line_count.pl. 1and1 package also comes with a syntax checker, but if you are using the Webspace Explorer (not FTP), then you can't have both open at once, so its easier to use an external syntax checker.
6) 1and1 package comes with a CGI Output Monitor. Open it, locate the directory the script is in, type in the script file name, ignore the parameter option unless you know the parameter. Even when syntax is correct (or not), this often provides a more in-depth reason why your script isn't working. It will also check if the server is connecting to your script properly, and warn you etc etc.
There are a few other things you could check, but the above are most important.
Chris
Your right, it does work!
However, if I try a different script which uses a range of Perl functions, it doesn't work, unless I declare use of CGI Standard. I've never ever tested a simple print script before.
So I guess heres some other tips which have probably already been suggested:
1) Chmod your script with permissions 755 (on 1and1 Webspace Explorer, right click the script file, and then permissions).
2) Upload your scripts in ASCII format (which is default on 1and1 Webspace Explorer).
3) ALWAYS use lowercase letters in your script file name, this may not always be a problem, but sometimes the script will not work properly. Its just a good habit to have in case future scripts do not work. I.e. use script.pl NOT Script.pl
4) Of course, always declare print "Content-type: text/html\n\n"; before printing a statement in CGI.
5) Use a syntax checker to check that your syntax is good. I.e. http://ult-tex.net/tools/ultra/line_count.pl. 1and1 package also comes with a syntax checker, but if you are using the Webspace Explorer (not FTP), then you can't have both open at once, so its easier to use an external syntax checker.
6) 1and1 package comes with a CGI Output Monitor. Open it, locate the directory the script is in, type in the script file name, ignore the parameter option unless you know the parameter. Even when syntax is correct (or not), this often provides a more in-depth reason why your script isn't working. It will also check if the server is connecting to your script properly, and warn you etc etc.
There are a few other things you could check, but the above are most important.
Chris
Last edited by xmassey; Nov 7th, 2007 at 7:03 am.
![]() |
Similar Threads
- 500 internal server error (*nix Software)
- 500 Internal Server Error - with a twist (Perl)
- php_value inclue path says internal server 500 error (Linux Servers and Apache)
- why getting "302 found" and "500 Internal Server" errors? (PHP)
- Http 500 -internal Server Error (Site Layout and Usability)
- Getting error 500 Internal Service Error..Meaning? (Web Browsers)
Other Threads in the Perl Forum
- Previous Thread: Using REST in perl to access webservices
- Next Thread: PDB analysing
| Thread Tools | Search this Thread |





