Re: [PHP] filesize() fails on file and works on it's copy (same permissions, same directory)

2013-09-23 Thread Negin Nickparsa
regardless of you, saying they have same permissions I think they do not have the same permission try to use --reference for chmod to see if there is any differences try to copy the file keeping the whole permissions from original using sudo cp -rp and check. if this copy has the warning then

Re: [PHP] filesize() fails on file and works on it's copy (same permissions, same directory)

2013-09-23 Thread Carsten Jensen
if you have console access and the cli version of php works, what does echo filesize('/path/to/file'); tell (try running as root, then later as uid 51/webuser) this will eliminate permission doubts also you should use ?php as start tag instead of only ? cheers Carsten On 09/23/2013 10:06

Re: [PHP] filesize() fails on file and works on it's copy (same permissions, same directory)

2013-09-23 Thread Tamara Temple
On Aug 13, 2013, at 3:00 AM, Michał Kochanowicz mic...@michal.waw.pl wrote: Hello I've got a file, which can't be checked with filesize(). I copy it (with permissions) and then I can filesize() the copy. This is same directory, permissions are same. I don't understand what's the

Re: [PHP] filesize() fails on file and works on it's copy (same permissions, same directory)

2013-09-23 Thread Michał Kochanowicz
W dniu 2013-09-23 10:06, Negin Nickparsa pisze: regardless of you, saying they have same permissions I think they do not have the same permission The reason was 64-bit inode number. PHP can't stat() files with 64-bit nodes, at lease on 32-bit system. Regards Michał -- PHP General Mailing

Re: [PHP] filesize() fails on file and works on it's copy (same permissions, same directory)

2013-09-23 Thread Michał Kochanowicz
W dniu 2013-09-23 17:24, Tamara Temple pisze: That is one whopping-big inode number — I am really out on a limb here, but is this a 32-bit vs 64-bit issue? You're right - 64-bit inode number was a cause. I had to add inode32 mount option (XFS). Regards Michał -- PHP General Mailing List

Re: [PHP] filesize question

2013-05-08 Thread tamouse mailing lists
On Tue, May 7, 2013 at 10:16 PM, Curtis Maurand cur...@maurand.com wrote: find -name *.js -exec removestring.php '{}' \; That's how I get the I put file name. I think that I need the if statement to look at the filesize and make sure that I can open them and they are at least the size of the

Re: [PHP] filesize question

2013-05-07 Thread ma...@behnke.biz
Curtis Maurand cur...@maurand.com hat am 7. Mai 2013 um 15:16 geschrieben: Hello, I'm feeding a filename to a php script on the command line (command line program). I run the following against it: $inputline = fread($inputfile, filesize($argv[1])); mayve $inputline = fread($inputfile,

Re: [PHP] filesize question

2013-05-07 Thread tamouse mailing lists
On Tue, May 7, 2013 at 8:16 AM, Curtis Maurand cur...@maurand.com wrote: Hello, I'm feeding a filename to a php script on the command line (command line program). I run the following against it: $inputline = fread($inputfile, filesize($argv[1])); I'm getting an error complaining that the

Re: [PHP] filesize() and mime_content_type()

2007-06-09 Thread Daniel Brown
On 6/8/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, June 7, 2007 12:04 pm, Chris Boget wrote: Have you uncommented or added `extension=php_mime_magic.dll` in your php.ini file for mime_content_type()? What about adding something like this, as well: extension=php_mime_magic.dll

Re: [PHP] filesize() and mime_content_type()

