There may be other/easier solutions, but what always works for me is
compiling Apache from source after removing the rpm, then compiling PHP
from source.
The instructions at the end of the README.config file in the Apache source
distro work like a charm.
This seems long-winded but at least I know it's gonna work at the end. 

Mick

On Sat, 24 Feb 2001, Ed Lazor wrote:

> I've had PHP installed through the RedHat RPMS listed below.
> 
> php-imap-4.0.4pl1-3
> php-manual-4.0.4pl1-3
> php-4.0.4pl1-3
> php-ldap-4.0.4pl1-3
> php-mysql-4.0.4pl1-3
> 
> Unfortunately, I discovered there's a bug in this version, so I need to 
> remove the rpms and install PHP by compiling the source.  I've been playing 
> with it for a few hours, but haven't had any luck, so I figured I'd ask 
> here.  What's the easiest way to compile PHP and load it into Apache?
> 
> If I understand correctly, because of the rpm, PHP resides as the file
> /usr/lib/apache/libphp4.so
> 
> Apache loads PHP with the following command in httpd.conf
> LoadModule php4_module        modules/libphp4.so
> 
> I'm not sure (can someone confirm please?), but I assume Apache is loading 
> all of the modules as DSO.  Is the goal is to remove the rpms and create a 
> new /usr/lib/apache/libphp4.so file by compiling the PHP4 source code?
> 
> If so, how do I go about it?  The directions for PHP make it sound really 
> easy.  I tried them tho and the php files just show up as plain text.  Here 
> are the instructions I tried (that didn't work).
> 
> -Ed
> 
> 
> 
> 
> $ ./configure --with-mysql --with-apxs
> $ make
> $ make install
> 
> If you get an error telling you that the apxs script could not be found,
> look for it on your system and if you find it, provide the full path to it
> as: --with-apxs=/path/to/apxs
> 
> Next you must copy php.ini-dist to the appropriate place (normally
> /usr/local/lib/php.ini) and edit it as necessary to set PHP options.
> 
> The only thing left to do is to edit your httpd.conf file and make sure the
> PHP 4 mime type is there and uncommented.  You need a line that looks like
> this:
> 
>     AddType application/x-httpd-php .php
> 
> Then restart your server (apachectl restart) and you should be able to
> serve up PHP files now.  Make a test file called test.php and put some
> PHP tags in it.  Like <?phpinfo()?>, for example.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to