mrsleepy Posted March 17, 2007 Posted March 17, 2007 im having a problem running my perl scripts on my website. when i log into my website to make changes there is a list of information on the side of the page that shows all the different statistics you might need to know. one of the info panels shows the path to perl which as described on the page is /usr/bin/perl. i used this on my page and then set the permissions on the file so i could execute it and then when i tried to view the page i got a 500 internal server error. the page suggested that i look at the server error log for some suggestions but i dont know where that is either. the page that i submitted works in principal as i have tested it on a perl editor that i have installed locally on my own machine. please help me i am a n00b and have no idea what im doing???
Ashoat Posted March 17, 2007 Posted March 17, 2007 I'm not quite sure that Perl works here, but we can try some things. First of all, did you upload your script into the cgi-bin directory? Secondly, check your error log - this is available for viewing in your cPanel.
mrsleepy Posted March 18, 2007 Author Posted March 18, 2007 I'm not quite sure that Perl works here, but we can try some things. First of all, did you upload your script into the cgi-bin directory? Secondly, check your error log - this is available for viewing in your cPanel. i checked the error messages in my cpanel and all it told me was that the file permissions were not set correctly to be executable so i changed them to 0755 and then it still didnt work. the file is definitely in the cgi-bin directory and i did try and execute it with a different extension. i.e the first i tried to run had a .pl extension so i uploaded the same script with a .cgi extension and it still didnt work. what about the shebang line?? /usr/bin/perl is that the correct directory where perl lives on the server?
Ashoat Posted March 19, 2007 Posted March 19, 2007 Try the extension ".cgi". Make sure you are adding the "#!/usr/bin/perl" line at the front.
mrsleepy Posted March 19, 2007 Author Posted March 19, 2007 Try the extension ".cgi". Make sure you are adding the "#!/usr/bin/perl" line at the front. well i tried the .cgi extension again today with a different script that i uploaded to test today and it worked a treat cant see anything different in the script from the one i uploaded previously and the shebang line was corecct. as far as i can see i haven't changed anything but now its working so all is good. cheers djbob
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now