2007-06-08 Thread Richard Lynch
On Thu, June 7, 2007 12:04 pm, Chris Boget wrote: Have you uncommented or added `extension=php_mime_magic.dll` in your php.ini file for mime_content_type()? What about adding something like this, as well: extension=php_mime_magic.dll is commented out in my php.ini. So that explains

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Daniel Brown
On 6/7/07, Chris Boget [EMAIL PROTECTED] wrote: Is there anything special you need to do to utilize these functions? The former says it's available in versions 4 and 5 while the latter states that it's available in versions = 4.3 and 5 (although is deprecated). I'm currently running PHP

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and check (possibly using phpinfo()) to find out if

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Daniel Brown
On 6/7/07, Chris Boget [EMAIL PROTECTED] wrote: Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that would be missing? Is there somewhere I can go and check (possibly using phpinfo()) to find out if

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Daniel Brown
On 6/7/07, Daniel Brown [EMAIL PROTECTED] wrote: On 6/7/07, Chris Boget [EMAIL PROTECTED] wrote: Sounds like a problem with the installation. What could go wrong with an installation on a Windows machine that uses the binaries? Why would it be only these functions (that I can tell) that

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Oh, I also forgot to ask what do you get when you use stat()? stat() works, but not if I pass in the actual name of the file. I have to use fstat() in order to get the proper data. I'll have to check to see if there are any functions disabled in the php.ini (I don't believe there are

Re: [PHP] filesize() and mime_content_type()

2007-06-07 Thread Chris Boget
Have you uncommented or added `extension=php_mime_magic.dll` in your php.ini file for mime_content_type()? What about adding something like this, as well: extension=php_mime_magic.dll is commented out in my php.ini. So that explains why the mime_content_type() isn't working. That's fine.

Re: [PHP] filesize() Returns a file size. What will return a directorysize()???

2005-03-29 Thread Lupita
Yes it is on a Linux system. I have done a little research and I am having a hard time finding info about executing shell commands with php. This seems like a very interesting possibility being able to use shell commands. Any info you could point me to would be very appreciated. I did find this

Re: [PHP] filesize() Returns a file size. What will return a directorysize()???

2005-03-29 Thread Dotan Cohen
On Tue, 29 Mar 2005 08:51:49 -0800, Lupita [EMAIL PROTECTED] wrote: Yes it is on a Linux system. I have done a little research and I am having a hard time finding info about executing shell commands with php. This seems like a very interesting possibility being able to use shell commands. Any

RE: [PHP] filesize() Returns a file size. What will return a directorysize()???

2005-03-28 Thread Jay Blanchard
[snip] I have been looking for a solution to get the disk size of a directory. I would like to be able to get the size of a directory with sub directories under it. Will I need to loop through file sizes to get the total directory size? [/snip] If you are on a *nix system of some sort you could

Re: [PHP] filesize ????

2005-03-15 Thread Rasmus Lerdorf
[EMAIL PROTECTED] wrote: I need to calculate the size of an html email with embedded images. Filesize doesn't work to this purpose. How could I do without parsing the html file? If the images are embedded, by which I suppose you mean attached, then filesize() should be fine. If you mean they are

Re: [PHP] filesize math

2004-12-24 Thread tg-php
Well, depends on your definition of a kb, mb, gb, etc.. You seem to be mixing definitions here. One school of thought is that... 1000 bytes = 1 kb 1000 kb = 1 mb 1000 mb = 1 gb In reality... 1024 bytes = 1 kb 1024 kb = 1 mb 1024 mb = 1 gb You're checking filesize against the '1000' method

Re: [PHP] filesize math

2004-12-24 Thread Greg Donald
On Fri, 24 Dec 2004 04:15:10 -0500, Sebastian [EMAIL PROTECTED] wrote: i made this function and want to know if i am doing the math correctly.. seems to be caculating ok.. $filesize is in bytes.. if the filesize is under 1MB i want to show KBs, if its under 1GB i want to show MB, if its over

Re: [PHP] Filesize

2004-06-23 Thread Matt Matijevich
[snip] Have I gone loopy? Wait, don't answer that. Do I need to do something else to get the file size? I have read and searched, but to no avail yet. TIA! [/snip] Have you tried absolute path in filesize($theFile); or maybe chdir to $arrDirectory[$i] -- PHP General Mailing List

Re: [PHP] Filesize

2004-06-23 Thread Geethanandh Kandasamy
the file should be in he same folder as that of the php script, otherwise you have to mention the absolute/relative path Geethanandh On Wed, 23 Jun 2004 15:06:52 -0500, Jay Blanchard [EMAIL PROTECTED] wrote: Boy you'd think that this would be simple, but I get no filesize with the following

