Edit report at http://bugs.php.net/bug.php?id=53611&edit=1

 ID:                 53611
 Updated by:         [email protected]
 Reported by:        jraxis at gmail dot com
 Summary:            fastcgi_param PHP_VALUE pollutes other sites
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            FPM related
 Operating System:   Linux
 PHP Version:        5.3.4
-Assigned To:        
+Assigned To:        fat
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2010-12-26 00:37:17] jraxis at gmail dot com

Description:
------------
In nginx+FPM, if I set a PHP_VALUE using fastcgi_param in one server,
sometimes other virtual hosts are seeing those settings. An nginx.conf
fragment like this:---



server {

    server_name foo.example;

    root /srv/www/foo.example;

    ...

    location ~ \.php$ {

        ... # usual PHP stuff

    }

}

server {

    server_name bar.example;

    root /srv/www/bar.example;

    ...

    location ~ \.php$ {

        ...

        fastcgi_param PHP_VALUE
"auto_prepend_file=\"/etc/nginx/bar.php\""

    }

}



---will occasionally result in foo.example's pages having bar.php
prepended to it. The php-fpm processes are most likely retaining the
PHP_VALUE settings as they are re-used by nginx for requests for other
virtual hosts.



This is with PHP/5.3.4 and nginx/0.8.53 on a Gentoo Linux box.
./configure line:---



'./configure' '--prefix=/usr' '--build=i686-pc-linux-gnu'
'--host=i686-pc-linux-gnu' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc'
'--localstatedir=/var/lib' '--prefix=/usr/lib/php5.3'
'--mandir=/usr/lib/php5.3/man' '--infodir=/usr/lib/php5.3/info'
'--libdir=/usr/lib/php5.3/lib' '--with-libdir=lib' '--without-pear'
'--disable-maintainer-zts' '--enable-bcmath=shared' '--with-bz2=shared'
'--enable-calendar=shared' '--with-curl=shared' '--with-curlwrappers'
'--without-enchant' '--enable-exif=shared' '--enable-ftp=shared'
'--with-gettext=shared' '--with-gmp=shared' '--disable-intl'
'--without-kerberos' '--enable-mbstring=shared' '--with-mcrypt=shared'
'--without-mssql' '--with-onig=/usr' '--with-openssl'
'--with-openssl-dir=/usr' '--enable-pcntl=shared' '--without-pgsql'
'--without-pspell' '--without-recode' '--enable-shmop'
'--with-snmp=shared' '--enable-soap=shared' '--enable-sockets=shared'
'--without-sybase-ct' '--enable-sysvmsg=shared'
'--enable-sysvsem=shared' '--enable-sysvshm=shared' '--with-tidy=shared'
'--enable-wddx=shared' '--with-xmlrpc=shared' '--with-xsl=shared'
'--enable-zip=shared' '--with-zlib=shared' '--disable-debug'
'--enable-dba=shared' '--without-cdb' '--with-db4' '--enable-flatfile'
'--with-gdbm' '--enable-inifile' '--without-qdbm'
'--with-freetype-dir=/usr' '--with-t1lib=/usr' '--enable-gd-jis-conv'
'--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr'
'--with-gd' '--with-imap=shared' '--with-imap-ssl' '--without-interbase'
'--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr'
'--with-mysql-sock=/var/run/mysqld/mysqld.sock'
'--with-mysqli=shared,/usr/bin/mysql_config'
'--with-unixODBC=shared,/usr' '--without-adabas' '--without-birdstep'
'--without-dbmaker' '--without-empress' '--without-esoob'
'--without-ibm-db2' '--without-sapdb' '--without-solid' '--without-oci8'
'--without-pdo-dblib' '--with-pdo-mysql=shared,/usr'
'--without-pdo-pgsql' '--with-pdo-sqlite=shared,/usr'
'--with-pdo-odbc=shared,unixODBC,/usr' '--with-readline'
'--without-libedit' '--with-mm' '--with-sqlite=/usr'
'--enable-sqlite-utf8' '--with-pcre-regex=/usr' '--with-pcre-dir=/usr'
'--with-config-file-path=/etc/php/fpm-php5.3'
'--with-config-file-scan-dir=/etc/php/fpm-php5.3/ext-active'
'--disable-cli' '--disable-cgi' '--enable-fpm' '--disable-embed'
'--without-apxs2'

Test script:
---------------
# /srv/www/foo.example/index.php

<?php print "Foo index"; ?>



# /srv/www/bar.example/index.php

<?php print "Bar index"; ?>



# /etc/nginx/bar.php

<?php print "Bar prepend<br/>"; ?>

Expected result:
----------------
# foo.example

Foo index



# bar.example

Bar prepend

Bar index

Actual result:
--------------
# foo.example

Bar prepend

Foo index



# bar.example

Bar prepend

Bar index


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53611&edit=1

Reply via email to