Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP5 wants to downgrade
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
destiney
n00b
n00b


Joined: 21 Dec 2003
Posts: 39

PostPosted: Mon Apr 04, 2005 12:55 pm    Post subject: PHP5 wants to downgrade Reply with quote

I installed PHP5 several months ago and it's been fine until recently. Every night via cron I run:

/usr/bin/emerge sync >/dev/null 2>&1
/usr/bin/emerge -pvuD --newuse --tree world

to see what might be newly released and need upgrading.

At some point a couple of weeks ago portage began wanting to downgrade my PHP:

These are the packages that I would merge, in reverse order:

Calculating world dependencies ..... ... ...done!
[ebuild NS ] dev-php/mod_php-4.3.10-r1 +X +apache2 -berkdb +crypt +curl -debug -doc -fdftk -firebird -flash -freetds +gd -gd-external +gdbm -gmp -hardenedphp +imap -informix -ipv6 +java +jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +nls -oci8 -odbc +pam +pdflib +png +postgres +qt -snmp +spell +ssl +tiff +truetype +xml2 -yaz 3,932 kB

But I have ~x86 keywords in place for PHP:

> cat /etc/portage/package.keywords
dev-php/mod_php ~x86
dev-php/php ~x86

I added those to get PHP5 installed in the first place.

When I heard 2005.0 was released I switched my link to the new profile thinking that might be the fix but it wasn't. What else must I configure or change to make portage stop wanting to downgrade my PHP5 to PHP4?
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Mon Apr 04, 2005 1:49 pm    Post subject: Reply with quote

mod_php 5.x was hardmasked through /usr/portage/profiles/package.mask because of incompatibilities with the threaded Apache 2 MPMs. If you run
Code:
emerge --pretend --verbose ">dev-php/mod_php-5"
it will tell you what was masked and why. Use the pretend and verbose options, they're there for a good reason :).
To fix it, make sure your apache-2 is compiled with only the prefork MPM (if you're using 2.0.53, disable all mpm_* USE flags with the exception of mpm_prefork) and add this to /etc/portage/package.unmask:
Code:
=dev-php/mod_php-5.0.3-r2
to unmask just dev-php/mod_php-5.0.3-r2, or
Code:
>dev-php/mod_php-5
to unmask all current and future versions of mod_php-5.
Note though that unmasking hardmasked packages means that if things break, you get to keep the pieces.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Scytale
n00b
n00b


Joined: 01 May 2003
Posts: 70
Location: Mannheim, BW, Germany

PostPosted: Mon Apr 04, 2005 1:52 pm    Post subject: Reply with quote

moocha wrote:
Use the pretend and verbose options, they're there for a good reason :).

He already does, but an emerge -Duva world (or similar) doesn't tell why it's masked.

But, thanks for the answer. *prepares his apache for php5 compatibility* ;)
_________________
Never stop using your brain.
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Mon Apr 04, 2005 2:01 pm    Post subject: Reply with quote

Scytale wrote:
moocha wrote:
Use the pretend and verbose options, they're there for a good reason :).

He already does, but an emerge -Duva world (or similar) doesn't tell why it's masked.
D'oh, thinko on my part :oops:. Ah well.
Scytale wrote:
But, thanks for the answer. *prepares his apache for php5 compatibility* ;)
For now it's recommended to not run PHP5 with any other MPM than prefork (or some other non-threaded MPM should one exist - I'm not very up to date on experimental MPMs). PHP as such is thread safe, but depending on which USE flags you have a lot of potentially or actually non-thread-safe extensions may get compiled in, and those break in very mysterious ways when the server is under load, although they may works just fine with little to no load on it. Multithreading bugs are annoyingly hard to track down...
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
destiney
n00b
n00b


Joined: 21 Dec 2003
Posts: 39

PostPosted: Mon Apr 04, 2005 2:08 pm    Post subject: Reply with quote

moocha wrote:
disable all mpm_* USE flags with the exception of mpm_prefork


What mpm_* flags?

> cat /usr/portage/profiles/use.desc | grep mpm

displays nothing.
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Mon Apr 04, 2005 2:12 pm    Post subject: Reply with quote

Checked use.local.desc lately? ;-) I search for USE flag descriptions this way, it's quicker and catches every one of them:
Code:
grep mpm /usr/portage/profiles/use*

_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
destiney
n00b
n00b


Joined: 21 Dec 2003
Posts: 39

PostPosted: Mon Apr 04, 2005 2:23 pm    Post subject: Reply with quote

My package.unmask now looks like:

> cat /etc/portage/package.unmask
>dev-php/mod_php-5

And I added -mpm-leader -mpm-metux -mpm-peruser -mpm-threadpool -mpm-worker to my USE flags in /etc/make.conf.

Now I get this:

> emerge -pvuD --newuse world

These are the packages that I would merge, in order:

Calculating world dependencies -
!!! All ebuilds that could satisfy ">=net-www/apache-2.0.52-r3" have been masked.
!!! One of the following masked packages is required to complete your request:
- net-www/apache-2.0.52-r3 (masked by: ~x86 keyword)
- net-www/apache-2.0.53 (masked by: ~x86 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
section 2.2 "Software Availability" in the Gentoo Handbook.
!!! (dependency required by "dev-php/mod_php-5.0.3-r2" [ebuild])


!!! Problem with ebuild dev-php/mod_php-5.0.3-r2
!!! Possibly a DEPEND/*DEPEND problem.

!!! Depgraph creation failed.
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Mon Apr 04, 2005 2:27 pm    Post subject: Reply with quote

Well,
emerge wrote:

- net-www/apache-2.0.52-r3 (masked by: ~x86 keyword)
- net-www/apache-2.0.53 (masked by: ~x86 keyword)
For more information, see MASKED PACKAGES section in the emerge man page or
section 2.2 "Software Availability" in the Gentoo Handbook
How about reading that? You're going to be stumbling into masked packages sooner or later anyway. Please do.
Also, note that the configuration file layout has changed considerably in 2.0.53.
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Mon Apr 04, 2005 2:28 pm    Post subject: Reply with quote

Please follow up to https://forums.gentoo.org/viewtopic-t-296192.html

Moved from Portage & Programming.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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