Reputation: 243
I have installed Apache 2.2 and PHP5 in my laptop. Apache seems to work fine. When I view a php page the text in the html body section displays fine but the php section does not get displayed at all. I am thinking I must have missed some entry in the apache config file to tell it where PHP is installed?
Apache c:\server\apache2 PHP c:=Program Files\PHP
simple example
<html>
<body>
See this line
<?php
echo "Hello World";
?>
</body>
</html>
Can anyone offer some suggestion?
Thanks Dan
Upvotes: 2
Views: 178
Reputation: 23231
Just install http://www.zend.com/en/products/server-ce/ or http://www.wampserver.com/en/ and be done with it.
EDIT: Thanks for the tip, markus.
Upvotes: 2
Reputation: 16960
You need to tell Apache to load the php5 module and the mime types. In httpd.conf
add:
LoadModule php5_module "c:/path/to/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
then restart Apache.
see: http://php.net/manual/en/install.windows.apache2.php
Alternatively just use a pre-configured solution like WAMP
Upvotes: 2