I have recently been trying to install PHP and Apache on my computer. After many hours, they're installed. I have modified the httpd.conf and php.ini files like everyone says. I then created a simple PHP script:
<?php phpinfo(); ?>
But when I try to run it with http://127.0.0.1/phpinfo.php
it just shows the source code instead of executing it. I am using Apache 2, PHP 5 and Windows Vista.
EDITED LINES:
PHP.INI:
short_open_tag = On
HTTPD.CONF
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/php"
<?php echo "Hello world"; ?>
does it display Hello world? if it displays the code then how @RabNawaz sayed your server is not configured correctly!http://localhost/
orhttp://127.0.0.1/