I have installed PHP 5.4, MySQL 5.5, Apache 2.2.22 on Windows 7.
I’ve followed the book “build your own database … by Kevin Yank, 4th edition” I made the required changes suggested by Author in one post during installaton.
Installation has gone well. It shows “http://localhost:8080” page but when I write first PHP file - with only echo statement, it shows “HTTP 403 forbidden”. It doesn’t show php file.
The 403 error most likely means that you haven’t granted Apache permission to serve files from the directory you’re requesting files from.
You need a block like this in your httpd.conf to tell Apache it’s allowed to serve files from c:/path/to/my/php/files – which you should replace with your real path, i.e., the path that is set as DocumentRoot in httpd.conf
<Directory "c:/path/to/my/php/files">
Order allow,deny
Allow from all
</Directory>
… and DON’T use Window’s Program Files (or the users directory) for the location of your “website” files! That’s a protected directory and it will not work.
You also might want to check the PHP error log. Not sure where it would be in that apache setup.
If you are on win7 an easy way to get PHP running is to use the Web Platform Installer and install PHP on IIS. No need to mess with strange httpd.conf stuff . . .