Surjya Narayana Padhi Surjya Narayana Padhi - 3 years ago 98
PHP Question

Installing PHP, MySql and Apache on windows

Its my first time working with Apache,PHP,MySql. I downloaded and installed the latest package of these 3. Now I checked with apache and the index.html works. Now I replaced the index.html with some php script to check if my php works or not. When opened the html page again I see the php code directly. It seems it does not work. following is how my php code looks like.


echo "Hello World";


when I open my index.php , I see the above code itself. Can anybody let me know whats wrong and how can i fix it?

Answer Source

Check your apache httpd.conf file for some commented out code that looks like this

LoadModule php5_module libexec/apache2/

and further down the file, this...

<IfModule php5_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    <IfModule dir_module>
            DirectoryIndex index.html index.php
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download