Click to See Complete Forum and Search --> : Forbidden to access phpinfo.php (in Windows XP?)


ogo
08-23-2006, 07:50 PM
Hey all,

About a year ago I put PHP and PMWiki on my Mac. Then it was an easy install, but now I need to switch it to my PC running Windows XP and can't figure out what's going wrong.


I am running Apache 2.2.3, and installing PHP 4.4.4. I followed the directions on http://www.php.net/manual/en/install.windows.apache2.php.


My server directory is c:\server. After installing PHP in c:\server\php using the windows installer, I added these three lines to the end of httpd.conf:

ScriptAlias /php/ "c:/server/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"


When I try to access a simple file, http://localhost/phpinfo.php, Firefox says:

Forbidden
You don't have permission to access /php/php.exe/phpinfo.php on this server.


I didn't think WinXP even had permissions! I am logged in under my main user account, and I've restarted Apache several times.

JCBarry
08-25-2006, 05:00 PM
The instructions you were looking at were for setting up PHP as a CGI binary.
I would set it up as a module using the directions just underneathe it on that page.

That should do the trick.

1. Delete all the stuff you added.
2. Add the lines under "Installing PHP as a Module" for PHP4 and Apache 2

ogo
08-28-2006, 05:22 AM
This worked very well. Thank you!