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" ?
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" ?
- Follow-Ups:
- Re: include_path
- From: Hendrik Schmieder
- Re: include_path
- References:
- Re: New to PHP
- From: Ferenc Kovacs
- Re: New to PHP
- From: Ferenc Kovacs
- Re: New to PHP
- Prev by Date: Re: New to PHP
- Next by Date: Re: include_path
- Previous by thread: Re: New to PHP
- Next by thread: Re: include_path
- Index(es):