upgrading php on rhel3 - I did it
This was pretty frustrating for me, so I thought I'd explain how I
ended up doing it (with lots of help from other posts of course)
upgrading php on rhel3
rhel3 comes with php 4.3.2 and I needed to install 4.4.4. steps:
get bison src rpm (get it on rpmfind.net) for rhel and install it (php
needs it for configure)
rpm -i bison...
untar it from rpm src dir:
cd /usr/src/redhat/SOURCES/
tar -xvf bison...
configure and install it
cd bison...
../configure
make
make install (I think I got an error here, but it worked with make
test)
do the same as above for flex src rpm (php needs it for configure)
do the same for httpd-devel rpm (because the install needs apxs, which
apache uses to build modules (or something))
untar your php in /usr/local/
../configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
make
make install
copy /usr/local/phpdir/modules/libphp4.so to /etc/httpd/modules/ (you
might want to back up the existing libphp4.so, which is for php4.3.2.3,
before doing this)
edit /etc/httpd/conf.d/php.conf
add line
AddType application/x-httpd-php .php .phtml
at this point I was getting php source code showing up in the web
browser and "an unknown filter was not added: PHP" errors in the apache
error log. commenting out the following fixed this.
comment out the lines
#<Files *.php>
# SetOutputFilter PHP
# SetInputFilter PHP
# LimitRequestBody 524288
#</Files>
apachectl restart
hth
josh
|