[PHP-DEV] Bug #14420 Updated: is_file prints stat failed .. message

2001-12-12 Thread evsvit

ID: 14420
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Scripting Engine problem
Operating System: Redhat Linux
PHP Version: 4.1.0
New Comment:

Same problem appeared with is_dir() function. In this case I think we should check 
is_readable(), is_writable() and is_writeable() functions as well.

Previous Comments:


[2001-12-12 11:38:37] [EMAIL PROTECTED]

This is fixed in CVS. 

--Jani




[2001-12-11 21:33:37] [EMAIL PROTECTED]

Here is my conversation with Mike Rodgers. Maybe it will help to remember the 
conclusion of previous discussion.

Agreed.
These changes should be made into toggles.  If you ask me, if the file
doesn't exist, it's not a file.  That shouldn't be an error message.
--
Mike

- Original Message -
From: Vitali Evstigneev [EMAIL PROTECTED]
To: Mike Rogers [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 9:41 PM
Subject: Re: [PHP-DEV] Bug #14420: is_file prints stat failed .. message



 Hello Mike!
 Thanks for responding. I'm affraid I haven't described problem well
enough.
 Function is_file() still returns FALSE. But in the same time it types
error
 message to output. It doesn't affect program's flow but affects interface.
I
 understand that if we parse name is_file then function seems to be
 assuming that  argument  points either to existing file or folder or link.
 That's true amd I'm agree with you. We should use file_exists() first. But
 I'm talking about different thing. I'm talking about compatibility of code
 written on lower version with higher version i.e. succession of
versions.
 is_file() was written very long time ago, and it was working by some
way.
 People used that function and they knew that it works fine. Now, because
of
 our wish to make PHP language more beautiful and logically perfect, those
 people have to change tonns of code. Some code has been frosen for changes
 and they have to make more paper work to get approval from management for
 making changes and so one and so forth. Why don't we leave working
function
 in it's previous state and achieve succession of versions by that?

 Regards,
 Vitali

 - Original Message -
 From: Mike Rogers [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, December 12, 2001 7:16 AM
 Subject: Re: [PHP-DEV] Bug #14420: is_file prints stat failed .. message


  This has been changed.  Use exists() first.  Technically, if the file
does
  exist, it's not a file in my opinion and should return false, but nobody
  seems to agree with me.
  --
  Mike
 




[2001-12-11 21:05:11] [EMAIL PROTECTED]

This has been discussed, but I don't remeber the conclusion.
Anyone remember that?

I think we need consistent rule for error messages

Status = Duplicate



[2001-12-11 17:28:10] [EMAIL PROTECTED]

Please check if you changed the error_reporting() level.

Feedback.



[2001-12-11 04:01:05] [EMAIL PROTECTED]

We have found it out when upgraded our PHP from ver.4.0.1 to 4.1.0 . Function 
is_file() prints error message if file doesn't exist. The error message looks like:
Warning: stat failed for /home/.../index.phtml (errno=2 - No such file or directory) 
in /home/.../index.phtml on line 17
When I tried to simulate the problem in test file - it didn't appear . But then I 
included my configuration file which contained other inclusions for our corporate API. 
Problem appeared in the test file. I commented inclusion line - problem still appear.
After typing the message above, I refreshed that page - problem disappeared. All 
further tryings to cause error got failed.
Problem appears constanlty on our sites where we use this function.





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14420: is_file prints stat failed .. message

2001-12-11 Thread evsvit

From: [EMAIL PROTECTED]
Operating system: Redhat Linux
PHP version:  4.1.0
PHP Bug Type: Scripting Engine problem
Bug description:  is_file prints stat failed .. message

We have found it out when upgraded our PHP from ver.4.0.1 to 4.1.0 .
Function is_file() prints error message if file doesn't exist. The error
message looks like:
Warning: stat failed for /home/.../index.phtml (errno=2 - No such file or
directory) in /home/.../index.phtml on line 17
When I tried to simulate the problem in test file - it didn't appear . But
then I included my configuration file which contained other inclusions for
our corporate API. Problem appeared in the test file. I commented inclusion
line - problem still appear.
After typing the message above, I refreshed that page - problem
disappeared. All further tryings to cause error got failed.
Problem appears constanlty on our sites where we use this function.
-- 
Edit bug report at: http://bugs.php.net/?id=14420edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #14420 Updated: is_file prints stat failed .. message

2001-12-11 Thread evsvit

ID: 14420
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Duplicate
Bug Type: Scripting Engine problem
Operating System: Redhat Linux
PHP Version: 4.1.0
New Comment:

Here is my conversation with Mike Rodgers. Maybe it will help to remember the 
conclusion of previous discussion.

Agreed.
These changes should be made into toggles.  If you ask me, if the file
doesn't exist, it's not a file.  That shouldn't be an error message.
--
Mike

- Original Message -
From: Vitali Evstigneev [EMAIL PROTECTED]
To: Mike Rogers [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 11, 2001 9:41 PM
Subject: Re: [PHP-DEV] Bug #14420: is_file prints stat failed .. message



 Hello Mike!
 Thanks for responding. I'm affraid I haven't described problem well
enough.
 Function is_file() still returns FALSE. But in the same time it types
error
 message to output. It doesn't affect program's flow but affects interface.
I
 understand that if we parse name is_file then function seems to be
 assuming that  argument  points either to existing file or folder or link.
 That's true amd I'm agree with you. We should use file_exists() first. But
 I'm talking about different thing. I'm talking about compatibility of code
 written on lower version with higher version i.e. succession of
versions.
 is_file() was written very long time ago, and it was working by some
way.
 People used that function and they knew that it works fine. Now, because
of
 our wish to make PHP language more beautiful and logically perfect, those
 people have to change tonns of code. Some code has been frosen for changes
 and they have to make more paper work to get approval from management for
 making changes and so one and so forth. Why don't we leave working
function
 in it's previous state and achieve succession of versions by that?

 Regards,
 Vitali

 - Original Message -
 From: Mike Rogers [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, December 12, 2001 7:16 AM
 Subject: Re: [PHP-DEV] Bug #14420: is_file prints stat failed .. message


  This has been changed.  Use exists() first.  Technically, if the file
does
  exist, it's not a file in my opinion and should return false, but nobody
  seems to agree with me.
  --
  Mike
 


Previous Comments:


[2001-12-11 21:05:11] [EMAIL PROTECTED]

This has been discussed, but I don't remeber the conclusion.
Anyone remember that?

I think we need consistent rule for error messages

Status = Duplicate



[2001-12-11 17:28:10] [EMAIL PROTECTED]

Please check if you changed the error_reporting() level.

Feedback.



[2001-12-11 04:01:05] [EMAIL PROTECTED]

We have found it out when upgraded our PHP from ver.4.0.1 to 4.1.0 . Function 
is_file() prints error message if file doesn't exist. The error message looks like:
Warning: stat failed for /home/.../index.phtml (errno=2 - No such file or directory) 
in /home/.../index.phtml on line 17
When I tried to simulate the problem in test file - it didn't appear . But then I 
included my configuration file which contained other inclusions for our corporate API. 
Problem appeared in the test file. I commented inclusion line - problem still appear.
After typing the message above, I refreshed that page - problem disappeared. All 
further tryings to cause error got failed.
Problem appears constanlty on our sites where we use this function.





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


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]