Nano HE
Nano HE

Reputation: 1971

CGI file location for xampp on windows

I am using XAMPP 1.7.2 on winxp. I plan to dev web app (.cgi or .pl) and I checked phpinfo() and found mod_perl already enabled.

But I tried to place my hello.cgi file in C:\xampp\htdocs\hello.cgi or C:\xampp\cgi-bin\hello.cgi. Both methods won't work when I try to open http://localhost/hello.cgi

Any suggestion are appreciated.

Upvotes: 0

Views: 7617

Answers (3)

fardin
fardin

Reputation: 1

Name it /perl/ not /cgi-bin/.

Upvotes: 0

rickumali
rickumali

Reputation: 727

Two suggestions, since your hello.cgi program won't work in either the htdocs or cgi-bin directories:

1) Examine the Apache error log file, to see if the script is indeed getting executed, and you're receiving some other kind of error.

2) Examine the Apache httpd.conf, for the AddHandler and the ScriptAlias settings. These dictate what files should be run as scripts, and what directory contains CGI scripts.

XAMPP is a good package for learning the LAMP stack on Windows XP. Good luck!

Upvotes: 1

dalton
dalton

Reputation: 3696

The location will be

http://localhost/cgi-bin/hello.cgi

The place you should be putting your .cgi scripts is in the cgi-bin folder.

Upvotes: 3

Related Questions