Bug #60144 [Com]: php-cgi not created when compiled with --enable-fpm
| From: | ckubu at so36 dot net | Date: | Mon, 04 Nov 2013 15:21:51 +0000 |
| Subject: | Bug #60144 [Com]: php-cgi not created when compiled with --enable-fpm | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-182593@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60144&edit=1
ID: 60144
Comment by: ckubu at so36 dot net
Reported by: napsty at gmail dot com
Summary: php-cgi not created when compiled with --enable-fpm
Status: Not a bug
Type: Bug
Package: FPM related
Operating System: Debian Squeeze
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
I had a simular problem. php-cgi wasn't compiled, even without option '--enable-fpm'.
It seems that configure option '--with-apxs2' also prevents php from compiling php-cgi.
My workaround was:
export PATH=<path-to-apache's-apxs>:$PATH
configure php without option '--with-apxs2'
Now php-cgi was build..
Previous Comments:
------------------------------------------------------------------------
[2013-10-30 19:32:06] admin at franceserv dot fr
Greetings,
I confirm, it's a bug and even in 2013, 2 years after the last comment.
When i compile the latest PHP version 5.3.27 with :
./configure --enable-fpm --enable-cgi
--> php-cgi isn't build with php-fpm
But when i compile the latest PHP version 5.4.20 and 5.5.5 with exactly the same line :
./configure --enable-fpm --enable-cgi
--> php-cgi and php-fpm are built both in same time
The solution currently is to build 2x 5.3.21 with :
./configure --enable-cgi; make; make install
and after ./configure --enable-fpm; make; make install
So yes, it's a bug.
------------------------------------------------------------------------
[2011-10-27 17:29:25] napsty at gmail dot com
Hi Johannes,
Thanks but that doesn't work either:
./configure --prefix=/usr \
--with-libdir=lib64 \
--with-config-file-path=/etc/apache2 \
--with-openssl \
--with-kerberos \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-gettext \
--with-imap \
--with-imap-ssl \
--enable-intl \
--enable-mbstring \
--with-mcrypt \
--with-mysql \
--with-mysqli \
--with-pdo-mysql \
--enable-soap \
--enable-sockets \
--with-iconv \
--with-xsl \
--enable-zip \
--enable-cgi \
--enable-fpm
cgi binary is not created:
ll sapi/cgi/
total 144K
-rw-r--r-- 1 majordomo majordomo 66K Aug 11 08:38 cgi_main.c
-rwxr-xr-x 1 majordomo majordomo 1.7K Sep 27 2007 CHANGES
-rw-r--r-- 1 majordomo majordomo 3.1K Oct 1 2007 config9.m4
-rw-r--r-- 1 majordomo majordomo 322 Oct 5 2007 config.w32
-rw-r--r-- 1 majordomo majordomo 72 Feb 14 2007 CREDITS
-rw-r--r-- 1 majordomo majordomo 30K Jan 19 2011 fastcgi.c
-rw-r--r-- 1 majordomo majordomo 4.5K Jan 1 2011 fastcgi.h
-rw-r--r-- 1 majordomo majordomo 68 Sep 26 2007 Makefile.frag
-rw-r--r-- 1 majordomo majordomo 0 Sep 26 2007 php.sym
-rw-r--r-- 1 majordomo majordomo 6.0K Jul 24 2006 README.FastCGI
drwxr-xr-x 2 majordomo majordomo 4.0K Aug 23 11:31 tests
Also if I want to use php-cgi to pass it to the php-fpm daemon it kind of makes no sense to compile
php twice.
------------------------------------------------------------------------
[2011-10-27 16:09:36] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
CGI is the default SAPI. If another SAPI is selected cgi won't be built. To force CGI there is
--enable-cgi as option. CLI is an exception and controlled individually.
------------------------------------------------------------------------
[2011-10-26 20:01:59] napsty at gmail dot com
Description:
------------
I'm not sure if this is a compile bug or if there's missing some important information in
the documentation. However it's a case which should be looked at.
When compiling PHP with the option '--enable-fpm', the cli binary (php) is created, but
the cgi binary (php-cgi) is not created.
Either there's a problem in the creation of the binaries or the documentation should be updated
with this information.
I've found bug report #53271 which informs about this problem but it is shown as 'fixed in
trunk'. That was 5.3.3 at the time, meanwhile a new version from trunk should have been created
if I'm not mistaken?
Test script:
---------------
#!/bin/sh
./configure --prefix=/usr \
--with-libdir=lib64 \
--with-config-file-path=/etc/apache2 \
--with-openssl \
--with-kerberos \
--with-zlib \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--with-curl \
--enable-exif \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-gettext \
--with-imap \
--with-imap-ssl \
--enable-intl \
--enable-mbstring \
--with-mcrypt \
--with-mysql \
--with-mysqli \
--with-pdo-mysql \
--enable-soap \
--enable-sockets \
--with-iconv \
--with-xsl \
--enable-zip \
--enable-fpm
Expected result:
----------------
All binaries should be created (php, php-cgi, php-fpm).
php-5.3.8 # ll sapi/cgi/
total 29M
-rw-r--r-- 1 someuser someuser 66K Aug 11 08:38 cgi_main.c
-rw-r--r-- 1 root root 310 Oct 26 21:57 cgi_main.lo
-rw-r--r-- 1 root root 141K Oct 26 21:57 cgi_main.o
-rwxr-xr-x 1 someuser someuser 1.7K Sep 27 2007 CHANGES
-rw-r--r-- 1 someuser someuser 3.1K Oct 1 2007 config9.m4
-rw-r--r-- 1 someuser someuser 322 Oct 5 2007 config.w32
-rw-r--r-- 1 someuser someuser 72 Feb 14 2007 CREDITS
-rw-r--r-- 1 someuser someuser 30K Jan 19 2011 fastcgi.c
-rw-r--r-- 1 someuser someuser 4.5K Jan 1 2011 fastcgi.h
-rw-r--r-- 1 root root 308 Oct 26 21:57 fastcgi.lo
-rw-r--r-- 1 root root 88K Oct 26 21:57 fastcgi.o
-rw-r--r-- 1 someuser someuser 68 Sep 26 2007 Makefile.frag
-rwxr-xr-x 1 root root 28M Oct 26 21:57 php-cgi
-rw-r--r-- 1 someuser someuser 0 Sep 26 2007 php.sym
-rw-r--r-- 1 someuser someuser 6.0K Jul 24 2006 README.FastCGI
drwxr-xr-x 2 someuser someuser 4.0K Aug 23 11:31 tests
Actual result:
--------------
After make, only cli (php) and and php-fpm binaries are created.
php-5.3.8 # ll sapi/cgi/
total 144K
-rw-r--r-- 1 someuser someuser 66K Aug 11 08:38 cgi_main.c
-rwxr-xr-x 1 someuser someuser 1.7K Sep 27 2007 CHANGES
-rw-r--r-- 1 someuser someuser 3.1K Oct 1 2007 config9.m4
-rw-r--r-- 1 someuser someuser 322 Oct 5 2007 config.w32
-rw-r--r-- 1 someuser someuser 72 Feb 14 2007 CREDITS
-rw-r--r-- 1 someuser someuser 30K Jan 19 2011 fastcgi.c
-rw-r--r-- 1 someuser someuser 4.5K Jan 1 2011 fastcgi.h
-rw-r--r-- 1 someuser someuser 68 Sep 26 2007 Makefile.frag
-rw-r--r-- 1 someuser someuser 0 Sep 26 2007 php.sym
-rw-r--r-- 1 someuser someuser 6.0K Jul 24 2006 README.FastCGI
drwxr-xr-x 2 someuser someuser 4.0K Aug 23 11:31 tests
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60144&edit=1