ID:               21310
 Updated 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 am able to duplicate this on Solaris 8, Apache 1.3.27, PHP 4.3.0.  I
traced it to getcwd() (aka VCWD_GETCWD) returning null, and
errno=EACCES in fopen_wrappers.c:expand_filepath().  The same code
works on 4.2.3.  However, this test was done in a non-standard
environment using Kerberos and a distributed file system, so this test
may not be representative.

For those of you experiencing this problem, check to see that there is
read perms on the afflicted directory and all ancestors.


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

[2003-01-23 06:41:04] [EMAIL PROTECTED]

Not to jump in..

Theres a cron job i've been running on a few servers and
it's survived quite a few php upgrades.  I tested
php4.3.0 on one of those servers (upgrading cli from 4.2.3)
and now the cron job refuses to run.  Same issue as above.
It appears the cli is not honoring include path. (My path
has a . (dot), and relative paths from the directory of
the script do not work after the upgrade.  The application
running on the webserver works fine on 4.3.0.

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

[2003-01-17 20:10:38] [EMAIL PROTECTED]

oops..


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

[2003-01-17 10:41:19] [EMAIL PROTECTED]

[EMAIL PROTECTED]:
Instead of spamming the bugdb with your theories, *please* respond to
our requests for more information in your own bug report.
We need *facts* to be able to fix the problem, and so far you haven't
given us any.

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

[2003-01-17 10:21:26] [EMAIL PROTECTED]

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.

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

[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.

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

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