Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Newby: can't configure cgi (pl, php) with Apache 2.2 for XP |
|
Author |
|
ggolub
Joined: 13 May 2010 Posts: 2
|
Posted: Thu 13 May '10 6:54 Post subject: Newby: can't configure cgi (pl, php) with Apache 2.2 for XP |
|
|
Hello guys, I am having a problem to move forward with cgi / php configuration.
Here is what I did already:
Installed Apache 2.2 and it works by display idx file in htdocs directory.
Installed php 5.3.2 for Windows. It's executable is seen from any cmd window.
I have not changed any default configuration for Apache server and placed hello.pl file into ...cgi-bin directory. The script is from Apache online manual:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";
... and works if started from command line.
Here are few problems I notice.
1. I execute from browser next:
http://192.168.1.117/cgi-bin/first.pl
... and error log says: File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/first.pl
Why does it look in htdocs when I expect it to look at: cgi-bin?
Conf file has next entry:
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"
Which in my opinion should refer server to cgi-bin instead of htdocs.
2. When I copy script in htdocs, instead of using output as input to web page, it produces dialog asking:
Do you want to open this file (hello.pl), when I click button 'open', I see for a moment and it dissapears.
I followed religiously: 'Apache Tutorial: Dynamic Content with CGI' - no result.
Any advice somebody can provide?
Thank you for any help. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
ggolub
Joined: 13 May 2010 Posts: 2
|
Posted: Fri 14 May '10 2:09 Post subject: Excellent directions : it works |
|
|
James, thank you so much!
Right to the point 100%. |
|
Back to top |
|
|
|
|
|
|