# mod_php, mod_perl Apache vs. Apache2

## polsen

When I emerge mod_perl it installs apache1.3 but then when I emerge mod_php it install apache2.0. Why the discrepency? 

I have the apache2 flag set in "use" so why did it install both apache-1.3.27-r4  and apache-2.0.47?

I need to get mod_perl, and php with any version apache of up and runnning asap. I don't really are which version of apache I use I just need both php and mod perl.

OK UPDATE:

I have mod_php running but only with apache2.

I have mod_perl running but only with apache1.

How can I get mod_php to work with apache1 and mod_perl or vice-versa?

Thanks

----------

## chardros

If you don't care which version of apache you use, you could set your use flag to: USE="apache -apache2" to run apache 1.  I don't know the status of mod_perl and apache2.

----------

## M_Kelder

The stable version of mod_perl only works with apache1. You have to wait a while until the 1.9x or higher version turned into stable, of you can install the unstable version.

----------

## polsen

So if I set USE="-apache2" mod_php will work with apache1? How do I go about getting rid of apache2 and the php that runs on it?

I previously did a emerge --unemerge mod_php. Is this the correct root?

THanks

----------

## chardros

1) Set your USE flag.

2) emerge unmerge apache mod_php

3) emerge mod_php mod_perl

----------

## polsen

Ok, So I modified the make.conf USE="-apache2"

then env-update

Then I emerge --unmerge apache mod_php mod_perl

then I emerge mod_php mod_perl and I get this

# emerge mod_php mod_perl

Calculating dependencies ...done!

>>> emerge (1 of 4) net-www/apache-2.0.47 to /

>>> md5 src_uri  httpd-2.0.47.tar.gz

It emerges apache2! WHY? its making me crazy.

----------

## kashani

Because the apache2 flag does not exist nor are there plans for one IIRC as nice as it might be. Check the GWN from two weeks ago on how to create a package mask to keep the apache1/2 crap from happening. 

kashani, still annoyed over the crappy way apache2 was added to portage

----------

## chardros

You're right kashani.  My bad; don't know why I was thinking the apache2 flag existed.  Annoying.

----------

## To

kashani I've realised that but I wasn't too worried cause I don't use mod_perl for example... but I can understand the paint of those who do.

Tó

----------

## kashani

 *chardros wrote:*   

> You're right kashani.  My bad; don't know why I was thinking the apache2 flag existed.  Annoying.

 

I haven't gotten around to fixing my apache masks so I just delete the Apache2 ebuild at the moment. I did notice this when doing an emerge -upv apache mod_ssl mod_php

[ebuild  N   ] dev-php/mod_php-4.3.2-r4  -apache2 -X +crypt -curl etc etc

Odd.

Ramin

----------

## squealie

 *kashani wrote:*   

> Because the apache2 flag does not exist nor are there plans for one IIRC as nice as it might be. Check the GWN from two weeks ago on how to create a package mask to keep the apache1/2 crap from happening. 
> 
> kashani, still annoyed over the crappy way apache2 was added to portage

 

 :Confused: 

http://www.gentoo.org/dyn/use-index.xml

----------

## DarkJedi9

Sorry, but I'm not seeing how you guys are saying the apache2 flag doesn't exist when it is in use.desc and the online list.

----------

## ianneub

I think they mean that the apache2 use flags don't control the package net-www/apache. They control things like mod_php and mod_ssl.

For ex. IF USE="apache2" then build mod_php with apache2 support ELSE use apache1 support.

----------

## DarkJedi9

 *ianneub wrote:*   

> I think they mean that the apache2 use flags don't control the package net-www/apache. They control things like mod_php and mod_ssl.
> 
> For ex. IF USE="apache2" then build mod_php with apache2 support ELSE use apache1 support.

 

Gotcha.  Thanks!

----------

## nathanpoole

Just an update for anyone who wants to use mod_perl 2, Libapreq is actually out for mp2 now, and that contains a lot of the really useful stuff, so it's not bad using the experimental source now (it is still a little bit of a moving target)

The only caveat is that it appears there's no ebuild for libapreq 2, but you can get it from CVS. (Check out http://httpd.apache.org/apreq/)

Mod perl 2 is great. The docs aren't great yet, but the integration with Apache is awesome.

NP

 *M_Kelder wrote:*   

> The stable version of mod_perl only works with apache1. You have to wait a while until the 1.9x or higher version turned into stable, of you can install the unstable version.

 

----------

## Apex

Well, first post ever...  :Very Happy: 

Is it possible to find the status of the mod_perl package somewhere? When it's supposed to turn stable, that is.

And, another question, what are all these other packages?

```

apex htdocs # emerge -pv mod_perl

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

Calculating dependencies ...done!

[ebuild  N    ] dev-perl/digest-base-1.05   5 kB

[ebuild  N    ] dev-perl/Digest-MD5-2.33   43 kB

[ebuild  N    ] dev-perl/Crypt-SSLeay-0.49   114 kB

[ebuild  N    ] dev-perl/MIME-Base64-3.00   13 kB

[ebuild  N    ] dev-perl/libnet-1.16   68 kB

[ebuild  N    ] dev-perl/URI-1.28   90 kB

[ebuild  N    ] dev-perl/HTML-Tagset-3.03-r2   7 kB

[ebuild  N    ] dev-perl/HTML-Parser-3.34-r1   73 kB

[ebuild  N    ] dev-perl/libwww-perl-5.69-r2  +ssl  201 kB

[ebuild  N    ] dev-libs/mm-1.2.1   211 kB

[ebuild  N    ] net-www/apache-1.3.29-r1  +pam  3,122 kB

[ebuild  N    ] dev-perl/mod_perl-1.27-r4  -ipv6  363 kB

Total size of downloads: 4,315 kB

```

compared to...

```

apex htdocs # ACCEPT_KEYWORDS="~x86" emerge -pv mod_perl

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

Calculating dependencies ...done!

[ebuild  N    ] app-admin/sudo-1.6.7_p5  +pam  341 kB

[ebuild  N    ] dev-perl/CGI-3.04   199 kB

[ebuild  N    ] dev-perl/mod_perl-1.99.11   1,067 kB

Total size of downloads: 1,608 kB
```

 :Question:   :Question:   :Question: 

----------

## bnahill

Alright, there is a later masked version of mod_perl that does not demand apache 1.3. Do 'ACCEPT_KEYWORDS="~x86" emerge mod_perl mod_php' 

Apache 2 is installed as a dependency and 1.3 is completely ignored. For those who wanted to use apache 1.x with mod_php, I have no solution, but this should work.

----------

## To

I'm not sure but I tink you have to inject net-www/apache-1.3.29-r1.

Tó

 *bnahill wrote:*   

> Alright, there is a later masked version of mod_perl that does not demand apache 1.3. Do 'ACCEPT_KEYWORDS="~x86" emerge mod_perl mod_php' 
> 
> Apache 2 is installed as a dependency and 1.3 is completely ignored. For those who wanted to use apache 1.x with mod_php, I have no solution, but this should work.

 

----------

## Determined

I also was trying to emerge mod_perl mod_php and was getting both apache-1.3 and apache-2 wanting to install.

In order to avoid this, and without having to remove packages that will simply be replaced on next sync, I created /etc/portage/package.mask and put in >=net-www/apache-2 thats it.

Also make sure you have -apache2 in your use variables because many ebuilds will use it.

Thank god for emerge -p.

Sorry for the delay  :Smile: 

----------

