php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36257 php ini master values are reset between vhosts
Submitted: 2006-02-02 12:23 UTC Modified: 2006-06-11 09:02 UTC
Votes:28
Avg. Score:4.6 ± 0.7
Reproduced:25 of 25 (100.0%)
Same Version:20 (80.0%)
Same OS:5 (20.0%)
From: cnovak at gmx dot net Assigned:
Status: Closed Package: *Configuration Issues
PHP Version: 5.1.2, 4.4.2 OS: Linux srv-01 2.6.12-vs2.0-gentoo
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cnovak at gmx dot net
New email:
PHP Version: OS:

 

 [2006-02-02 12:23 UTC] cnovak at gmx dot net
Description:
------------
PHI ini master values are not persistet between Apache virutal hosts.

1. php.ini setting mbstring.func_overload = 0
2. vhost www.example.com sets mbstring.func_overload = 6
3. after serving vhost www.example.com all other vhosts AND the doc root inherit the individual mbstring.func_overload = 6 value. 

<VirtualHost 192.168.4.48:443>
  ServerName www.infocenter.example.com.intra
   SSLEngine on
   SSLCertificateFile /etc/apache2/ssl/www.infocenter.example.com.intra/www.infocenter.example.com.pem
   SSLCertificateKeyFile /etc/apache2/ssl/www.infocenter.example.com.intra/www.infocenter.example.com.pem
   SSLCACertificateFile /etc/apache2/ssl/www.infocenter.example.com.intra/www.infocenter.example.com.pem

   RewriteEngine on
   RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
   RewriteRule .* - [F]
   RewriteRule /\.htaccess - [F]

   php_admin_value magic_quotes_gpc 0
   php_admin_value upload_tmp_dir /www/customers/example/infocenter.example.com.intra/local/tmp
   php_admin_value session.save_path /www/customers/example/infocenter.example.com.intra/local/var/session
   php_value mb_internal_encoding UTF-8
   php_value mbstring.func_overload 6

   php_value include_path "include"
   <Files ~ "\.ini$">
      Order deny,allow
      Deny from all
   </Files>

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php .php4

  DocumentRoot /www/customers/example/infocenter.example.com.intra/php-bin/
  Alias /stats /www/customers/example/infocenter.example.com.intra/stats

  CustomLog /www/customers/example/infocenter.example.com.intra/log/apache-www-actual.log combined
  ErrorLog /www/customers/example/infocenter.example.com.intra/log/apache-error-actual.log
</VirtualHost>


Reproduce code:
---------------
1. vhost.conf: php_value mbstring.func_overload 6
2. php.ini: mbstring.func_overload = 0


Expected result:
----------------
1. www.infocenter.example.com phpinfo mbstring.func_overload 6 0
2. www.docroot.com phpinfo mbstring.func_overload 0 0

Actual result:
--------------
1. www.example.com phpinfo mbstring.func_overload 6 6
2. www.docroot.com phpinfo mbstring.func_overload 6 6

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-02 12:26 UTC] tony2001@php.net
What Server API are you using?
Did you try with 5.1.x ?
 [2006-02-02 12:56 UTC] cnovak at gmx dot net
Q1) Server API: Apache 2, API 20020903
Q2) We can not try 5.1
 [2006-02-11 13:21 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-02-16 10:44 UTC] david_sitecon at hotmail dot com
We can't use 5.x yet either - is there a 4.4.x snapshot for this ?
 [2006-02-27 10:14 UTC] cnovak at gmx dot net
Gentlemen,

As stated on 2 Feb 12:56pm, we can not use any of the php 5.x.x versions as they are not permitted for our production servers.

Questions:
Is this issue recognized as a problem on 4.x versions?
If so, is there a fix with the latest 4.x versions?

Best regards

Christian
 [2006-03-02 18:26 UTC] tim at sharper dot nl
W're currently using Apache 2.0.55 with about 100 virtualhosts on Freebsd. It occasionaly happens
that the open_basedir settings, made in the virtualhosts, get mixed up.
Here an example error, when accesing a file in
"/home/dev.sharper.nl/www/".

Warning: Unknown(): open_basedir restriction in effect.
File(/home/dev.sharper.nl/www/index.php) is not within the allowed
path(s): (/home/cvr12.sharper.nl/www/) in Unknown on line 0

Warning: Unknown(/home/dev.sharper.nl/www/index.php): failed to open
stream: Operation not permitted in Unknown on line 0
 [2006-03-22 15:54 UTC] tim at sharper dot nl
After upgrade to PHP 5.1.2 this error still occurs.
 [2006-04-30 21:31 UTC] technophreak at gammae dot com
I've just tried with BUILD Apr 30 2006 16:49:02 in Latest CVS, same problem occurs.

Note: #36328 is probably the same problem as this bug report.
 [2006-05-06 08:47 UTC] marco at aktex dot net
Hello, 

I also had this bug with version 4.4.2 from Debian packages. Yesterday I recompiled with latest CVS (php4-STABLE-200605042030.tar.gz). Unfortunatly the bug is still present. We suffer from leaking include_path settings in vhosts which is very annoying. We cannot upgrade to PHP5.  

Thanks,
Marco
 [2006-05-19 16:53 UTC] technophreak at gammae dot com
Will someone PLEASE put a priority on this. I have been suffereing from this bug for over 4 months now.
 [2006-06-09 15:16 UTC] mike@php.net
Please try the next CVS snapshot.
 [2006-06-10 23:45 UTC] technophreak at gammae dot com
Seems to solve the problem with latest CVS, however, 5.2.0 is not compatible with Zend Optimizer which causes me a problem. When will this fix be included in stable realease ?
 [2006-06-11 09:02 UTC] mike@php.net
5.2 will be the next stable PHP-5 release.

The fix has been committed to PHP_4_4, PHP_5_1, PHP_5_2 and HEAD.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 09:01:29 2024 UTC