Integrate PHP with Apache

You need to configure apache a little for telling how to execute php files.
For making php work with apache you first dump php suppose c:\php501\. Then add these lines to your apache httpd.conf file.

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

First check your apache server is running correctly. If it is serving your html pages correctly then add the above three lines in your httpd.conf page. Restart your apache for taking your change work.

It will work if your php code path is "C:\php501\". Just change path in the first line. That's it.

  • # 1 - by Andreas Parker Official Blog

    I used this code. Apache Server started successfully!
    It can execute HTML . but , unable to open test.php !!!

    Error 403: Website requires login

    And what about php5apache2.dll file?

  • # 2 - by Andreas Parker Official Blog

    I used this code. Apache Server started successfully! It can execute HTML . but , unable to open test.php !!!Error 403: Website requires loginAnd what about php5apache2.dll file?

  • # 3 - by Satya Prakash Karan

    It looks you are not clear about what is your problem!

  • # 4 - by Satya Prakash Karan

    It looks you are not clear about what is your problem!

Comments are open for an year period. Please, write here on Facebook page.