php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21310 no such file (paths)
Submitted: 2002-12-31 05:10 UTC Modified: 2003-03-17 07:50 UTC
Votes:17
Avg. Score:4.6 ± 0.7
Reproduced:15 of 15 (100.0%)
Same Version:11 (73.3%)
Same OS:7 (46.7%)
From: czuma at poland dot org Assigned: wez (profile)
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 4.3.1 OS: Solaris 8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: czuma at poland dot org
New email:
PHP Version: OS:

 

 [2002-12-31 05:10 UTC] czuma at poland dot org
After upgrading to 4.3.0 version some PHP scripts stop working. I have checked, that the reason is problem with opening and including files.

FIRST EXAMPLE:

I had to change variable:
$blocked_list["kom.pl"] = "blockkom.txt";
--->
$blocked_list["kom.pl"] = "<full-path>blockkom.txt";

SECOND EXAMPLE:

-----------------------------------------------------------
Warning: main(main/linie.php) [function.main]: failed to create stream: No such file or directory in /www/klient34/start/dolacz.php on line 5

Warning: main() [function.main]: Failed opening 'main/linie.php' for inclusion (include_path=''.:..:/usr/local/lib/php'') in /www/klient34/start/dolacz.php on line 5
------------------------------------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-05 16:59 UTC] czuma at poland dot org
In my humble opinion it is a bug, because:

1. Previous version of PHP (4.0) could read file without full path, even if PHP couldnt read "." or higher directory.

2. PHP reads several directories (why?) when includes each file without full path.

2. There is no technical reason to give PHP access to read all directories from "/" to directories with PHP scripts.
 [2003-02-04 16:52 UTC] jflemer@php.net
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.
 [2003-03-17 07:50 UTC] wez@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC