Click to See Complete Forum and Search --> : php5 apache2 on Suse9.1


emus
08-20-2004, 06:16 PM
Hi everyone

I just installed php5 on my computer and except for some minor additional configurations, everything went well.

I saw the following in httpd.conf

TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf


and edited mod_mime-defaults.conf to include
AddType application/x-httpd-php .php .phtml

However, when I try to view a .php file, the page simply doesn't display and I get the Konqueror mime-type box asking me which applications I want to use to open the page.

I'm not sure what I'm doing wrong. Does anyone have any idea why .php files aren't being displayed correctly?

Thanks,

emus

bwkaz
08-20-2004, 07:13 PM
I don't know if mod_php for PHP 5 is configured the same way as mod_php for PHP 4, but is your actual mod_php.so library getting loaded in httpd.conf somewhere?

This:

LoadModule php4_module lib/apache/libphp4.so

is what it looks like for PHP 4 on most Apache 2 installations.

emus
08-20-2004, 07:46 PM
Thanks for the reply bwkaz

I'm not really sure, as far as I can tell, it's getting loaded.

I have a separate file called httpd2-prefork.conf containing the line LoadModule php5_module /usr/lib/apache2/libphp5.so

I also verified the path for libphp5.so, it does exist under /usr/lib/apache2/

bwkaz
08-20-2004, 10:31 PM
When you browse to http://your-site/server-info/, do you see anything on the page containing the string php at all? I think the relevant file is sapi_apache2.c, but maybe not.

emus
08-20-2004, 11:04 PM
Your original idea about libphp not getting loaded was right. As it turned out, it didn't help having the libphp path in httpd2-prefork.conf. Instead, I moved the path into the regular httpd.conf, and it's finally working now.

Thanks for your help,

emus