Jump to content

need help with perl


mrsleepy

Recommended Posts

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???

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

 

 

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...