Wierd set_include_path behaviour

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christian

    Wierd set_include_path behaviour

    Hi,

    The following instructions behave in a strange way :

    <?php
    echo "CURRENT = " . get_include_pat h() . "<br>";
    echo "OLD = " . set_include_pat h('/inc') . "<br>";
    echo "NEW = " . get_include_pat h() . "<br>";
    ?>

    I set my php.ini file as below :
    include_path = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library;
    Nothing's set in Apache's httpd.conf (no 'php_value include_path' setting).

    After starting Apache, when requesting the page, I get what I expect :

    CURRENT = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
    OLD = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
    NEW = /inc

    Though, after reloading a few times the page, the set_include_pat h()
    instruction doesn't work any longer :

    CURRENT = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
    OLD =
    NEW = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library

    In the first case, phpinfo() gives :
    Local Value : /inc
    Master Value : .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
    and then on:
    Local Value : .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
    Master Value : .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library

    By printing the PID of the Apache process executing the page, it seems that
    as long as the one that executed the set_include_pat h() instruction keeps
    executing the page, it works. But as soon as a new one takes it on, it
    fails.

    Any idea ? Thanks in advance.

    Apache 2.2.9
    PHP 5.2.5


    Christian


  • abadon

    #2
    Re: Wierd set_include_pat h behaviour

    are you using something like:

    php_admin_value include_path .....

    in your apache configuration, aren't you? :-)

    try to replace it with

    php_value include_path ....

    Comment

    • Christian

      #3
      Re: Wierd set_include_pat h behaviour


      "abadon" <bl4ckraven@gma il.coma écrit dans le message de news:
      d18fe477-d79c-48dc-8745-d5537d8215fa...l egroups.com...
      are you using something like:
      >
      php_admin_value include_path .....
      >
      in your apache configuration, aren't you? :-)
      >
      try to replace it with
      >
      php_value include_path ....
      no, as i said nothing is set on Apache side, neither 'php_value
      include_path' nor 'php_admin_valu e include_path'.


      Comment

      Working...