Click to See Complete Forum and Search --> : a question about installing PHP for apache


humorstar
09-17-2001, 09:51 AM
I can see the libphp4.so under /usr/local/apache/libexec, and now
I can use the command 'find -name 'libphp4.so'' to find it. However,
httpd.conf can't see libphp4.so. It cannot find this necessary file to
run PHP as a module. In httpd.conf, there is a line:
LoadModule php_module libexec/libphp4.so

I tried to use './apachectl configtest', it shows there is an error on this
line.

If I remove this line, the apache can be started, but PHP cannot functions.

I cannot understand why httpd.conf cannot load libphp4.so. Does someone have the same experience?
:rolleyes:

Col. Panic
09-17-2001, 04:46 PM
I could be wrong, 'cause I ain't the brightest, but I believe the appropriate lines to add are as follows. On my machine (Slack 7), they're on line ~757


AddType application/x-httpd-php .php
AddType application/x-httpd-php-source.phps


hth

humorstar
09-17-2001, 08:57 PM
Sure, I have that 2 lines in my httpd.conf.
But you also need LoadModule libphp4.so in your httpd.conf. You can search libphp4.so in httpd.conf. I believe it is there. What frustrated me is that I cannot understand why httpd.conf cannot find it even I am sure and I can see it is there. BTW, I've changed the permission of libphp4.so to 0777. And for sure I've configure apache with --enable-module=so.
:confused:

Col. Panic
09-17-2001, 09:57 PM
Depending on how you've gone about installing it, you don't need it because I don't have that line in mine and it works beautifully. Did you compile apache, then php, then apache again (a la NHF)?

<edit> Upon further investigation, I don't even have the libphp4.so file on my system. You might want to try building it into apache rather than running it as a module. </edit>

[ 17 September 2001: Message edited by: Col. Panic ]

Choozo
09-18-2001, 09:25 AM
This article (http://www.linuxplanet.com/linuxplanet/tutorials/1374/1/) may be helpful.

Cheers :)

humorstar
09-19-2001, 11:12 PM
thanks all. I've fixed the problem. Actually it cannot find a module of mysqlclient.so, which is needed by libphp4.so?! I add the path to ld.so.config and run ldconfig. And it is all set. :)
:)