RE: [PHP] Filesize

2004-06-23 Thread Jay Blanchard
[snip] the file should be in he same folder as that of the php script, otherwise you have to mention the absolute/relative path [/snip] I have tried the absolute path, it doesn't waork. Crud. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Filesize

2004-06-23 Thread Marek Kilimajer
Jay Blanchard wrote --- napísal:: Boy you'd think that this would be simple, but I get no filesize with the following for($i = 4; $i count($arrDirectory); $i++){ if(is_dir($arrDirectory[$i])){ if($theDir = opendir($arrDirectory[$i])){

Re: [PHP] Filesize

2004-06-23 Thread Geethanandh Kandasamy
while(($theFile = readdir($theDir)) !== FALSE){ != not !== On Wed, 23 Jun 2004 15:06:52 -0500, Jay Blanchard [EMAIL PROTECTED] wrote: Boy you'd think that this would be simple, but I get no filesize with the following for($i = 4; $i count($arrDirectory); $i++){

RE: [PHP] Filesize SOLVED

2004-06-23 Thread Jay Blanchard
[snip] Boy you'd think that this would be simple, but I get no filesize with the following [/snip] I HAVE gone loopy I was concating the directory HANDLE instead of the directory PATH...problem solved, idiot slapped in/on forehead -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Filesize

2004-06-23 Thread Justin Patrin
On Wed, 23 Jun 2004 16:30:59 -0400, Geethanandh Kandasamy [EMAIL PROTECTED] wrote: while(($theFile = readdir($theDir)) !== FALSE){ != not !== !== is correct, check the manual. If you had a directory named 0, != false would be false. -- paperCrane --Justin Patrin-- -- PHP General

Re: [PHP] filesize() error - Can anyone help?

2003-10-20 Thread R'twick Niceorgaw
Hi, Jacques Roux said the following on 10/17/2003 10:55 AM Dear All I am getting the following error message when I open some of the page on my Web Site. What could the problem be and how can I correct it? Warning: filesize() [function.filesize]: Stat failed for

Re: [PHP] filesize comparison for upload

2003-07-21 Thread CPT John W. Holmes
I have an upload form that will be used for some really large files. I need to ask a couple of questions about the ways of improving the success rate that I have using it. (1) what is the best and most stable method for uploading a large file. Sometimes the transfer peters out. (2) how can I

Re: [PHP] FileSize and file_exist failing a file that I am sure is there

2002-11-12 Thread Ernest E Vogelsinger
At 17:27 12.11.2002, Brandon Orther spoke out and said: [snip] When try to get a file_exist response I get the following error: Warning: stat failed for /home/admin/2002-11-12-Part1.mp3 (errno=2 - No such file or directory) in

RE: [PHP] FileSize and file_exist failing a file that I am sure is there

2002-11-12 Thread Brandon Orther
://www.webintellects.com/ -Original Message- From: Ernest E Vogelsinger [mailto:ernest;vogelsinger.at] Sent: Tuesday, November 12, 2002 9:42 AM To: Brandon Orther Cc: PHP User Group Subject: Re: [PHP] FileSize and file_exist failing a file that I am sure

Re: [PHP] FileSize -- fread($fd, 7000)

2001-08-16 Thread Mukul Sabharwal
Hi, fread($fd, filesize(somefile.txt)); --- Augusto Cesar Castoldi [EMAIL PROTECTED] wrote: Hi. instead use 7000 in fread($fd, 7000), i'd like to use the size of the file opened. How can I know the size of the fopen? thanks. Augusto -- PHP General Mailing List

Re: [PHP] FileSize -- fread($fd, 7000)

2001-08-16 Thread Mukul Sabharwal
Subject: Re: [PHP] FileSize -- fread($fd, 7000) Hi, fread($fd, filesize(somefile.txt)); --- Augusto Cesar Castoldi [EMAIL PROTECTED] wrote: Hi. instead use 7000 in fread($fd, 7000), i'd like to use the size of the file opened. How can I know the size of the fopen