I am using Slackware 10.1. PHP will not load, and will not serve up any HTML, even when I put
Include /etc/apache/mod_php.conf
LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php .phtml
Any ideas?
mr.popper
Printable View
I am using Slackware 10.1. PHP will not load, and will not serve up any HTML, even when I put
Include /etc/apache/mod_php.conf
LoadModule php4_module libexec/libphp4.so
AddType application/x-httpd-php .php .phtml
Any ideas?
mr.popper
run
while you restart apache and see what (if any) errors it spits out...Code:tail -f /path/to/apache/error_log
If you did the standard install you will have to edit /etc/httpd.conf and uncomment the line near the bottom (like 80% down) so that apache will realize that php files are special and get sent to the php executable. Otherwise it will treat them as plaintext and html.
I had to make sure three things were in my httpd.conf file.
There was a .so file that needed to be loaded as a module.
There was also a .c file in the section below the default config.
Had to uncomment the file types .php .phps
If you just did a default install of apache and a default install of php, all you really need to do is copy the php.ini file over to /etc/apache and use the default httpd.conf file, make those three changes/confirm I described above, and you should be set.
Thas is all I did with my Slack 10.1 install, and everything worked fine!
which .so file needs to be loaded as a module? and what do I do about that .c file?
This is what I have in my httpd.conf file:
With the LoadModules:
LoadModule php4_module libexec/apache/libphp4.so
With the AddModules:
AddModule mod_php4.c
And finally:
# This next section adds handlers for .php file.
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
That is all I needed to do. And this is slack 10.1, nothing fancy.