toms Posted August 16, 2007 Share Posted August 16, 2007 Hello, I am running Slackware Linux 12 with an Apache server. I had Apache and php installed with it(off the cd). However, when I try to access php files in my browser, the html/php text is displayed. I have agthered that this is becuase Apache is not comfigured to run php, but i have been unnable to find comprehensible help on the internet. I am hoping someone can tell how to configure Apache to run php. Thank you. Quote Link to comment Share on other sites More sharing options...
trq Posted August 17, 2007 Share Posted August 17, 2007 You'll want to make sure your httpd.conf file contains the lines.... LoadModule php5_module /usr/lib/apache2/modules/libphp5.so <IfModule mod_php5.c> AddType application/x-httpd-php .php .phtml .php3 AddType application/x-httpd-php-source .phps </IfModule> or similar then restart Apache. Quote Link to comment Share on other sites More sharing options...
toms Posted August 17, 2007 Author Share Posted August 17, 2007 Thanks a lot. I can now run a "Hello World" php from the server. By the way, if anyone has the same problem, the folder was /usr/lib/httpd/modules/libphp5.so rather than /usr/lib/apache2/modules/lib5.so. Thanks again; I was getting pretty frustrated trying to find information on the internet. Quote Link to comment Share on other sites More sharing options...
trq Posted August 17, 2007 Share Posted August 17, 2007 By the way, if anyone has the same problem, the folder was /usr/lib/httpd/modules/libphp5.so rather than /usr/lib/apache2/modules/lib5.so. Yeah, this can be distro specific, mine was taken from my Debian Etch server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.