Author |
|
maestro427
Joined: 04 Feb 2006 Posts: 4
|
Posted: Fri 10 Feb '06 0:11 Post subject: Running PHP 5.1.2 as CGI on Apache 2.2 on Windows XP |
|
|
Has anyone done this successfully??
I keep getting a 403 Forbidden error saying, "You don't have permission to access /php/php-cgi.exe/phpinfo.php on this server."
I'm using both the Apache 2.2 binary and PHP 5.1.2 mod downloaded from this site. Everything works fine when I load PHP as a module per the instructions given.
However, nothing I have tried gets around the 403 Forbidden error when trying to run it as CGI. I've granted everything total permissions in XP, but still no luck. I've added the following lines to my httpd.conf:
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php-cgi.exe"
Any ideas?? Your help is really needed on this one!
Thanks! |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7405 Location: EU, Germany, Next to Hamburg
|
|
Back to top |
|
maestro427
Joined: 04 Feb 2006 Posts: 4
|
Posted: Sun 12 Feb '06 23:53 Post subject: |
|
|
I called it by the 2nd method:
http://127.0.0.1/phpinfo.php
...with phpinfo.php being located in the root of my htdocs directory.
Also, I do have cgi.force_redirect enabled in php.ini.
Thus, I've since tried calling it by
http://127.0.0.1/php/php-cgi.exe/phpinfo.php
but I get the exact same 403 Forbidden error message.
Any ideas??
Thanks!
Last edited by maestro427 on Sun 12 Feb '06 23:59; edited 1 time in total |
|
Back to top |
|
maestro427
Joined: 04 Feb 2006 Posts: 4
|
Posted: Sun 12 Feb '06 23:55 Post subject: |
|
|
Oh yeah...my doc root is at C:\Apache2\htdocs\
and my php-cgi.exe is in C:\php\
Any ideas??
Thanks! |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3118 Location: Hilversum, NL, EU
|
Posted: Mon 13 Feb '06 4:10 Post subject: |
|
|
I tried it also.
When I add the following, it works here:
<Directory "c:/php/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Steffen |
|
Back to top |
|
maestro427
Joined: 04 Feb 2006 Posts: 4
|
Posted: Wed 15 Feb '06 0:36 Post subject: |
|
|
Aha! ...Adding the <Directory>...</Directory> stuff worked!
You're a genius Steffen...genius i tell you. =)
Thanks! |
|
Back to top |
|
axsubram
Joined: 03 Feb 2007 Posts: 1 Location: Chennai, India
|
Posted: Sat 03 Feb '07 9:43 Post subject: It Works! |
|
|
This is great. Have been tinkering due to this problem for 2 days. Great! Thanks a lot. |
|
Back to top |
|