View previous topic :: View next topic |
Author |
Message |
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Tue Feb 21, 2006 10:06 pm Post subject: Upgrading PHP on Gentoo |
|
|
Upgrading PHP
Gentoo's PHP herd have been making lots of changes to the PHP packages that are available in the Portage tree. These changes will give you access to the latest PHP4 and PHP5 packages as well as support for PECL and PEAR packages.
Some older packages are no longer supported, this includes dev-php/php, dev-php/php-cgi and dev-php/mod_php. These packages have all been rolled into one with the new dev-lang/php package, controlled by various USE flags. The older packages will be package masked at the end of March 2006 and removed from the tree one month after that.
To continue using PHP on Gentoo you should upgrade to dev-lang/php
You should follow the PHP Upgrade Guide for instructions on how to upgrade to the new packages. You can now also have a mixed PHP4 and PHP5 environment, instructions for doing so can be found here.
If you were using mod_php before you should build dev-lang/php with either the apache or apache2 USE flags, if you were using dev-php/php you should use the cli USE flag and if you were using php-cgi you should use the cgi and force-cgi-redirect USE flags. Other recommended USE flags can be found in the upgrade guide.
Support
You can get help with any PHP issues here on the forums, in the #gentoo-php IRC channel on irc.freenode.net or if you think you've found a bug please report it in Gentoo's Bugzilla.
Links
PHP herd page
PHP Upgrade Guide
Configure Apache to work with PHP4 and PHP5
Gentoo PHP overlay and Wiki
Gentoo's Bugzilla _________________ Search | Read | Answer | Report | Strip
Last edited by tomk on Tue Jun 27, 2006 7:47 pm; edited 1 time in total |
|
Back to top |
|
|
adelante Tux's lil' helper
Joined: 19 Apr 2003 Posts: 133 Location: South Africa - Johannesburg
|
|
Back to top |
|
|
llongi Retired Dev
Joined: 15 Apr 2004 Posts: 459 Location: Switzerland
|
Posted: Mon Apr 17, 2006 2:01 am Post subject: |
|
|
UPDATE:
The PHP Herd announces that the old-style PHP packages, which were unsupported and deprecated for months, are finally going away.
After months of work, the team considers the new dev-lang/php package and the related dev-php[4,5]/ categories fully ready for production use, and encourage all users to upgrade.
Helpful informations can be found at the PHP project's pages, along with a HOWTO regarding the migration to dev-lang/php.
The old-style PHP packages (dev-php/php, dev-php/php-cgi, dev-php/mod_php, dev-php/PECL-*, and older dev-php/PEAR-* packages) will be package.masked on Wednesday, 19 April 2006, and removed from the Portage tree about a month later. _________________ Best regards, Luca. |
|
Back to top |
|
|
RaZoR1394 Guru
Joined: 09 Jan 2005 Posts: 356
|
Posted: Sun Apr 23, 2006 4:18 pm Post subject: |
|
|
Thank god I found this thread. I had no idea why all the "old style" php packages were masked. _________________ http://en.wikipedia.org/wiki/Cell_(microprocessor) |
|
Back to top |
|
|
lazyleopard n00b
Joined: 06 Nov 2003 Posts: 58
|
Posted: Tue May 02, 2006 10:58 pm Post subject: |
|
|
One thing the docs about upgrading php and using both php4 and php5 don't mention is what you should do if you only want php4 installed. Once the new php4 is installed, an "emerge world" will inevitably pull php5 in as well, and because of the way things are done, php5 becomes the default until such time as you set the default back to php4.
Creating (or editing) /etc/portage/package.mask to include the line
would seem to do the trick. |
|
Back to top |
|
|
budgee n00b
Joined: 19 Aug 2003 Posts: 17
|
Posted: Mon May 15, 2006 2:52 pm Post subject: How do I remove the masked packages |
|
|
Hi All
I have a bunch of servers still running the old packages. I cannot unmerge them because they are masked, how then do I remove them?
I have tried to comment them out in /usr/portage/profile/packages.mask but portage still seems to think the package does not exist.
Should I instead just:
rm -rf /usr/lib/php4
rm -rf /usr/lib/php5
rm -rf /usr/lib/apache2/modules/libphp4.so |
|
Back to top |
|
|
Monkeh Veteran
Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Mon May 15, 2006 6:45 pm Post subject: Re: How do I remove the masked packages |
|
|
budgee wrote: | Hi All
I have a bunch of servers still running the old packages. I cannot unmerge them because they are masked, how then do I remove them?
I have tried to comment them out in /usr/portage/profile/packages.mask but portage still seems to think the package does not exist.
Should I instead just:
rm -rf /usr/lib/php4
rm -rf /usr/lib/php5
rm -rf /usr/lib/apache2/modules/libphp4.so |
You should unmask them in /etc/portage/package.unmask, then once removed, remove them from package.unmask. |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Mon May 15, 2006 7:12 pm Post subject: |
|
|
There's no need to unmask them, portage will let you unmerge a package that is masked. _________________ Search | Read | Answer | Report | Strip |
|
Back to top |
|
|
budgee n00b
Joined: 19 Aug 2003 Posts: 17
|
Posted: Mon May 15, 2006 8:09 pm Post subject: |
|
|
I know it is installed:
Code: |
gateway ~ # genlop mod_php
* dev-php/mod_php
Thu Sep 15 16:38:42 2005 >>> dev-php/mod_php-4.4.0
Thu Sep 29 04:02:29 2005 >>> dev-php/mod_php-4.4.0-r3
Tue Oct 11 15:52:08 2005 >>> dev-php/mod_php-4.4.0-r3
|
But I cannot remove it:
Code: |
gateway ~ # emerge -C dev-php/mod_php
--- Couldn't find dev-php/mod_php to unmerge.
>>> unmerge: No packages selected for removal.
|
Even after commenting "dev-php/mod_php" out of /usr/portage/profiles/package.mask or adding "dev-php/mod_php" to /etc/portage/package.unmask:
Code: |
gateway ~ # emerge -C dev-php/mod_php
--- Couldn't find dev-php/mod_php to unmerge.
>>> unmerge: No packages selected for removal.
|
|
|
Back to top |
|
|
budgee n00b
Joined: 19 Aug 2003 Posts: 17
|
Posted: Mon May 15, 2006 8:24 pm Post subject: |
|
|
Ok, well I can say with much embarrassment that it appears I have already removed these packages. Adding the -u flag to genlop makes all the difference:
Code: |
gateway ~ # genlop dev-php/mod_php -u
* dev-php/mod_php
Thu Sep 15 16:38:42 2005 >>> dev-php/mod_php-4.4.0
Thu Sep 29 04:02:29 2005 <<< dev-php/mod_php-4.4.0
Thu Sep 29 04:02:29 2005 >>> dev-php/mod_php-4.4.0-r3
Mon Oct 3 22:37:52 2005 <<< dev-php/mod_php-4.4.0-r3
Tue Oct 11 15:52:08 2005 >>> dev-php/mod_php-4.4.0-r3
Tue Oct 11 17:59:52 2005 <<< dev-php/mod_php-4.4.0-r3
gateway ~ # genlop dev-php/php -u
* dev-php/php
Thu Sep 15 16:41:54 2005 >>> dev-php/php-4.4.0
Thu Sep 29 19:32:11 2005 >>> dev-php/php-4.4.0
Fri Sep 30 19:44:02 2005 <<< dev-php/php-4.4.0
Fri Sep 30 19:44:02 2005 >>> dev-php/php-4.4.0-r1
Sat Oct 1 01:14:41 2005 >>> dev-php/php-4.4.0-r1
Mon Oct 3 22:38:27 2005 <<< dev-php/php-4.4.0-r1
Tue Oct 11 15:55:31 2005 >>> dev-php/php-4.4.0-r1
Tue Oct 11 17:59:54 2005 <<< dev-php/php-4.4.0-r1
Wed Oct 12 20:30:06 2005 >>> dev-php/php-4.4.0-r1
Wed Oct 12 20:37:03 2005 <<< dev-php/php-4.4.0-r1
|
My apologies for the wild goose chase.
For those who may wonder, libphp4.so still exists from a dev-lang/php-4.4.0-r1 installation, and the /usr/lib/php4 folder is used by this? To remove dev-lang/php-4.* just emerge -P dev-lang/php or emerge -C dev-lang/php-4.* |
|
Back to top |
|
|
|