
pdg
Novice
Sep 13, 2008, 12:57 PM
Post #1 of 16
(753 views)
|
|
None of my cgi/pl scripts will run.
|
Can't Post
|
|
I've been having a problem where absolutely none of the perl scripts I upload will run on my web server. I contacted my hosting service and they uploaded the following Hello World script to my cgi-bin which does work:
#!/usr/bin/perl # Tell perl to send a html header. # So your browser gets the output # rather then <stdout>(command line # on the server.) print "Content-type: text/html\n\n"; # print your basic html tags. # and the content of them. print "<html><head><title>Hello World!! </title></head>\n"; print "<body><h1>Hello world</h1></body></html>\n"; I made a copy and saved it as "test.pl" when I hit save, as in putting the quotes around it makes it save as test.pl and not test.pl.txt. I changed the output text to "Hey, this works!" instead of "Hello world". I saved it, uploaded it via ftp, and changed the permissions to 755 (-rwxr-xr-x). This script won't work at all. I've got several files uploaded. Only one works, it's saved as a .cgi extension, but I can't figure out what's allowing that one to work but none of my other ones. Permissions on all of my files are set correctly. They've all go the "print "Content-type: text/html\n\n";" line in them. I'm uploading them all in ascii format, and they're all pointing to my /usr/bin/perl directory as they should. Every file I've uploaded gives me a 500 Server Error Message. Can anyone help me out? Pender Design Group
|