Is there any way to run perl scripts from within my public_html directory? or do they _have_ to be stored in my /cgi-bin directory?
Any work around would be greatly apprciated.
Thanks
J. Slime
This is a discussion on Perl scripts in main directory? in the Shared & Semi-Dedicated forum
Is there any way to run perl scripts from within my public_html directory? or do they _have_ to be stored in my /cgi-bin directory?
Any ...
Is there any way to run perl scripts from within my public_html directory? or do they _have_ to be stored in my /cgi-bin directory?
Any work around would be greatly apprciated.
Thanks
J. Slime
You should be able to run perl scripts from any directory under public_html. Just make sure the script has .pl extension and +x attribute.
If it doesn't work, please post here the error message and we will take care of you![]()
.pl and .cgi extensions should work outside of cgi-bin, actually. But like Gerilya said, if you have trouble we regualrs will be here to help you out.
--Jason
Here's the error message l get:Originally posted by gerilya
You should be able to run perl scripts from any directory under public_html. Just make sure the script has .pl extension and +x attribute.
If it doesn't work, please post here the error message and we will take care of you![]()
The exact script works perfectly find from within my cgi-bin.
And l've tried naming it both .pl, and .cgi...
No go with either, l get the same error.
However l'm unfamiliar with the +X attribute... Is that my problem here?
Thanks for the help...Code:Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@tdtcoalition.net and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. -------------------------------------------------------------------------------- Apache/1.3.29 Server at www.tdtcoalition.net Port 80
~JSlime
+x means giving the file execute permission. You may know it as chmod 755. Its the same thing you need to do to get the file to execute in the cgi-bin directory. The actual upload/setup process for the cgi-bin and any other directory are identical, so any script you've gotten working in the cgi-bin should work just as well from anywhere else inside public_html, the only exception being that scripts in cgi-bin don't need to end in .pl or .cgi, whereas in any other directory they must.
--Jason
Internal Server Error means that your script was, in fact, executed and generated an error.
If it works fine when called from cgi-bin directory then the only reason I can think of not to work from any other location is absolute URLs and/or file locations hardcoded inside that script.
How big is that script anyway? May be it makes sense to post it here, otherwise, I am afraid you are on your own.
Ahhh +X ok l got ya, yeah l've always heard it referred to as "chmoding" the file.. heh sorry, just confused me a bit.
But anyway, here's a text file of one of the scripts l'm attempting to create in my main directory:
http://www.tdtcoalition.net/shell.txt
Roughly that's the script that l'd like to use, however this isn't the only script that l'm having this problem with....
There's been other's that..work fine in my /cgi-bin however when l try the same script(S) in my /public_html directory l get the same error message.
Thanks for the help folks,
~J. Slime
Let me guess... you upload that script to public_html via FTP, right?
Then try something else:
1. Get your SSH enabled
2. Log into your SSH account
3. copy the file from cgi-bin directory to public_html directory:
Let us know how it is going.cp cgi-bin/script.pl public_html/
EDITED:
do not forget to chmod the script after copying:
chmod 755 public_html/script.pl
Last edited by gerilya; 11-28-2003 at 10:09 AM.
Copyright © 2011 JaguarPC.com
Bookmarks