LAMP on Slackware (Part 2)
Apache and PHP
Now that you know your server is functioning correctly, lets get PHP working!
Open up your /etc/httpd/httpd.conf file once again and find the following section:
<:/IfModule>and make it look like this
DirectoryIndex index.php index.html index.htm
<:/IfModule>Next move down and uncomment (remove the #) from the mod_php.conf Include line like this:
Include /etc/httpd/mod_php.confSave the file and restart the httpd server
To test that php is functioning correctly we should create a quick test page. Change directory to the one specified in DocumentRoot
cd /var/www/htdocsCreate a new file called index.php and add the following code:
?>and save it.
Open up your web browser and point it to "http://localhost/index.php" and you should see the output from phpinfo().
Note: phpinfo() gives detailed information about your php setup so best not leave this open to the Internet.