Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86498 - request for SLOT of php-cgi-4.x and php-cgi-5.x
Summary: request for SLOT of php-cgi-4.x and php-cgi-5.x
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-24 03:34 UTC by Allen Parker
Modified: 2005-08-25 07:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allen Parker 2005-03-24 03:34:10 UTC
If we were to allow slotting of php-cgi-4.x and php-cgi-5.x it would allow enterprising systems administrators to allow both php5 and php4 support in virtual hosting environments without requiring an overlay.Comments?
Comment 1 Christian Gut 2005-05-10 13:11:20 UTC
Is there any progress or any thoughts about this one?
Comment 2 Paweł Stradomski 2005-05-12 13:14:32 UTC
I agree. It would be a good idea - not only with php-cgi, but with mod_php too. 

I am using both mod_php-4 and mod_php-5 - i had to manually change ebuilds of ver.4 to: SLOT="4_${APACHEVER}"

Both modules work, as long as they are not loaded simultanously. So i only have to change /etc/conf.d/apache2 when I switch versions of PHP.
Comment 3 Tarmo Tänav 2005-05-15 04:47:27 UTC
I'd also like this, so I could direct files with the extension .php5 to php-cgi-5 and .php to php-cgi(-4) on my virtual hosting server.
Comment 4 Tarmo Tänav 2005-05-15 09:42:41 UTC
I've got php-cgi-5 working side-by-side with php-cgi-4, but I'm unsure if there are any problems with my setup. I modified php-cgi-5 ebuild to install the binary as /usr/bin/php-cgi-5 and to not require dev-php/php-5 to be installed (this is the part that I think could be a problem).
This setup allowed me to configure two spawn-fcgi instances for lighttpd, one for .php and the other for .php5 files, both seem to work fine, but I haven't done extensive testing.
I also got the same setup working with apache-2, suexec, php-cgi+mod_fastcgi.

What does not work so well is eaccelerator which builds itself for the dev-php/php version which is currently installed, but since you can't have both php-4 and php-5 installed you also can't have eaccelerator installed for both php versions. What does work is if you install eaccelerator while php-4 is installed, then backup the eaccelerator.so file, emerge php-5 and again eaccelerator which gives you another eaccelerator.so. So now, when you have eccalerator.so for both php4 and php5 just make sure that php.ini for php4 points to the one you backuped earlier.

If anyone has any ideas about how to solve this problem in a better way or if you see any big problems with my solution, please let me know.
Comment 5 Meder Bakirov 2005-05-25 06:41:31 UTC
I also second this, having php slotted would be superb!
Comment 6 Stuart Herbert (RETIRED) gentoo-dev 2005-05-31 15:29:05 UTC
This is what we're working towards, but it's going to take some time.  Please
bear with us until we've achieved this.  Unfortunately, there's a lot more to it
than just adding a SLOT= line to these ebuilds.

Best regards,
Stu
Comment 7 Fabio Rossi 2005-07-13 12:21:34 UTC
Which is the status of slotting php and php-cgi? In this way it's easier to mark
stable php 5 :-)
Comment 8 Stuart Herbert (RETIRED) gentoo-dev 2005-08-25 00:53:27 UTC
Hi,

This is fixed in the new dev-lang/php package in the Gentoo PHP Overlay [1]. 
The overlay is available for general use, or you can wait until these packages
are added to the Portage tree.

[1] http://svn.gnqs.org/projects/gentoo-php-overlay/

Best regards,
Stu
Comment 9 Christian Gut 2005-08-25 01:01:01 UTC
Can this really be called fixed? I thought sth is fixed, if its in the tree.
Well, and where in that php overlay can we find the cgi-ebuilds?
Comment 10 Tarmo Tänav 2005-08-25 06:45:51 UTC
(In reply to comment #9)
> Can this really be called fixed? I thought sth is fixed, if its in the tree.
> Well, and where in that php overlay can we find the cgi-ebuilds?

I haven't tried the overlay yet, but if I understuud Stuarts blog posts
correctly cgi and I think also "mod" is now supposed to be inside the one and
only php ebuild. And a use flag is needed to enable them. I could be completely
wrong here though...
Comment 11 Christian Gut 2005-08-25 07:03:31 UTC
Ok I found the source:

http://svn.gnqs.org/projects/gentoo-php-overlay/file/dev-lang/php/php-4.4.0.ebuild

Looks great, but still, I think this bug isn't fixed yet.

(Anyone remembers php beeing in dev-lang some time ago? :))