Byron Posted April 24, 2008 Posted April 24, 2008 Hello Helio, Can cgi scripts be run in any other directory besides the cgi-bin? And if not, can this be cahnged? Does't work in public_html or any other directory http://byrondallas.heliohost.org/time.pl Works fine in cgi-bin http://byrondallas.heliohost.org/cgi-bin/time.pl Thanks, Byron Quote
meriadoc Posted April 24, 2008 Posted April 24, 2008 There are a couple reasons why it would be better to put executable scripts in the cgi-bin directory. Efficiency and security are the two main reasons. If you keep your scripts in one directory you will always know where they are located. Apache also designates the cgi-bin directory as executable meaning that it is setup to execute all files in that directory. Not having to determine if a file should be executed or not each time a file is served makes it easier on the server. The World Wide Web Security FAQ discusses a few of the security reasons. With that said, you may be able to create a .htaccess file to allow execution of scripts in your public_html directory. Check out the section on .htaccess files in Apache Tutorial: Dynamic Content with CGI. I haven't tried this and depending on how Apache is configured on the server it may or may not allow the override. Quote
Byron Posted April 24, 2008 Author Posted April 24, 2008 With that said, you may be able to create a .htaccess file to allow execution of scripts in your public_html directory. Check out the section on .htaccess files in Apache Tutorial: Dynamic Content with CGI. I haven't tried this and depending on how Apache is configured on the server it may or may not allow the override. Thanks Meriadoc, that worked out great! http://byrondallas.heliohost.org/time.pl I have a couple of cgi files that need to be in the public_html directory and one is already password protected and I can protect the other with htaccess. Now hopefully you can help me out with just one more little problem? Is there anyway to enlarge the small textarea on the edit page? Thanks, Byron Quote
Ashoat Posted April 25, 2008 Posted April 25, 2008 If you are talking about the File Manager, are you using IE6? I believe that it breaks the File Manager... try using IE7 or Firefox. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.