I've been writing PHP applications using PHP for a while in WAMP. Now I'm installing PHP and Apache HTTP Server separately on my work PC. I've installed PHP 5, and the latest Apache. I go to localhost and see it works!
Now I add a file called test.php
which displays:
<?php
phpinfo();
?>
But in the browser it just displays plain text. Is there somewhere I have explicitly tell it to use PHP 5?
You'll need to add this to your server configuration:
That is assuming you have installed PHP properly, which may not be the case since it doesn't work where it normally would immediately after installing.
It is entirely possible that you'll also have to add the
php
.so/.dll file to your Apache configuration using aLoadModule
directive (usually inhttpd.conf
).