filemtime(): stat failed for file.jpg
filemtime(): stat failed for file.jpg
am 07.10.2007 15:52:00 von Erik Kullberg
I get a warning message from filemtime() that looks in principle like this:
"stat failed for picture.jpg on line xxx"
filemtime($filename) then comes out empty.
This happens in a loop over all files (not only jpg) in a directory - the
same result for all files.
The files are definitely there.
What is wrong and how can it be cured?
Would appreciate some help!
/ Erik
Re: filemtime(): stat failed for file.jpg
am 07.10.2007 20:20:35 von Shion
Erik Kullberg wrote:
> I get a warning message from filemtime() that looks in principle like this:
> "stat failed for picture.jpg on line xxx"
> filemtime($filename) then comes out empty.
Would guess the filesystem you have don't support this function, I would
suggest you try it on an alternative filesystem like ext3 and see if you get a
difference.
--
//Aho
Re: filemtime(): stat failed for file.jpg
am 07.10.2007 21:33:04 von Brendan Gillatt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Erik Kullberg wrote:
> I get a warning message from filemtime() that looks in principle like this:
> "stat failed for picture.jpg on line xxx"
> filemtime($filename) then comes out empty.
>
> This happens in a loop over all files (not only jpg) in a directory - the
> same result for all files.
> The files are definitely there.
> What is wrong and how can it be cured?
>
> Would appreciate some help!
> / Erik
>
>
>
You may have permission problems with the file. Make sure it is readable
to whichever user apache runs under. Can you open the file to read okay?
- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFHCTRvkA9dCbrNdDMRAhDHAJ0YoBCjrJ3tUI051mqHghNUklWcMgCe NyUA
syGMlt82hn1+5mxcLjI61/w=
=LQ/j
-----END PGP SIGNATURE-----
Re: filemtime(): stat failed for file.jpg
am 07.10.2007 22:29:51 von Erik Kullberg
Yes, the files are all readable.
I deleted the directory with its content, made a new directory with the same
name, ran the file generating program again and then ran this sequence that
contains filemtime() - the same result! Restart does not help either.
I guess that the error message means that the file status information cannot
be found/read? Where is that stored? Can I read it somehow? That might give
a hint about what is wrong...
/ Erik
"Brendan Gillatt" skrev i
meddelandet news:uNmdnQFRyaL6qZTanZ2dnUVZ8sjinZ2d@pipex.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Erik Kullberg wrote:
>> I get a warning message from filemtime() that looks in principle like
>> this:
>> "stat failed for picture.jpg on line xxx"
>> filemtime($filename) then comes out empty.
>>
>> This happens in a loop over all files (not only jpg) in a directory - the
>> same result for all files.
>> The files are definitely there.
>> What is wrong and how can it be cured?
>>
>> Would appreciate some help!
>> / Erik
>>
>>
>>
>
> You may have permission problems with the file. Make sure it is readable
> to whichever user apache runs under. Can you open the file to read okay?
>
> - --
> Brendan Gillatt
> brendan {at} brendangillatt {dot} co {dot} uk
> http://www.brendangillatt.co.uk
> PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
>
> iD8DBQFHCTRvkA9dCbrNdDMRAhDHAJ0YoBCjrJ3tUI051mqHghNUklWcMgCe NyUA
> syGMlt82hn1+5mxcLjI61/w=
> =LQ/j
> -----END PGP SIGNATURE-----
Re: filemtime(): stat failed for file.jpg
am 07.10.2007 22:34:40 von Brendan Gillatt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Erik Kullberg wrote:
> Yes, the files are all readable.
> I deleted the directory with its content, made a new directory with the same
> name, ran the file generating program again and then ran this sequence that
> contains filemtime() - the same result! Restart does not help either.
> I guess that the error message means that the file status information cannot
> be found/read? Where is that stored? Can I read it somehow? That might give
> a hint about what is wrong...
> / Erik
I'm afraid that this information is part of the filesystem and not
normally accessible. As J.O. Aho said, your filesystem might be the
problem. Which one are you using?
- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
iD8DBQFHCULgkA9dCbrNdDMRAqXkAJ9AWoEwO1QrKm66u0E7689IQK/vAACf bc35
Y+43du2uddlaJXV0rgT675M=
=j9O6
-----END PGP SIGNATURE-----
Re: filemtime(): stat failed for file.jpg
am 12.10.2007 08:40:35 von Erik Kullberg
I found it at last!
The file name I gave in "filemtime" was just the file name - I forgot to
include the path!
Unbelievable - how stupid can you get?!
/ Erik
"Brendan Gillatt" skrev i
meddelandet news:uNmdnQFRyaL6qZTanZ2dnUVZ8sjinZ2d@pipex.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Erik Kullberg wrote:
>> I get a warning message from filemtime() that looks in principle like
>> this:
>> "stat failed for picture.jpg on line xxx"
>> filemtime($filename) then comes out empty.
>>
>> This happens in a loop over all files (not only jpg) in a directory - the
>> same result for all files.
>> The files are definitely there.
>> What is wrong and how can it be cured?
>>
>> Would appreciate some help!
>> / Erik
>>
>>
>>
>
> You may have permission problems with the file. Make sure it is readable
> to whichever user apache runs under. Can you open the file to read okay?
>
> - --
> Brendan Gillatt
> brendan {at} brendangillatt {dot} co {dot} uk
> http://www.brendangillatt.co.uk
> PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBACD7433
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
>
> iD8DBQFHCTRvkA9dCbrNdDMRAhDHAJ0YoBCjrJ3tUI051mqHghNUklWcMgCe NyUA
> syGMlt82hn1+5mxcLjI61/w=
> =LQ/j
> -----END PGP SIGNATURE-----