http://bombing.ru/php-5.2.5-r1.ebuild I got working (a bit outdated) ebuild here. Reproducible: Always
Created attachment 142185 [details] latest ebuild
Nope; please get this accepted upstream. http://bugs.php.net/
It cannot be accepted by upstream due to licensing difficulties: http://marc.info/?l=php-internals&m=119320642131465&w=2 Changing the license is not an option, as far as I understand. What can be done?
I had actually considered adding it, but if upstream rejects it because of licensing issues, I don't think we can do it either as it would probably put us (or at least all users) into (possible) legal problems. :/
Here's a word from upstream: http://marc.info/?l=php-internals&m=119321052303500&w=2
From upstream it seems that they don't understand why php patching is needed. Therefore this request is not resolved. From php-fpm faq (I tried to translate from russian to english): Q: Why patching php is needed for using php-fpm ? spawn-fcgi does not need this! A: For additional possibilities in php process control. Whithout patching technically impossible: * graceful restarting php without request loosing, for expample when updating php binary and or extensions * starting php workers with different uid/gid/chroot/environment * all configuration on single conf -file * dynamic requests count, (depend from system load) (TODO) # real-time statistics executing php requests (TODO)
*** Bug 245059 has been marked as a duplicate of this bug. ***
Reassigning.
The license has apparently changed and php-fpm is going to be made ready for inclusion in php. We'll follow that. http://news.php.net/php.internals/44369
When is this expected to be added ? nginx sure could use it.
Created attachment 198984 [details] latest ebuild current
Created attachment 198987 [details, diff] patch Put is into ${FILESDIR}
Created attachment 198989 [details] init file $ ls /usr/local/portage/dev-lang/php/files 20php5-envd php-5.2.10-fpm-0.5.13.diff-ext.patch 70_mod_php5_concurr.conf-apache2-r1 php5-ldvs 70_mod_php5.conf-apache2-r1 php-fpm.init
URL should be changed to http://php-fpm.org
Available in my overlay: http://gitorious.org/okelly_overlay/mainline/trees/master/dev-lang/php
(In reply to comment #15) > Available in my overlay: > http://gitorious.org/okelly_overlay/mainline/trees/master/dev-lang/php > Thanks this works.
Whats the status of this bug? Please add the php-fpm option!!!
Created attachment 212437 [details] latest ebuild New ebuild using fpm-0.6. Requires modified init.d (change "/usr/bin/php-cgi -- --fpm" to "/usr/sbin/php-fpm")
(In reply to comment #18) > Created an attachment (id=212437) [details] > latest ebuild > New ebuild using fpm-0.6. Requires modified init.d (change "/usr/bin/php-cgi -- > --fpm" to "/usr/sbin/php-fpm") Build complete. Don't forget to run 'make test'. cp: cannot stat `sapi/cgi/php-cgi': No such file or directory * ERROR: dev-lang/php-5.2.11-r1 failed: * Unable to copy CGI SAPI * * Call stack: * ebuild.sh, line 55: Called src_compile * environment, line 4894: Called src_compile_normal * environment, line 5027: Called die * The specific snippet of code: * cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" * * If you need support, post the output of 'emerge --info =dev-lang/php-5.2.11-r1', * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.2.11-r1'. * This ebuild is from an overlay: '/usr/local/portage/' * The complete build log is located at '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/environment'. * S: '/var/tmp/portage/dev-lang/php-5.2.11-r1/work/php-5.2.11' What happen? can't emerge
(In reply to comment #19) > (In reply to comment #18) > > Created an attachment (id=212437) [details] [details] > > latest ebuild > > New ebuild using fpm-0.6. Requires modified init.d (change "/usr/bin/php-cgi -- > > --fpm" to "/usr/sbin/php-fpm") > > Build complete. > Don't forget to run 'make test'. > > cp: cannot stat `sapi/cgi/php-cgi': No such file or directory > * ERROR: dev-lang/php-5.2.11-r1 failed: > * Unable to copy CGI SAPI > * > * Call stack: > * ebuild.sh, line 55: Called src_compile > * environment, line 4894: Called src_compile_normal > * environment, line 5027: Called die > * The specific snippet of code: > * cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI > SAPI" > * > * If you need support, post the output of 'emerge --info > =dev-lang/php-5.2.11-r1', > * the complete build log and the output of 'emerge -pqv > =dev-lang/php-5.2.11-r1'. > * This ebuild is from an overlay: '/usr/local/portage/' > * The complete build log is located at > '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/build.log'. > * The ebuild environment file is located at > '/var/tmp/portage/dev-lang/php-5.2.11-r1/temp/environment'. > * S: '/var/tmp/portage/dev-lang/php-5.2.11-r1/work/php-5.2.11' > > What happen? can't emerge > I'm not sure what the difference is, but it only worked with USE="fastbuild" for me.
Created attachment 212632 [details] latest ebuild Ebuild for PHP 5.3.1 with FPM SAPI support
Created attachment 212633 [details] eclass Eclass for PHP 5.3 with FPM SAPI support
Created attachment 212634 [details] init.d for FPM SAPI New init.d for FPM SAPI with 5.3.1 ebuild
FPM is on php.net SVN recently, so may be included in official release in near future. See bug 274512 for details on 5.3 patchset, future maintenance, etc.
Forgot one. The php-5.3.1 ebuild with fpm requires /usr/share/php-select/php-fpm.sh. cp /usr/share/php-select/php-cgi.sh /usr/shar/ephp-select/php-fpm.sh sed -e 's|cgi|fpm|g;' /usr/share/php-select/php-fpm.sh
Issue with eclass. ebuild /usr/local/portage/dev-lang/php/php-5.3.1.ebuild manifest /usr/portage/eclass/php5_3-sapi.eclass: line 685: syntax error: unexpected end of file * ERROR: dev-lang/php-5.3.1 failed: * died sourcing /usr/portage/eclass/php5_3-sapi.eclass in inherit() * * Call stack: * ebuild.sh, line 1826: Called source '/usr/local/portage/dev-lang/php/php-5.3.1.ebuild' * php-5.3.1.ebuild, line 34: Called inherit 'versionator' 'php5_3-sapi' 'apache-module' * ebuild.sh, line 1297: Called die * The specific snippet of code: * qa_source "$location" || die "died sourcing $location in inherit()" * * If you need support, post the output of 'emerge --info =dev-lang/php-5.3.1', * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.3.1'. * This ebuild is from an overlay: '/usr/local/portage/' * S: '/var/tmp/portage/dev-lang/php-5.3.1/work/php-5.3.1'
(In reply to comment #26) > Issue with eclass. > ebuild /usr/local/portage/dev-lang/php/php-5.3.1.ebuild manifest > /usr/portage/eclass/php5_3-sapi.eclass: line 685: syntax error: unexpected end > of file The file is 716 lines. Re-download.
>>>> Downloading 'http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2' --2010-01-11 22:51:19-- http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2 Распознаётся gentoo.longitekk.com... 80.86.81.198 Устанавливается соединение с gentoo.longitekk.com|80.86.81.198|:80... соединение установлено. Запрос HTTP послан, ожидается ответ... 404 Not Found 2010-01-11 22:51:20 ОШИБКА 404: Not Found. !!! Couldn't download 'php-patchset-5.3.0-r0.tar.bz2'. Aborting. !!! Fetch failed for php-patchset-5.3.0-r0.tar.bz2, can't update Manifest Where i can find php-patchset-5.3.0-r0.tar.bz2 ?
(In reply to comment #28) > >>>> Downloading 'http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2' > --2010-01-11 22:51:19-- > http://gentoo.longitekk.com/php-patchset-5.3.0-r0.tar.bz2 > > Where i can find php-patchset-5.3.0-r0.tar.bz2 ? > Ebuild/eclass attached to this bug for 5.3.1 don't include longitekk.com, and there is no 5.3.0 ebuild in this bug.
guys, and what about php-5.2.12? php 5.2.x branch is still alive ;-)
Created attachment 216793 [details] latest ebuild Modified ebuild compatible with current fpm patch (binary name changed from php-cgi to php-fpm). Use with patched php-toolkit from bug #301279
Created attachment 216848 [details] latest ebuild Fixed location of php-fpm.conf (now in /etc/php/fpm-php5/)
Created attachment 216850 [details] latest ebuild (In reply to comment #32) > Created an attachment (id=216848) [details] > latest ebuild > > Fixed location of php-fpm.conf (now in /etc/php/fpm-php5/) > Sorry, attached wrong (old) file.
Created attachment 216851 [details] latest 5.2 ebuild (In reply to comment #30) > guys, and what about php-5.2.12? php 5.2.x branch is still alive ;-) > php-5.2.12.ebuild For use with php-fpm.init of 2009-12-10 (attachment #212634 [details]) and modified php-toolkit from bug #301279 Do not forget php-fpm.conf location changed.
Created attachment 216883 [details] latest 5.2 ebuild Fixed typo.
I emerged with php-5.2.12.ebuild. I am a noob. Please, how can I test that this php-fpm build works ? I am seting up nginx. I have the message : "No input file specified." when trying my browser with : http://localhost/ or http://localhost/index.php. With http://localhost/index.html, it is ok. So I want to test each piece of the cake separatly first.
(In reply to comment #36) > I emerged with php-5.2.12.ebuild. I am a noob. Please, how can I test that this > php-fpm build works ? I am seting up nginx. I have the message : "No input file > specified." when trying my browser with : http://localhost/ or > http://localhost/index.php. With http://localhost/index.html, it is ok. So I > want to test each piece of the cake separatly first. > Bugzilla is not a support forum. Nginx issues especially don't belong in a php bug report.
(In reply to comment #37) > (In reply to comment #36) > Bugzilla is not a support forum. Nginx issues especially don't belong in a php > bug report. I was too much verbose. Sorry for that. My request is not support. You deal in this bug repport of a Gentoo ebuild for php-fpm. So 1) it is the only place to deal with it, 2) obviously, you have a test case or validation procedure to check it works, independently of anything else (nginx or what so ever). My request is only that you post this procedure if it exists.
eclass/php-ext-base-r1.eclass could be modified to make php extensions ini files install into /etc/php/fpm-php5/ automatically. Adding string: PHPSAPILIST="apache2 cli cgi fpm" to /etc/paludis/bashrc works for me (no need to modify rsynced eclass). Most probably, this trick will work with /etc/make.conf as well, I don't have portage-powered system to test.
i'm sorry, i'm noob in bugzilla, but i have found bug and solution (i hope, it helps somebody) error: Error in argument 1, char 1: no argument for option - 64bit system php version 5.2.12 used http://bugs.gentoo.org/attachment.cgi?id=216883 and http://bugs.gentoo.org/attachment.cgi?id=198989 1. symlink was not created so /usr/lib64/php5/bin/php-fpm was not pointing to /usr/bin/php-fpm 2. init script uses php-cgi, in latest ebuild is php-fpm, so change in init script php-cgi to php-fpm configuration scripts & php.ini is located in /etc/php/php-fpm/ as mension above ps: i was unable to compile php with fastbuild, i had to disable this option and everything passed
I've create new repo for php 5.3 with FPM support, see bug #274512 http://bugs.gentoo.org/show_bug.cgi?id=274512#c100
As the developers says the php-fpm will be upstream with php 5.4 release. Imho this patch not needed till then, maybe only as USE flag as suhosin.
Created attachment 226149 [details] latest 5.2 ebuild Plain version bump for 5.2.x
5.2.13 met successfully, but when you start /etc/init.d/php-fpm start Gives the following: server ~ # /etc/init.d/php-fpm start * Starting PHP FastCGI server ... Error in argument 1, char 1: no argument for option - Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>] php-cgi <file> [args...] -a Run interactively -b <address:port>|<port> Bind Path for external FASTCGI Server mode -C Do not chdir to the script's directory -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse <file>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>. -T <count> Measure execution time of script repeated <count> tim [ !! ] server ~ # How to solve this problem?
(In reply to comment #44) > 5.2.13 met successfully, but when you start > /etc/init.d/php-fpm start > Gives the following: > > server ~ # /etc/init.d/php-fpm start > * Starting PHP FastCGI server ... > Error in argument 1, char 1: no argument for option - > Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>] Please use attachment #212634 [details] as init script, it should be used for both 5.2 and 5.3 since comment #31 Unfortunately, I don't have permissions to mark as obsolete attachments that I don't own. Don't forget that you need php-toolkit from bug #301279 5.2.13 ebuild was tested with this version: e16c3a55396fb440b0746b19a2ea4592 php-fpm-0.6~5.2.patch
If you're using 5.3, please use this overlay: http://github.com/GiDiS/gentoo-php-rewrite (see bug #274512#c134)
FPM SAPI is now in PHP SVN trunk.
Gentoo will not ship with FPM support for PHP 5.3, but the github overlay mentioned in bug #274512 will maintain an SVN snapshot with FPM support.
FYI: An SVN snapshot of php-5.3.3 with fpm support has been added to the php overlay (layman -a php)
the fpm enabled ebuild for php-5.2.13 can also be found in the betagarden overlay
(In reply to comment #45) > 5.2.13 ebuild was tested with this version: > e16c3a55396fb440b0746b19a2ea4592 php-fpm-0.6~5.2.patch > (Hi) Unfortunately, this is not the recommended way of patching a 5.2.x php source - even deprecated upstream. One should rather use the old-style 0.5-patch: php-5.2.13-fpm-0.5.13.diff.gz 01-Mar-2010 11:19 201323 php-5.2.13-fpm-0.5.14.diff.gz 13-May-2010 10:57 201339 I use the first patch in production, with an updated ebuild. I am going to test the second one in dev now. (anyway, thanks to everyone who contribute to integrating php-fpm while waiting for php-5.4).
Those of you who want FPM, please test the 5.3.3 RC1 ebuild from the php overlay. This one will enter portage as soon as 5.3.2 leaves package.mask. It includes FPM without the use of any patching.
PHP 5.3.3 with php-fpm support is out. Bug may be closed.
please tell me when will ebuild for php version 5.2.14?
Created attachment 246692 [details] src_prepare-v1.eblit
Created attachment 246694 [details] src_configure-v52.eblit
Created attachment 246696 [details] src_install-v52.eblit
Created attachment 246698 [details] old-style init.d
Created attachment 246700 [details] latest 5.2 ebuild php-5.2.14 ebuild with fpm support tested with this patch: 5339a2a9c6a0b015b7ce5fcb8d90de84 /usr/distfiles/php-5.2.14-fpm-0.5.14.diff.gz Important changes: 1. Binary name changed back from php-fpm to php-cgi, so init script have to be replaced. 2. Patched php-toolkit not needed anymore. 2. Configuration directory changed to /etc/php/cgi-php5/, be careful while updating. Moving files from /etc/php/fpm-php5/ to /etc/php/cgi-php5/ is up to you. Please take additional care on php-fpm.conf, as far as some parameters are not supported in current version of 5.2 patch. Most probably, you have to change at least user/group and slow log location. Files: files/eblits/src_prepare-v1.eblit files/eblits/src_configure-v52.eblit files/eblits/src_install-v52.eblit files/php-cgi-fpm.init php-5.2.14.ebuild
I have this error in the last ebuild * ERROR: dev-lang/php-5.2.14 failed: * error sourcing ebuild * * Call stack: * ebuild.sh, line 1881: Called die * The specific snippet of code: * source "$EBUILD" || die "error sourcing ebuild" * * If you need support, post the output of 'emerge --info =dev-lang/php-5.2.14', * the complete build log and the output of 'emerge -pqv =dev-lang/php-5.2.14'. * This ebuild is from an overlay: '/usr/local/portage/' * S: '/var/tmp/portage/dev-lang/php-5.2.14/work/php-5.2.14' php # pwd /usr/local/portage/dev-lang/php php # ls files php-5.2.14.ebuild php # ls files/ eblits php-cgi-fpm.init php # ls files/eblits/ src_configure-v52.eblit src_install-v1.eblit src_prepare-v1.eblit
ok, small instructions: copy ALL files from original portage dev-lang/php directory to your local repository, then replace (add) 5 files from attachments. I attached only files that differ from main tree.
ns1 ~ # /etc/init.d/php-fpm start * Starting PHP FastCGI server ... Sep 12 03:31:15.165262 [ERROR] fpm_unix_conf_wp(), line 124: please specify user and group other than root, pool 'default' [ !! ] ns1 ~ #
Created attachment 263281 [details] latest 5.2 ebuild latest 5.2 ebuild for PHP version 5.2.17 With FPM patch (php-5.2.17-fpm-0.5.14)
Just to be clear, we will not support fpm on the 5.2 branch.