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.
thanks ! just did “php5-sqlite port has been deleted” on google this morning, you’re first place, and you have a solution. I never thinked about reconfigure without sqlite before deleting the package.
Thanks for this. A couple of notes:
1. When reconfiguring the extensions, I think you want this command:
2. On a couple of my servers, I had to pkg_delete php5-sqlite3-5.3.13 as well as php5-sqlite-5.3.13. All went well after that.
Thanks for your comment. I modified the content for your cases. Thanks again.
patch 5.4 = http://pastebin.com/TMZBH5K8
Thanks, this was very helpful! I searched for this exact problem and your blog was the first hit on Google. I’ve never done a “make config” before so I learned something new too. It’s great that you took the time to post this and help others out!!
There’s a very minor type above that says “cd /usr/port/lang…” instead of “cd /usr/ports/lang…” – just for those who like to cut & paste.
Also, if you have bz2 extension installed you need to do a deinstall/reinstall on devel/autoconf