include_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello,

I have installed PHP 5.3.3. (Solaris 10).
Is the bug submitted in 2004 (http://bugs.php.net/29698) fixed in PHP 5.3.3 ?

I have set inculde_path in my php.ini as following:
include_path = "/var/php/include:."

/var/php/include has 2 subdirectories:
/var/php/include/dir1
/var/php/include/dir2

I have vars.php file in /var/php/include/dir1

and my PHP script : test.php
===========
<?php
echo "A $color $fruit"; // A
include 'vars.php';
echo "A $color $fruit"; // A green apple
?>
============
when I run this script, it's not working as expected, and I've got errors like:
Warning:  include(vars.php) [function.include]: failed to open stream: No such
file or directory in /apache2/htdocs/test.php on line 5
Warning:  include() [function.include]:  Failed opening 'vars.php' for inclusion 
(include_path='/var/php/include:.')  in /apache2/htdocs/test.php on line 5

The script is working either I use :
include 'dir1/vars.php'
or
I move the vars.php from /var/php/include/dir1 to /var/php/incude

So my question is :
is include_path recursive ?
Or should I add all subdirectories in "include_path" ?


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux