Having fun with PHP
Tried to upgrade PHP on the Fedora Core 6. I've been so depended on yum for the all the packages management but I've decided to install it from the source code. If something breaks, I could just reinstall PHP again from the yum. And it ended up breaking web server.
This is what I did and what went wrong.
$ wget http://us3.php.net/get/php-5.2.1.tar.gz/from/this/mirror
$ tar xvzf php-5.2.1.tar.gz
$ cd php-5.2.1
$ ./configure ....
configure: error: Sorry, I cannot run apxs. Either you need to install Perl or you need to pass the absolute path of apxs by using --with-apxs=/absolute/path/to/apxsPerl was already installed on the machine but not apxs. The httpd-devel package contains apxs so I've installed:
$ yum install httpd-devel
And again with aspell package:
configure: error: Cannot find pspell
$ yum install pspell-devel
And finally installed PHP:
$ make
$ make install
$ /etc/init.d/httpd restart
Oops, I just copied and pasted configuration commands from phpinfo without checking it. After the installation, it was clear that it had --without-mysql. It also disabled quite few features that I used on web server but the MySQL was the main thing.
None of PHP apps was working and I didn't want to screwed up the system any further, I've reinstalled PHP using yum.
$ rpm -e --justdb --nodeps
$ yum install php
$ /etc/init.d/httpd restart
Now, everything's back to normal.
No comments:
Post a Comment