Re: [PHP] Problem with file_exists() and clearstatcache()...

2004-10-25 Thread Louie Miranda
i also hve a similar problem like yours, and i dont know how can we solve this.


On Wed, 21 Jul 2004 17:22:16 -0400, Scott Fletcher [EMAIL PROTECTED] wrote:
 I noticed the problem with the php functions, file_exists() and
 clearstatcache().  When I load a webpage, the php do the file_exists() and
 attempt to create one if the file does not exist.  Then when I go to the
 next webpage, that file is removed.  It is working pretty well.  When I
 press refresh, it work okay.  (removed the file upon unloading and create a
 new file upon loading).  It work okay if I go from this page to a neutral
 webpage (with no file checking feature) then back to this page.  It work
 great.  But if I go from this page to the other webpage (with file
 checking), it showed the existance of the file even though there isn't one.
 So, I add the sleep() to see how long does it take for it to recognize that
 there is really no file itself.  There I found that it take 40 or 45 seconds
 for PHP to finally see that even though it was already removed from the last
 webpage.
 
 Why is that?  I tried with  without clearstatcache() and it have no effect.
 Is there some alternative to file_exists() that I can use??  I hope I'm
 explaining it clearly...
 
 FletchSOD
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
Louie Miranda
http://www.axishift.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem with file_exists() and clearstatcache()...

2004-07-21 Thread Scott Fletcher
I noticed the problem with the php functions, file_exists() and
clearstatcache().  When I load a webpage, the php do the file_exists() and
attempt to create one if the file does not exist.  Then when I go to the
next webpage, that file is removed.  It is working pretty well.  When I
press refresh, it work okay.  (removed the file upon unloading and create a
new file upon loading).  It work okay if I go from this page to a neutral
webpage (with no file checking feature) then back to this page.  It work
great.  But if I go from this page to the other webpage (with file
checking), it showed the existance of the file even though there isn't one.
So, I add the sleep() to see how long does it take for it to recognize that
there is really no file itself.  There I found that it take 40 or 45 seconds
for PHP to finally see that even though it was already removed from the last
webpage.

Why is that?  I tried with  without clearstatcache() and it have no effect.
Is there some alternative to file_exists() that I can use??  I hope I'm
explaining it clearly...

FletchSOD

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem with file_exists()

2003-03-25 Thread maillist
Hi,

I've been reported a weird problem with one of the scripts that we have, which 
uses the file_exists() function. It returned true once, and then the query 
ran again, and it reported false, on the same file. This was true for a lot 
of files in the same directory, but only over a cerain period of time. As I 
had time to try to investigate, the problem stopped occuring. This script has 
been used for a long time, and this is the first time that this has happened. 
I've checked some of the files that they were having problems with, and they 
have not been modified for a few days, so I doubt they were locked or 
anything like that. Does anyone have any idea what could be causing this? 
This is running Solaris 8, Apache 1.3.26 with PHP 4.2.1 compiled into it. 
I've also checked file permissions and they were all good. Any idea would be 
appreciated!

Thanks a lot,
Steve Johnson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem on file_exists() function

2002-07-17 Thread Jack

Dear all
I had made a test.txt file which stored in the following window path :
c:\pdf_reports\dealing\test.txt,
In my page, i ask php to check the test.txt exist in foler
(c:\pdf_reports\dealing) using the following script:

if (file_exists(c:\\pdf_reports\\dealing\\test.txt))
{
print (exist);
}
else
{
print (Doesn't Exist!);
}

It seems that php can't detect the file in such path!!!
I had made another test on this, i moved the test.txt to one level up which
is (c:\pdf_reports) and i use the following script :

if (file_exists(c:\\pdf_reports\\test.txt))
{
print (exist);
}
else
{
print (Doesn't Exist!);
}
Then it can detect the file is there! why?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Problem on file_exists() function

2002-07-17 Thread Analysis Solutions

On Wed, Jul 17, 2002 at 03:55:10PM +0800, Jack wrote:
 
 if (file_exists(c:\\pdf_reports\\dealing\\test.txt))
 It seems that php can't detect the file in such path!!!

While this isn't your problem, it's nicer coding.  Single quotes and 
forward slashes:

  if ( file_exists('c:/pdf_reports/dealing/test.txt') )


 if (file_exists(c:\\pdf_reports\\test.txt))
 Then it can detect the file is there! why?

Probably, PHP doesn't have permissions on the dealing directory or you 
misspelled it.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Problem on file_exists()

2002-07-16 Thread Jack

Dear all
I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
room\report) it stores a lot of PDF reports in there.
I'm trying to use the file_exists() function to detect if a specific file
exist in this folder, but i got a problem is :
It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
through (dealing room) folder. i had made test on it, i moved a file into
(\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
(\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?

I'm using php in windows NT IIS environment!

Please help me!

--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Problem on file_exists()

2002-07-16 Thread David Redmond

Jack, try using forward slashes instead of backslashes;eg

$fp = fopen(//nedcoraa/pdf_reports/dealing/filename.ext, r+);

Cheers

-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 16 July 2002 5:02 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Problem on file_exists()


Dear all
I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
room\report) it stores a lot of PDF reports in there.
I'm trying to use the file_exists() function to detect if a specific file
exist in this folder, but i got a problem is :
It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
through (dealing room) folder. i had made test on it, i moved a file into
(\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
(\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?

I'm using php in windows NT IIS environment!

Please help me!

--
Thx a lot!
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Problem on file_exists()

2002-07-16 Thread Chris Hewitt

Jack wrote:

Dear all
I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing
room\report) it stores a lot of PDF reports in there.
I'm trying to use the file_exists() function to detect if a specific file
exist in this folder, but i got a problem is :
It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go
through (dealing room) folder. i had made test on it, i moved a file into
(\\nedcoraa\pdf_reports), then php can detect it, but if i move it to
(\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why?

I'm using php in windows NT IIS environment!

I think you will need to escape the space, usually with a \

HTH
Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php