Page 1 of 1
is_file and filesize functions
Posted: Fri Nov 25, 2011 3:15 pm
by Kano
Hello guys,
Just returned to PHP coding and found some problems in my old scripts on new Apache 2.2.21 and PHP 5.3.8 server.
is_file and filesize functions return either false or E_Warning on files: *.rar !
Is it server configuration problem or just file.rar is not file in PHP?
Thx for your time,
Kano
Re: is_file and filesize functions
Posted: Fri Nov 25, 2011 10:28 pm
by thinsoldier
My guess is it's not php. is_file should be able to find any kind of file even if it has no file extension.
Re: is_file and filesize functions
Posted: Sun Nov 27, 2011 2:38 pm
by maxx99
Whats the size of this file? I had a similar problem once while accessing big (>2GB) file.
Re: is_file and filesize functions
Posted: Sun Nov 27, 2011 5:14 pm
by Kano
Thanks for replies.
The size of file is not exceeding 500-600 MB in some cases, but usually its something like 20-30 MB. I've read something about big rar archive size problem, but I suppose it is not my case. And if it is not PHP functionality limitation I experience, then maybe it is about php.ini? It is not wrong path or such for sure, I checked another file in the same dir with same path except filname and for *.jpg file everything fine... I thought it might be some kind of security limitation for functions to not work with archives or do I need to write inside this type of files somewhere.
Re: is_file and filesize functions
Posted: Sun Nov 27, 2011 6:40 pm
by McInfo
Kano wrote:is_file and filesize functions return either false or E_Warning on files: *.rar !
What is the text of the warning?
Re: is_file and filesize functions
Posted: Fri Dec 02, 2011 6:40 am
by Kano
Here is the example of the error text:
Warning: filetype() [function.filetype]: Lstat failed for Airport.rar in X:\\PATH\\materials.php on line 261
Meanwhile will check google for solution, I might missed something during last search.