Web Hosting Talk







View Full Version : help! PHP installation/upgrade


chuckt101
02-17-2002, 10:46 PM
I need help upgrading the PHP installed on my server! :bawling:

I read the installation docs.. but they are all for new installs, not upgrades. Are they the same thing? Because some have apache setup instructions. I don't want to mess with apache.

Do I just skip the apache configuration lines?

:confused: :( :bawling:

The thing is, I'm getting this error message:
Warning: mail() is not supported in this PHP build in /path/to/my/php.script

I looked that up and found out that meant that PHP was installed before sendmail and the way to fix it was to recompile the PHP installed on my system. I have v4.0.6 on redhat linux 7.2

Any guidance would be much appreciated :)

The Prohacker
02-17-2002, 11:10 PM
Unless your running as a CGI, I'm pretty sure your going to want to compile with apache....


Just do your configure, get that line from a phpInfo(); page, and take out all the ' ', run that, do a make, and a make install

I know I know, its short, but you might be able to figure it out...

chuckt101
02-18-2002, 05:42 PM
mind saying that using a little more words? :D

mkaufman
02-19-2002, 05:38 PM
Make a page called phpinfo.php with the following code:


<?php
phpinfo();
?>


You will see table, look for the "Configure Command" row, it will say something like:

'./configure' '--with-mysql=/usr/local/' '--with-apxs=/www/bin/apxs'

Take out the ' and turn it into:

./configure --with-mysql=/usr/local/ --with-apxs=/www/bin/apxs

--

Yours of course will probably be different, but that basically explains it.

Next, type "make", then shutdown apache and type "make install" and then start apache backup - and it should work :)

freakysid
02-20-2002, 06:29 AM
Originally posted by mkaufman
--with-apxs=/www/bin/apxs


Hopefully, you have php compiled as a dynamic loaded module as the above indicates. If this is the case, then it is easy to recompile PHP and you don't need to recomplile php into apache (as you would if php has been compiled into apache as a static module).

What this switch will do is build a binary named something like:

path/to/apache/libexec/libphp4.so

First thing to do is backup your current build of libphp4.so incase you want to restore your current build.

Then recompile (read the php source distro README files) and install. This should place a new libphp4.so binary in your /...../apache/libexec directory.

Once you have installed your new build of php you will need to restart apache and hopefully your new build of php will be loaded into apache.

That is all assuming that you are loading php into apache as a dynamically loaded module.