Jump to content

Configuring Apache with php


toms

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/65305-configuring-apache-with-php/
Share on other sites

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.