# mod_php Update Problem

## zeveck

When I try emerge -up mod_php I get:

```

[ebuild   NS    ] dev-php/mod_php-5.0.4

```

But, I already have mod_php-5.0.3-r2 installed...why would it try to do a new parallel install rather than update the existing install?

The relevent line in /etc/portage/package.use is:

```

>=dev-php/mod_php-5.0.3-r2

```

----------

## UgolinoII

do you still have a mod-php-4.x.x installed?

what does 

```
qpkg -I | grep php
```

and

```
etcat -v mod_php
```

say?

according to portage, all versions up to 5.0.3-r1 seem to be slot(0), then 5.0.3-r2 is slot(1) then 5.0.4 is slot(2) not sure why but there it is.

I seem to remeber unmerging mod_php recently (seg fault issues with a recent apache upgrade) which is why I probably didnt notice this peculiarity when I emerged 5.0.4

----------

## zeveck

I don't think I ever had mod_php 4.x installed.

What exactly does it mean for mod_php (or anything for that matter) to be in different slots? Does it affect what it works with? How do I check what slot something is in?

My system does not recognize qpkg or etcat as commands.  :Sad: 

What do I have to emerge to use them? I have gentoolkit emerged...but that doesn't seem to contain them.

----------

## uraes

my problem is bit different, but I try to post it here before to create new topic

I installed php5 and mod_php5. As I remember I uninstalled php4 and mod_php4 before installed 5. And now I get this blocking at emerge -up world : 

```

[blocks B     ] >=net-www/apache-2.0.54-r10 (is blocking dev-php/mod_php-4.3.11)

/.../

[ebuild  NS   ] dev-php/mod_php-4.3.11

```

information for those packages ..

```

# qpkg -I | grep php

dev-php/PEAR-Archive_Tar *

dev-php/PEAR-Console_Getopt *

dev-php/PEAR-PEAR *

dev-php/PEAR-XML_RPC *

dev-php/mod_php *

dev-php/php *

```

```

# etcat -v mod_php

[ Results for search key           : mod_php ]

[ Candidate applications found : 17 ]

 Only printing found installed programs.

*  dev-php/mod_php :

        [   ] 4.3.8 (0)

        [M~ ] 4.3.9_rc1 (0)

        [   ] 4.3.9 (0)

        [   ] 4.3.10 (0)

        [M~ ] 4.3.10-r1 (0)

        [   ] 4.3.11 (0)

        [M~ ] 4.3.11-r1 (0)

        [M~ ] 4.3.11-r2 (0)

        [M  ] 5.0.0 (50)

        [M~ ] 5.0.0-r1 (0)

        [M~ ] 5.0.1 (0)

        [M~ ] 5.0.2 (0)

        [M~ ] 5.0.2-r1 (0)

        [M~ ] 5.0.3 (0)

        [M~ ] 5.0.3-r1 (0)

        [M~ ] 5.0.3-r2 (1)

        [M I] 5.0.4 (2)

```

and unmask is like that:

```

# more /etc/portage/package.unmask

>=dev-php/mod_php-5.0.0

```

Why portage wants to upgrade php4 and how to make it to understand, that there is no need to upgrade mod_php4 but only mod_php5?

----------

## SQLBoy

Whomever maintains the mod_php/apache stuff has done a pretty poor job recently, not like I could do better or anything.  I realize php has a ton of deps and right now they are making portage tree changes but for the past year its kinda sucked.  I actually stopped using the portage versions and just compile and install from the original source tarballs because of all the slotting mixups and problems that have occurred in the past.

I think right now, the only 5.0.x version in portage is 5.0.4 and that for some reason. They are trying to build some gentoo webroot thing, I guess to try and bring all the LAMP apps under one umbrella.

I hope its all worked out soon.  I like the good old days when Gentoo had the new Apache and PHP working together correctly the day it came out.  Anyway, right now the only way to run Apache 2.x and mod_php is to unmask the webroot stuff, otherwise it will default to using apache 1.3.x.

----------

## stuherbert

uraes, your problem is that you're running stable Apache2 ... the mod_php-5 package requires the unstable Apache2 packages.

Hopefully, we'll get the new Apache 2 packages stable before too long.

Best regards,

Stu

----------

## roRisc

Bumped in this too.

can't emerge apache 2.0.54-r11

even though unmasked, only apache 2.0.54-r7 is listed with $ emerge -s apache.

I was reading a php5 book, and was ready to try the OOP stuff in there.

It would be great to have it running soon.

Thank you.

----------

## teemow

I have a pretty similar problem.

At first I had a problem emerging php-5.0.4, but php-5.0.4-r1 solved this for me.

Cause of the dependency on apache-2.0.54-r11, I still have mod_php-5.0.2 installed. If I add the ~x86 keyword for apache, apr, apr-utils and gentoo-webroot emerging is blocked by subversion. This is really bad, cause there is no mod_php-5 ebuild in the tree anymore and I stupidly updated readline to 3.0.

For now mod_php-5.0.2 is working until I have to restart apache :-/

----------

## roRisc

teemow, how'd you get apache -r11 emerged?

----------

## UgolinoII

Try this.

```
# cat /etc/portage/package.keywords

dev-php/mod_php ~x86

net-www/apache ~x86

dev-libs/apr ~x86

dev-libs/apr-util ~x86

net-www/gentoo-webroot-default ~x86
```

then stop apache & clear out old packages

```
# /etc/init.d/apache2 stop && emerge -C apache php mod_php apr apr_util gentoo-webroot-default
```

remove the source files from portage

```
# cd /usr/portage/distfiles

# rm apr-* httpd-* php-*
```

re-emerge 

```
# emerge -av apache mod_php
```

update your config files

```
# etc-update
```

restart apache

```
/etc/init.d/apache2 start
```

and be *very* aware of firefox's tendancy to cache files. Paricularly when attempting to test that mod_php is working again. I have lost count of the number of times that I have actually got mod_php loaded, but firefox still wants to download its cached version of ../phpinfo.php, without the server parsing the file first.

----------

