I have upgraded PHP to version 5.x on one of our company's main servers. The reason was that well.. pretty stupid. I'm currently working on a project for some direct mailing, and all the processing is performed by a script residing on a server, and fed with the input of procmail. Once the script receives a text of an email it parses it and well.. either adds sender of the mail to the list or removes it from the list.
The script is called by means of Unix shell scripts, so I had this thing:
!#/usr/bin/php
which turned out to be the wrong version of php, not the one I compiled myself, so some of functions I needed just were "undefined". It tooks some time to figure out that the path was wrong, and during that time I made that 4>5 upgrade only to find out that mb_* functions still are not defined, and then _finally_ I have decided to check the path of PHP executable :) And but of course it turned out to be wrong, and the right one was:
#!/usr/local/bin/php
The upgrade was painless. Although I had to upgrade my libXML installation, and also set the path to mySQL headers (for PHP 4.x setting --with-mysql was enough, but that's not the case for version 5). This type of install is for shared module PHP, though.
installing libXML
ftp://ftp.gnome.org/mirror/gnome.org/sources/libxml2/2.6/libxml2-2.6.22.tar.gz
tar zxvf libxml2-2.6.22.tar.gz
cd libxml2-2.6.22
make
sudo make install
now to the PHP
wget http://jp.php.net/distributions/php-5.1.1.tar.bz2
bunzip2 php-5.1.1.tar.bz2
tar xvf php-5.1.1.tar
cd php-5.1.1
./configure –with-mysql=/usr/local/mysql –with-apxs=/usr/local/apache/bin/apxs –enable-ftp –enable-mbstring=ja
make
sudo make install
It would be a good idea to disable old php4 modules in apache (/usr/local/apache/conf/httpd.conf) I guess.
Then just restart apache and voila! Everything works now, so I'm a happy camper, and a good thing is that upgrade didn't break any of my scripts, which is the only thing I worried about.