Gentoo Forums
Gentoo Forums
Quick Search: in
mod_php not emerge-ing properly with multiple apaches
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
mr-simon
Guru
Guru


Joined: 22 Nov 2002
Posts: 314
Location: Leamington Spa, Warks, UK

PostPosted: Thu Jan 01, 2004 12:17 pm    Post subject: mod_php not emerge-ing properly with multiple apaches Reply with quote

I'm trying to install mod_php into apache1 and apache2.

I have both apaches installed and working (different ports, obviously) and have both "apache" and "apache2" in my USE flags.

I am attempting to emerge mod_php as follows:
Code:
#emerge mod_php
#USE="-apache2" emerge mod_php
IIRC mod_php is supposed to be SLOTed so that this would work. But it doesn't. Each merge cleans out the old php module. So...
Code:
#emerge mod_php
...
#updatedb
#locate libphp4.so
/usr/lib/apache2-extramodules/libphp4.so
#USE="-apache2" emerge mod_php
...
#updatedb
#locate libphp4.so
/usr/lib/apache-extramodules/libphp4.so
#emerge mod_php
...
and only the apache2 .so will be on the machine again

I am going round in circles. How can I get both copies to stay on the machine at the same time? It's mod-php 4.3.3-r3, incidentally.
_________________
"Pokey, are you drunk on love?"
"Yes. Also whiskey. But mostly love... and whiskey."
Adopt an unanswered post
Back to top
View user's profile Send private message
dawithers
n00b
n00b


Joined: 17 Oct 2003
Posts: 54

PostPosted: Thu Jan 01, 2004 5:48 pm    Post subject: Reply with quote

perhaps I'm wrong, but to manually correct this you can just copy libphp4.so from the one extramodules folder to the folder of the other version, or just make sure your setting in the apache config is specific to the file location. As long as you have the correct line in your apache2 config as to the location of your libphp4.so it doesn't really matter whether or not the file is in the "default" location that it would be put if emerged for that specific version.

for my apache2 config I have libphp4.so in these locations:

/usr/lib/apache2-extramodules/libphp4.so
/etc/apache2/extramodules/libphp4.so

my apache2.conf has these lines added to make it work:

Code:

LoadModule php4_module                   extramodules/libphp4.so
AddType application/x-httpd-php .php


I imagine if you just emerged mod_php for the older version of apache and set it up, and then copied libphp4.so to those directories i show above, and add those two lines to your apache2.conf you should be in business.
_________________
http://drew.withers.sytes.net
Back to top
View user's profile Send private message
mr-simon
Guru
Guru


Joined: 22 Nov 2002
Posts: 314
Location: Leamington Spa, Warks, UK

PostPosted: Thu Jan 01, 2004 5:57 pm    Post subject: Reply with quote

Aye, I did this and everything seemed okay.

Still, would be nice for the ebuilds to work as advertised... I get a funny feeling that I'll end up forgetting about this and breaking something, next time I upgrade php!
_________________
"Pokey, are you drunk on love?"
"Yes. Also whiskey. But mostly love... and whiskey."
Adopt an unanswered post
Back to top
View user's profile Send private message
mr-simon
Guru
Guru


Joined: 22 Nov 2002
Posts: 314
Location: Leamington Spa, Warks, UK

PostPosted: Thu Jan 01, 2004 5:57 pm    Post subject: Reply with quote

Aye, I did this and everything seemed okay.

Still, would be nice for the ebuilds to work as advertised... I get a funny feeling that I'll end up forgetting about this and breaking something, next time I upgrade php!
_________________
"Pokey, are you drunk on love?"
"Yes. Also whiskey. But mostly love... and whiskey."
Adopt an unanswered post
Back to top
View user's profile Send private message
dawithers
n00b
n00b


Joined: 17 Oct 2003
Posts: 54

PostPosted: Thu Jan 01, 2004 6:02 pm    Post subject: Reply with quote

upon further inspection i realized there is a folder created by php with default copies of configs specific to the apache version

/etc/php/apache2-php4/

more specifically, it contains the two libraries libphp4.so and mod_ssl.so along with php.ini. But like i said before, it doesnt matter where the libphp4.so is located. i also found a copy of php.ini the

/etc/apache2/conf/php.ini

so, as long as that php.ini file is in your apache2 conf folder and you have the correct lines in your apache2.conf you should be fine.

Another alternative which I think is kind of a dirty way of doing it, would be to emerge mod_php for the older apache, then remove its existance from the world file, and emerge for apache2. at least from what I know, that would make it think that mod_php wasnt already installed and would therefore not remove it when it was emerged for apache2.

just my two cents
_________________
http://drew.withers.sytes.net
Back to top
View user's profile Send private message
dawithers
n00b
n00b


Joined: 17 Oct 2003
Posts: 54

PostPosted: Thu Jan 01, 2004 6:04 pm    Post subject: Reply with quote

Quote:
Still, would be nice for the ebuilds to work as advertised... I get a funny feeling that I'll end up forgetting about this and breaking something, next time I upgrade php!


well if you were to make the line in your apache2.conf directed to the older apache's copy of php, when the php file was updated, they would both be using the same library and it would be updated for both. or i supposed u could just copy the newer one to your liking again.
_________________
http://drew.withers.sytes.net
Back to top
View user's profile Send private message
mr-simon
Guru
Guru


Joined: 22 Nov 2002
Posts: 314
Location: Leamington Spa, Warks, UK

PostPosted: Fri Jan 02, 2004 10:41 am    Post subject: Reply with quote

dawithers wrote:
Quote:
Still, would be nice for the ebuilds to work as advertised... I get a funny feeling that I'll end up forgetting about this and breaking something, next time I upgrade php!


well if you were to make the line in your apache2.conf directed to the older apache's copy of php, when the php file was updated, they would both be using the same library and it would be updated for both. or i supposed u could just copy the newer one to your liking again.


Do apache2 .so's work with apache1? I thought they had to be compiled differently.

Either way if other people are seeing this then the ebuilds are probably broken. I should go file a bug.
_________________
"Pokey, are you drunk on love?"
"Yes. Also whiskey. But mostly love... and whiskey."
Adopt an unanswered post
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