ID:               21310
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         *Directory/Filesystem functions
 Operating System: Solaris 8
 PHP Version:      4.3.0
 New Comment:

I reported this same problem aka. (BUG) at Bug# 21674
I too was told this is not a bug. I just upgraded to 4.3.0 from 4.1.2.
This problem did not previously exist. I'm getting the exact same
messages. Why hasn't the tech group at php.net not recognized that this
is, in fact, a bug? Too many reported occurences and all seem related
to 4.3.0.

The issue is related to "include_path".

In my case, I have a file located at 
/home/sites/site2/web/IV/config.php

The above file contans the following lines:
include_once ('lang.php');
include ('extras.php'); 

I have another script located at 
/home/sites/site3/web/powerpage.php 
 -----> which contains the following lines: <---- 
require_once ("/home/sites/site2/web/IV/config.php");
langtop();

At first I thought it was a permissions issue. But then I rechecked my
debug process and found the errors are still occuring. (Actually they
appeared with another script of was testing that does similar path
includes.)

Warning: main(lang.php) [function.main]: failed to create stream: No
such file or directory in /home/sites/site2/web/IV/config.php on line
97

Warning: main() [function.main]: Failed opening 'lang.php' for
inclusion (include_path='') in /home/sites/site2/web/IV/config.php on
line 97

Warning: main(extras.php) [function.main]: failed to create stream: No
such file or directory in /home/sites/site2/web/IV/config.php on line
98

Warning: main() [function.main]: Failed opening 'extras.php' for
inclusion (include_path='') in /home/sites/site2/web/IV/config.php on
line 98


This is my guess.  PHP 4.3.0 now incorporates Stream functionality to
allow for references such as https or ssl:

I think that somewhere in this functionality, there was introduced a
hard dependency on absolute file paths that have now negatively
impacted on include functions calls such that if the include does not
reference a file in the same exact path as the calling script, the
above referenced errors will return indicating a failure to create the
stream connection to the requested file.

Just a guess. Im not a php guru. But I do know common sense.
How can all of us who have been affected by this, fix this annoying
problem?

Is it an issue with the PHP.ini file?
Is it an issue with the build process?
Are we now required to use absolute paths for all required includes or
require functions.

Notice: in my case my require_once does not error because I have
referenced the absolute path.


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

[2003-01-16 05:38:45] [EMAIL PROTECTED]

Both files are located in the same directory.

In my humble opinion, the reason of the problem is, that PHP wants to
read directory with file being included.

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

[2003-01-15 15:51:57] [EMAIL PROTECTED]

What are the exact locations of both the script trying to include() and
the file being included?


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

[2003-01-15 05:00:08] [EMAIL PROTECTED]

phpinfo(): .:/usr/local/lib/php
  php.ini: include_path = ".:/usr/local/lib/php"

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

[2003-01-15 03:18:37] [EMAIL PROTECTED]

What does phpinfo() output for include_path?
What is include_path set to in your php.ini file?


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

[2003-01-10 08:18:46] [EMAIL PROTECTED]

I also think it is a bugg.

On ours servers all directories have only eXecute access to other.

Give read access to other on all level is realy a problem.

Cordialy.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/21310

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

Reply via email to