Run CGI scripts outside cgi-bin

Some web hosts allow you to run .cgi scripts only if they're inside the cgi-bin folder. Others allow you to run your scripts outside the cgi-bin folder. Here's how to ensure that you can run them from any folder.

[an error occurred while processing this directive]

If you wish to run the cgi script outside the cgi-bin folder and it doesn't seem to work, first get in touch with the Technical Support Team of your web host and let them know about your needs.

Then, ask permission if you're allowed to add the following two lines to your HTACCESS file:

Options +ExecCGI
AddHandler cgi-script .cgi .pl

Those two lines tell your webserver to treat files ending in .cgi or .pl to execute (run as scripts). This assumes you've chmoded those files as 755.
[ First posted on 06/09/2004 by Manuel Viloria ]

Do you LIKE this page? Please let us know, and we will publish more of the content that YOU want. Salamat po!

Panuorin Mo Ito...

Visit ~ Kumita sa Internet, Kahit Super-BUSY Ka

Get In Touch With Manuel Today

  Previous Entry
  Next Entry

Secondthoughts @
Manuel Viloria
About Manuel Viloria
Contact Us
Privacy Statement
RSS Feed

Google Reader

Copyright © 1996 - 2012 by All Rights Reserved.