[php-maint] Bug#574000: php5-cgi: When php run as fcgi, it tries to read system config file 'php-cgi-fcgi.ini' instead of 'php.ini'

Eiichiro ITANI emu at ceres.dti.ne.jp
Mon Mar 15 15:38:13 UTC 2010

Subject: php5-cgi: When php run as fcgi, it tries to read system config file 'php-cgi-fcgi.ini' instead of 'php.ini'
Package: php5-cgi
Version: 5.3.2-1
Justification: renders package unusable
Severity: grave

*** Please type your report below this line ***

After upgraded php5-cgi to 5.3.2-1, my local web server's php scripts
stop running, with message 'No input file specified.'

I replaced my php binary instance in fcgi script directory as:

exec strace ./php5.real $* 2>> /tmp/php5.strace

And found strace log:

$ grep open /tmp/php5.strace
open("./php-cgi-fcgi.ini", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/bin/php-cgi-fcgi.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/php5/cgi/php-cgi-fcgi.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/etc/php5/cgi/conf.d/gd.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/mysql.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/mysqli.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/pdo.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/pdo_mysql.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/pdo_pgsql.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/pdo_sqlite.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/pgsql.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/sqlite.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/sqlite3.ini", O_RDONLY) = 3
open("/etc/php5/cgi/conf.d/suhosin.ini", O_RDONLY) = 3

So, I made symbolic link
# ln -s php.ini /etc/php5/cgi/php-cgi-fcgi.ini

Now my php pages are running correctly as before.

I believe that must be some compile time configuration mistake,
or it should be documented in README.Upgrading, or something.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (20, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=ja_JP.eucJP, LC_CTYPE=ja_JP.eucJP (charmap=EUC-JP)
Shell: /bin/sh linked to /bin/bash

Versions of packages php5-cgi depends on:
ii  libbz2-1.0             1.0.5-4           high-quality block-sorting file co
ii  libc6                  2.10.2-6          Embedded GNU C Library: Shared lib
ii  libcomerr2             1.41.10-1         common error description library
ii  libdb4.8               4.8.26-1          Berkeley v4.8 Database Libraries [
ii  libgssapi-krb5-2       1.8+dfsg~alpha1-7 MIT Kerberos runtime libraries - k
ii  libk5crypto3           1.8+dfsg~alpha1-7 MIT Kerberos runtime libraries - C
ii  libkrb5-3              1.8+dfsg~alpha1-7 MIT Kerberos runtime libraries
ii  libmagic1              5.04-1            File type determination library us
ii  libonig2               5.9.1-1           Oniguruma regular expressions libr
ii  libpcre3               7.8-3             Perl 5 Compatible Regular Expressi
ii  libqdbm14              1.8.77-custom1    QDBM Database Libraries [runtime]
ii  libssl0.9.8            0.9.8m-2          SSL shared libraries
ii  libxml2                2.7.6.dfsg-2+b1   GNOME XML library
ii  mime-support           3.48-1            MIME files 'mime.types' & 'mailcap
ii  php5-common            5.3.2-1           Common files for packages built fr
ii  tzdata                 2010e-1           time zone and daylight-saving time
ii  ucf                    3.0025            Update Configuration File: preserv
ii  zlib1g                 1:  compression library - runtime

php5-cgi recommends no packages.

Versions of packages php5-cgi suggests:
ii  php-pear                      5.3.2-1    PEAR - PHP Extension and Applicati

-- no debconf information

More information about the pkg-php-maint mailing list