PHP4 install question
| From: | Ed Lazor | Date: | Sun, 25 Feb 2001 04:01:00 +0000 |
| Subject: | PHP4 install question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41534@lists.php.net to get a copy of this message | ||
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.soI'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.