php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48926 Configure option --enable-fastcgi doesn't work
Submitted: 2009-07-15 13:01 UTC Modified: 2009-07-17 06:31 UTC
From: abel dot martin dot ruiz at gmail dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.10 OS: RHEL 5
Private report: No CVE-ID:
 [2009-07-15 13:01 UTC] abel dot martin dot ruiz at gmail dot com
Description:
------------
Fastcgi support isn't enabled even though configure is invoked with option --enable-fastcgi.

When running ./sapi/cgi/php-cgi -v the ouput is:
PHP 5.2.10 (cgi) (built: Jul 15 2009 08:28:33)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Note the (cgi) instead of the expected (cgi-fcgi).


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-15 16:03 UTC] jani@php.net
What was the full configure line? Did you do it on clean sources where configure hadn't been run before? Where there any warnings about unknown options after configure? "make clean" ?
 [2009-07-16 06:47 UTC] abel dot martin dot ruiz at gmail dot com
I didn't do a "make clean", true. The line was this:

./configure --enable-bcmath  --enable-dba    --with-gd  --with-ldap  --enable-mbstring   --with-mcrypt=/usr/local/lib  --with-mysql  --with-unixODBC=/usr --with-pear  --with-snmp --enable-zip  --with-openssl --with-pdo-mysql --with-mhash --enable-soap --with-curl --enable-ftp  --enable-fastcgi

I configured the sources from a fresh untarred tarball with the line above and I got fcgi support:
PHP 5.2.10 (cgi-fcgi) (built: Jul 16 2009 08:31:45)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Another thing I noticed (done with newly untarred sources, again) is that php-cgi doesn't get built if I enable mod_php with --with-apxs2=/usr/sbin/apxs before --enable-fastcgi. Not sure if both options are mutually exclusive). This was the line:
./configure --enable-bcmath  --enable-dba    --with-gd  --with-ldap  --enable-mbstring   --with-mcrypt=/usr/local/lib  --with-mysql  --with-unixODBC=/usr --with-pear  --with-snmp --enable-zip  --with-openssl --with-pdo-mysql --with-mhash --enable-soap --with-curl --enable-ftp --with-apxs2=/usr/sbin/apxs --enable-fastcgi

Thanks for your quick reply!
 [2009-07-16 13:31 UTC] jani@php.net
Ah. You can't build 3 SAPIs the same time. It's either CGI and CLI or Apache and CLI. This is not a bug. 

Also this is wrong: 
--with-mcrypt=/usr/local/lib 

NEVER ever add /lib in any paths passed to configure options!
 [2009-07-17 06:31 UTC] abel dot martin dot ruiz at gmail dot com
OK. I did what you told me and everything works like a charm.
Thanks for your help.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 13:02:46 2014 UTC