PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > filemtime(): stat failed for file.jpg
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
filemtime(): stat failed for file.jpg

Réponse
 
LinkBack Outils de la discussion
Vieux 07/10/2007, 14h52   #1 (permalink)
Erik Kullberg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut filemtime(): stat failed for file.jpg

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 !
/ Erik



  Réponse avec citation
Vieux 07/10/2007, 19h20   #2 (permalink)
J.O. Aho
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: filemtime(): stat failed for file.jpg

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
  Réponse avec citation
Vieux 07/10/2007, 20h33   #3 (permalink)
Brendan Gillatt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: filemtime(): stat failed for file.jpg

-----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 !
> / 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?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFHCTRvkA9dCbrNdDMRAhDHAJ0YoBCjrJ3tUI051mqHgh NUklWcMgCeNyUA
syGMlt82hn1+5mxcLjI61/w=
=LQ/j
-----END PGP SIGNATURE-----
  Réponse avec citation
Vieux 07/10/2007, 21h29   #4 (permalink)
Erik Kullberg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: filemtime(): stat failed for file.jpg

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 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" <brendanREMOVETHIS@brendanREMOVETHISgillatt.co.u k> 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 !
>> / 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?...rch=0xBACD7433
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
>
> iD8DBQFHCTRvkA9dCbrNdDMRAhDHAJ0YoBCjrJ3tUI051mqHgh NUklWcMgCeNyUA
> syGMlt82hn1+5mxcLjI61/w=
> =LQ/j
> -----END PGP SIGNATURE-----



  Réponse avec citation
Vieux 07/10/2007, 21h34   #5 (permalink)
Brendan Gillatt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: filemtime(): stat failed for file.jpg

-----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 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?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFHCULgkA9dCbrNdDMRAqXkAJ9AWoEwO1QrKm66u0E768 9IQK/vAACfbc35
Y+43du2uddlaJXV0rgT675M=
=j9O6
-----END PGP SIGNATURE-----
  Réponse avec citation
Vieux 12/10/2007, 07h40   #6 (permalink)
Erik Kullberg
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: filemtime(): stat failed for file.jpg

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" <brendanREMOVETHIS@brendanREMOVETHISgillatt.co.u k> 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 !
>> / 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?...rch=0xBACD7433
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
>
> iD8DBQFHCTRvkA9dCbrNdDMRAhDHAJ0YoBCjrJ3tUI051mqHgh NUklWcMgCeNyUA
> syGMlt82hn1+5mxcLjI61/w=
> =LQ/j
> -----END PGP SIGNATURE-----



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 01h43.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12494 seconds with 14 queries