Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Upgrading PHP on Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Tue Feb 21, 2006 10:06 pm    Post subject: Upgrading PHP on Gentoo Reply with quote

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
View user's profile Send private message
adelante
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2003
Posts: 133
Location: South Africa - Johannesburg

PostPosted: Fri Feb 24, 2006 12:32 pm    Post subject: Reply with quote

Hi tomk,

https://forums.gentoo.org/viewtopic-t-436890-highlight-phpcgi.html
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Mon Apr 17, 2006 2:01 am    Post subject: Reply with quote

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
View user's profile Send private message
RaZoR1394
Guru
Guru


Joined: 09 Jan 2005
Posts: 356

PostPosted: Sun Apr 23, 2006 4:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
lazyleopard
n00b
n00b


Joined: 06 Nov 2003
Posts: 58

PostPosted: Tue May 02, 2006 10:58 pm    Post subject: Reply with quote

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
Code:
>=dev-lang/php-5.0

would seem to do the trick.
Back to top
View user's profile Send private message
budgee
n00b
n00b


Joined: 19 Aug 2003
Posts: 17

PostPosted: Mon May 15, 2006 2:52 pm    Post subject: How do I remove the masked packages Reply with quote

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
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Mon May 15, 2006 6:45 pm    Post subject: Re: How do I remove the masked packages Reply with quote

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
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Mon May 15, 2006 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
budgee
n00b
n00b


Joined: 19 Aug 2003
Posts: 17

PostPosted: Mon May 15, 2006 8:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
budgee
n00b
n00b


Joined: 19 Aug 2003
Posts: 17

PostPosted: Mon May 15, 2006 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum