Ernest E Vogelsinger wrote...
>> This has to be a PHP bug, which I'd be happy to file if someone more
>> experienced could confirm that it isn't stupid user error.
>
> I don't believe it has something to do with PHP, much more with the FTP server
> you're accessing... This might delay the actual
At 16:50 08.11.2002, Charles Wiltgen spoke out and said:
[snip]
>I tried require() too, but it made no difference. I later learned that if
>you fopen(), write some stuff, fflush() and ffclose(), that doesn't mean the
>file is complete (or that it even exists
Krzysztof Dziekiewicz wrote...
> Do you use "include" or "require". In such situation you should not use
> "include".
I tried require() too, but it made no difference. I later learned that if
you fopen(), write some stuff, fflush() and ffclose(), that doesn't mean the
file is complete (or that i
> I'm having file locking problems.
> I'm using fopen() to write a file via FTP. At the end, I'm doing...
> fflush($fp);
> fclose($fp);
> ...and then I include it immediately after. But many times I only get part
> of what I wrote to the file, which suggests that it wasn't really flush
Marco Tabini wrote...
> Ok, here's another possibly stupid solution.
Not at all. My solution was not far from that -- I have to wait for the
file to exist, and then to have something in it, and then include it. (See
my "PHP fopen() bug + solution" post.)
Thank you,
-- Charles Wiltgen
--
PH
Ok, here's another possibly stupid solution. Have you tried (a) setting
a pause (like 2 secs) between when you end writing and include the file
or (b) writing the file, then refreshing the page with a parameter and
including it only then? In the latter case, terminating the script and
refreshing it
Marco Tabini wrote...
> 1) What OS are you using?
Linux.
> 2) Does the file include PHP code?
Yes.
> If it contains PHP code, are you sure that there aren't any errors in the PHP
> code?
Yes. The resulting XHTML validates when the include works (more than half
the time). The rest of the tim
Charles,
2 questions--
1) What OS are you using?
2) Does the file include PHP code? Otherwise, can you keep its contents
in a string and simply output that string? If it contains PHP code, are
you sure that there aren't any errors in the PHP code?
Ok, so it was a bit more than 2 questions :-)
Charles Wiltgen wrote...
> I'm having file locking problems.
>
> I'm using fopen() to write a file via FTP. At the end, I'm doing...
>
> fflush($fp);
> fclose($fp);
>
> ...and then I include it immediately after. But many times I only get part
> of what I wrote to the file, which suggests
Marco Tabini wrote...
> Just a (possibly stupid) suggestion--is it possible that the file is being
> overwritten by another instance of your script that's run in the meantime?
This may also be a problem at some point, but currently I'm just trying to
get it working in an test environment where on
Just a (possibly stupid) suggestion--is it possible that the file is
being overwritten by another instance of your script that's run in the
meantime?
-
php|architect -- The Magazine for PHP Professionals
Check us out on the web at http://www.phparch.com
On Wed, 2002-11-06 at 23:06, Ch
Hello,
I'm having file locking problems.
I'm using fopen() to write a file via FTP. At the end, I'm doing...
fflush($fp);
fclose($fp);
...and then I include it immediately after. But many times I only get part
of what I wrote to the file, which suggests that it wasn't really flushed
a
12 matches
Mail list logo