From:             
Operating system: Linux
PHP version:      5.3.4
Package:          FPM related
Bug Type:         Bug
Bug description:fastcgi_param PHP_VALUE pollutes other sites

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 bug report at http://bugs.php.net/bug.php?id=53611&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53611&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53611&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53611&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53611&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53611&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53611&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53611&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53611&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53611&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53611&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53611&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53611&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53611&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53611&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53611&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53611&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53611&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53611&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53611&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53611&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53611&r=mysqlcfg

Reply via email to