title: IspConfig & PHP-FPM - PHP config read from different pool?
body: <p>on my server I have the following setup:</p>
  
  <ul>
  <li>ISPConfig 3.0.5.4p2 </li>
  <li>Ubuntu 14.04 LTS</li>
  <li>Apache 2.4</li>
  <li>PHP handled by PHP-FPM (one pool for each web)</li>
  </ul>
  
  <p>The problem is, that some web sites, that are configured as subdomains (v-host) sometimes report this strange error:</p>
  
  <p><strong>PHP error from web46</strong></p>
  
  <pre><code>[19-Mar-2015 18:39:07 UTC] PHP Warning:  include(): open_basedir restriction in effect. File(/var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/web/ErrorAction.php) is not within the allowed path(s): (/var/www/clients/client1/we$
  [19-Mar-2015 18:39:07 UTC] PHP Warning:  include(/var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/web/ErrorAction.php): failed to open stream: Operation not permitted in /var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yi$
  [19-Mar-2015 18:39:07 UTC] PHP Warning:  include(): Failed opening '/var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/web/ErrorAction.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/clie$
  [19-Mar-2015 18:39:07 UTC] PHP Warning:  include(): open_basedir restriction in effect. File(/var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/base/UnknownClassException.php) is not within the allowed path(s): (/var/www/clients$
  [19-Mar-2015 18:39:07 UTC] PHP Warning:  include(/var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/base/UnknownClassException.php): failed to open stream: Operation not permitted in /var/www/clients/client1/web3/cooltaxi/vendor$
  [19-Mar-2015 18:39:07 UTC] PHP Warning:  include(): Failed opening '/var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/base/UnknownClassException.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/c$
  [19-Mar-2015 18:39:07 UTC] PHP Fatal error:  Class 'yii\base\UnknownClassException' not found in /var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/BaseYii.php on line 291
  [19-Mar-2015 18:39:07 UTC] PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class yii\web\ErrorAction does not exist' in /var/www/clients/client1/web3/cooltaxi/vendor/yiisoft/yii2/di/Container.php:415
  </code></pre>
  
  <p><strong>PHP-FPM pool - web46</strong></p>
  
  <pre><code>[web46]
  
  listen = /var/lib/php5-fpm/web46.sock
  listen.owner = web3
  listen.group = client1
  listen.mode = 0660
  
  user = web3
  group = client1
  
  pm = dynamic
  pm.max_children = 10
  pm.start_servers = 2
  pm.min_spare_servers = 1
  pm.max_spare_servers = 5
  pm.max_requests = 0
  
  chdir = /
  
  php_admin_value[open_basedir] = /var/www/clients/client1/web3/test:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/test.agelis.cz/test:/srv/www/test.agelis.cz/test:/usr/share/php5:/usr/share/php:/tmp:/us$
  php_admin_value[session.save_path] = /var/www/clients/client1/web3/tmp
  php_admin_value[upload_tmp_dir] = /var/www/clients/client1/web3/tmp
  php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -fwebmaster@test.agelis.cz"
  
  php_admin_value[upload_max_filesize] = 128M
  php_admin_value[post_max_size] = 128M
  php_admin_value[max_input_vars] = 4000
  </code></pre>
  
  <p><strong>PHP-FPM pool - web59</strong></p>
  
  <pre><code>[web59]
  
  listen = /var/lib/php5-fpm/web59.sock
  listen.owner = web3
  listen.group = client1
  listen.mode = 0660
  
  user = web3
  group = client1
  
  pm = dynamic
  pm.max_children = 10
  pm.start_servers = 2
  pm.min_spare_servers = 1
  pm.max_spare_servers = 5
  pm.max_requests = 0
  
  chdir = /
  
  php_admin_value[open_basedir] = /var/www/clients/client1/web3/cooltaxi:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/cooltaxi.agelis.cz/cooltaxi:/srv/www/cooltaxi.agelis.cz/cooltaxi:/usr/share/php5:/us$
  php_admin_value[session.save_path] = /var/www/clients/client1/web3/tmp
  php_admin_value[upload_tmp_dir] = /var/www/clients/client1/web3/tmp
  php_admin_value[sendmail_path] = "/usr/sbin/sendmail -t -i -fwebmaster@cooltaxi.agelis.cz"
  </code></pre>
  
  <p><strong>Apache fcgi vhost config - web46</strong></p>
  
  <pre><code>      &lt;IfModule mod_fastcgi.c&gt;
                          &lt;Directory /var/www/clients/client1/web3/cgi-bin&gt;
                                                                          Require all granted
                                                              &lt;/Directory&gt;
                          &lt;Directory /var/www/test.agelis.cz/test&gt;
                                  &lt;FilesMatch "\.php[345]?$"&gt;
                                          SetHandler php5-fcgi
                                  &lt;/FilesMatch&gt;
                          &lt;/Directory&gt;
                          &lt;Directory /var/www/clients/client1/web3/test&gt;
                                  &lt;FilesMatch "\.php[345]?$"&gt;
                                          SetHandler php5-fcgi
                                  &lt;/FilesMatch&gt;
                          &lt;/Directory&gt;
          Action php5-fcgi /php5-fcgi
                          Alias /php5-fcgi /var/www/clients/client1/web3/cgi-bin/php5-fcgi-88.86.115.169-443-test.agelis.cz
          FastCgiExternalServer /var/www/clients/client1/web3/cgi-bin/php5-fcgi-88.86.115.169-443-test.agelis.cz -idle-timeout 300 -socket /var/lib/php5-fpm/web46.sock -pass-header Authorization
          &lt;/IfModule&gt;
  </code></pre>
  
  <p>It looks like open_basedir issue, but the strange thing is, that PHP for some reason take open_basedir setting from different pool config (you can see - error is coming form web43, but the path is from web59)</p>
  
  <p>There are no enteries in php-fpm error log.</p>
  
  <p>Any help will be appreciated. I have tried everything I know and still can't figure out the problem :-(</p>