Reinstalling PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi, I am running SUSE 9.2 with PHP 4.3.11 (with Apache2 and MySQL 4.0.21).
Unfortunately PHP was configured with sessions and mysql support disabled,
so I want to change this with minimum of hassle. I don't want to risk
breaking any current PHP scripts or dependancies on my server.

I used phpinfo(); to get the current configuration of PHP
I downloaded the sources for PHP 4.3.11
I ran ./configure using the same configuration as reported in phpinfo(); but
enabling sessions and MySQL
I then ran make

So far so good. No errors. I understand that all I need to do now is run
make install and restart apache.

What is the chances that this will work without any problems, or is this
likely to break things?
What can I do now before installing to enable me to revert to the current
PHP in case things do break? How could I examine the makefile to determine
which files would be replaced, so I can back up the existing ones, for

Thanks for the help!


Re: Reinstalling PHP

Chances of it working - very good.

How ever the current version of php was installed, reinstall the same
way to revert back. Check that you can do this before installing custom
code. (I'm assuming your working on a live server, hence the need to
get it back up quickly).

Now I use Ubuntu and to get mysql and postgresql working I had to
install some extra packages which loaded as php extensions. If I were
you I would check to see if the same thing happens in SuSE because it
seems unlikely that SuSE would not provide a PHP that can cope with
mysql. If you find that there are such packages then you may need to
update php.ini to load them as extensions.

Re: Reinstalling PHP

Quoted text here. Click to load it

Thanks for the advice fletch - yes, it's a live server. :)


Re: Reinstalling PHP

If you're really paranoid you could set up another instance of a
webserver. Compile apache into another directory say: configure
--prefix=/usr/local/apachetest .Do the same with php: configure
--prefix=/usr/local/phptest. Copy php.ini to
/usr/local/phptest/lib/php.ini. Edit
/usr/local/apachetest/conf/httpd.conf and change Port 80 to Port 81 so
it won't conflict with your production server. Start the server and
copy the htdocs folder from your production site to
/usr/local/apachetest. Point your browser to .
You should see a mirror image of your production site with the new
functions your compiled in. Once you'r feeling confident then go ahead
and compile for the production server.

Site Timeline