Page 1 of 1

cgi-bin location

PostPosted: 08. February 2005 00:42
by pyro
Just to add something

If I go here
http://localhost/xampp/simon/test.cgi the script below works fine
it prints Helo world

#!/perl/bin/perl -wT
print "Content-type: text/html\n\n";
print "<h2>Hello, World!</h2>\n";

But if i add a folder cgi-bin like below
http://localhost/xampp/simon/cgi-bin/test.cgi

I get the page cannot be found error, when using the same file " test.cgi "
any ideas ?

Pyro

PostPosted: 08. February 2005 02:57
by Dave_L
Is the cgi-bin folder within the htdocs folder, or is it at the same level?

I think that the default httpd.conf is configured to look for the cgi-bin folder at the same level as the htdocs folder. I'm not sure, since I've made some changes to the default configuration.

PostPosted: 25. April 2006 07:30
by speedracer
Was a solution found?

PostPosted: 25. April 2006 19:16
by WorldDrknss
use the full path not #!/perl/bin/perl -wT

examples:
#!C:/Program%20Files/xampp/perl/bin/perl -wT
#!/Program%20Files/xampp/perl/bin/perl -wT

In my setup I use:
#!C:/xampp/xampp/perl/bin/perl -wT
or
#!/xampp/xampp/perl/bin/perl -wT

open your httpd.conf and add something similar bellow or add it to your virtualhost is you are using one.

ScriptAlias /cgi-bin/ "C:/Program%20Files/xampp/htdocs/simon/cgi-bin/"
<Directory "C:/Program%20Files/xampp/htdocs/simon/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>