ID:               22858
 User updated by:  excalibur at hub dot org
 Reported By:      excalibur at hub dot org
-Status:           No Feedback
+Status:           Open
 Bug Type:         Filesystem function related
 Operating System: FreeBSD 4.8-RC
 PHP Version:      4.3.1
 New Comment:

Hi Guy's, 

 Sorry I was unavailable for a bit there, at this time I do not have
the option of testing with the RC version of PHP. I will see what I can
go about finding an alternative area to test this out.


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

[2003-03-31 02:00:17] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



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

[2003-03-24 17:37:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

[2003-03-24 14:38:34] excalibur at hub dot org

Hi Guy's, 


 Got an issue that appears to be related to some other functions but as
this one is specific to a function I figured it's due it's own bug
posting. Ran into an issue where file() does not open relative file
names, for instance:

$words_file = "./config/filter.txt";
if (@is_readable($words_file)) {
 /* Read the file and iterate through the lines. */
 $lines = file($words_file);
 foreach ($lines as $line) {
  print $line."<BR>";
 }
}

 I get:

 Warning: file(./config/filter.txt) [function.file]: failed to create
stream: No such file or directory in
/usr/local/www/test.com/horde/lib/Text.php on line 41

Warning: Invalid argument supplied for foreach() in
/usr/local/www/test.com/horde/lib/Text.php on line 42

 Yet if I specify the full path to the very same file, it works fine:

$words_file = "/usr/local/www/test.com/horde/imp/config/filter.txt";
if (@is_readable($words_file)) {
 /* Read the file and iterate through the lines. */
 $lines = file($words_file);
 foreach ($lines as $line) {
  print $line."<BR>";
 }
}

The is_readable sees the file fine, but file itself fails.


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


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

Reply via email to