When PHP 5.4 was available few months ago, I was hesitated to upgrade my FreeBSD box to upgrade to 5.4, because it comes with lots of big changes, including removing LOTS of old stuffs that were available in 5.3 or earlier versions.
Today PHP 5.4.3 becomes available in FreeBSD ports. I guess it is stable enough and I should give it a try, and I am glad that I tried it in my test machine first.
Warning: Before you upgrade to PHP 5.4, make sure that you are not using any of the following packages, because they are not compatible with the PHP 5.4. Unfortunately, I don’t have a solution yet. Basically, I could not get them compiled.
- eAccelerator: /usr/ports/www/eaccelerator/
- PECL-TokyoTyrant: /usr/ports/databases/pecl-tokyo_tyrant/ (Updated: I just came up a solution here)
When I performed the upgrade using the following command:
sudo portsnap fetch update sudo portmaster -Da
I got the following error message:
===>>> The databases/php5-sqlite port has been deleted: Removed from core php ===>>> Aborting update
The reason why you see this problem because php5-sqlite is no longer available in PHP 5.4. In order to solve this problem, you will need to delete the php5-sqlite extension.
cd /usr/ports/lang/php5-extensions sudo make config
Uncheck the following: sqlite3 support
Now, deinstall this port. Yes, let’s remove it and install it again. (I’ve tried the reinstall option and it didn’t work, so let’s stick with deinstall and install.
sudo make deinstall clean install clean
Now let’s find out which php-SQLite we should delete:
pkg_info | grep php5-sqlite
In my case, I deleted this one:
sudo pkg_delete php5-sqlite-5.3.13
Now upgrade the port again and FreeBSD should be happy about it. Enjoy PHP 5.4.
If you found this solution useful, would you like to visit the following sponsors?