Forbidden to access phpinfo.php (in Windows XP?)
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...ws.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:
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.
Last edited by ogo; 08-24-2006 at 01:58 AM.
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
This worked very well. Thank you!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)