ID:               35261
 Updated by:       [EMAIL PROTECTED]
 Reported By:      Bjorn dot Wiberg at its dot uu dot se
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: IBM AIX 5.2.0.0 ML5
 PHP Version:      5.1.1
 New Comment:

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




Previous Comments:
------------------------------------------------------------------------

[2005-12-13 13:49:08] Bjorn dot Wiberg at its dot uu dot se

Just confirmed that the same thing happens with PHP 5.1.1.

Best regards,
Björn

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

[2005-11-17 14:34:31] [EMAIL PROTECTED]

Please try using this CVS snapshot:

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



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

[2005-11-17 14:26:42] Bjorn dot Wiberg at its dot uu dot se

Description:
------------
When include_path is set using php_admin_value in httpd.conf, it is
still possible to override it in PHP scripts.

Shouldn't php_admin_value lock the value regardless of where the
attempt to change it is done? (With the exception that PHP
configuration directives for virtual hosts should be able to override
any PHP configurations done in the main server section of httpd.conf.)

The documentation states that include_path is of type PHP_INI_ALL and
can be changed from anywhere
(http://www.php.net/manual/en/ini.php#ini.list), but also states that
values set with php_admin_value directives cannot be overriden e.g. by
virtualhost directives (http://se2.php.net/configuration.changes) --
which isn't true -- overriding php_admin_value include_path of the main
server with another php_admin_value include_path in virtual host
configurations works just fine!

Best regards,
Björn

Reproduce code:
---------------
httpd.conf configuration of mod_php5:

  php_admin_value include_path ".:/apache/php/lib/php"

Example PHP script:

<HTML>

  <HEAD>
    <TITLE></TITLE>
  </HEAD>

  <BODY>

    <?php
      echo('Include path is: ' . ini_get('include_path') . '<BR>');
      $result = ini_set('include_path',
'.:/apache/php/lib/php:/apache/htdocs/bwiberg/php');

      if ($result === FALSE) {
        echo('ini_set returned FALSE<BR>');
      } else if (empty($result)) {
        echo('ini_set returned an empty string<BR>');
      } else {
        echo('ini_set returned ' . $result . ', include path is now: '
. ini_get('include_path') . '<BR>');
      }
    ?>

  </BODY>
</HTML>


Expected result:
----------------
Include path is: .:/apache/php/lib/php
ini_set returned FALSE
Include path is now: .:/apache/php/lib/php

..or possibly, as someone pointed out at
http://www.php.net/manual/en/function.ini-set.php#19874:

Include path is: .:/apache/php/lib/php
ini_set returned an empty string
Include path is now: .:/apache/php/lib/php

Actual result:
--------------
 Include path is: .:/apache/php/lib/php
ini_set returned .:/apache/php/lib/php
Include path is now: .:/apache/php/lib/php:/apache/htdocs/bwiberg/php



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


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

Reply via email to