php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7175 "perdir" ini settings are not per dir
Submitted: 2000-10-13 03:52 UTC Modified: 2000-10-13 21:36 UTC
From: rick at eastcore dot net Assigned:
Status: Closed Package: PHP options/info functions
PHP Version: 4.0.3 OS: Linux 2.2.17
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rick at eastcore dot net
New email:
PHP Version: OS:

 

 [2000-10-13 03:52 UTC] rick at eastcore dot net
Given the apache (1.3.12) virtual hosts definitions:


<VirtualHost 1.2.3.4>
ServerAdmin webmaster@domain.com
ServerName www.domain.com
ServerAlias *.domain.com domain.com
DocumentRoot /home/domain/htdocs
ScriptAlias /cgi-bin/ /home/domain/cgi-bin/
php_value include_path /home/domain/phpinc
php_value auto_prepend_file dom_prepend.php3
TransferLog /var/log/httpd/access_log.domain
ErrorLog /var/log/httpd/error_log.domain
</VirtualHost>

<VirtualHost 1.2.3.4>
ServerAdmin webmaster@network.net
ServerName www.network.net
ServerAlias network.net *.network.net
DocumentRoot /home/rick/network/htdocs
ScriptAlias /cgi-bin/ /home/rick/network/cgi-bin/
php_value include_path /home/rick/network/phpinc
php_value auto_prepend_file net_prepend.php3
TransferLog /var/log/httpd/access_log.network
ErrorLog /var/log/httpd/error_log.network
</VirtualHost>

both running a freshly compiled php3.0.4
(configure line:

./configure'
                                     '--with-apache=/usr/src/apache_1.3.12'
                                     '--with-mysql=/usr' '--with-xml')

Virtual host network.net has the same 'include_path'
and 'auto_prepend_file' settings as domain.com.  These
were systems that had no such problem prior to the upgrade
(from 4.0.1pl2).

I dug through the source for a few hours and decided that
it is most likely to do with php_alter_ini_entry for ini
values set to PHP_INI_PERDIR or PHP_INI_ALL in main/main.c,
but I couldn't make headway beyond this.

If this is true, this is a show-stopper for a lot of users.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-13 04:45 UTC] rick at eastcore dot net
The code in php-4.0.3/sapi/apache/mod_php4.c (line 551) looks suspicious:

static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_entry, php_per_dir_entry *new_per_dir_entry)
{
        if (orig_per_dir_entry->type==PHP_INI_SYSTEM
                && new_per_dir_entry->type!=PHP_INI_SYSTEM) {
                return 0;
        } else {
                return 1;
        }
}


 [2000-10-13 21:36 UTC] rick at eastcore dot net
Zeev's fixes in CVS (which include changes in the suspicious
area in sapi/apache/mod_php4.c) resolve this issue (tested on the original reporting system).

This bug should be closed.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC