RE: [PHP] Warning: filemtime() (errno=75 - Value too large for defined data type)
| From: | Kim Madsen | Date: | Mon, 30 May 2005 13:27:12 +0000 |
| Subject: | RE: [PHP] Warning: filemtime() (errno=75 - Value too large for defined data type) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-215989@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Andrew Brampton [mailto:andrew@bramp.freeserve.co.uk]
> Sent: Sunday, May 29, 2005 7:36 PM
> Hi,
> I'm receiving the following warning:
>
> Warning: filemtime(): Stat failed for master.log (errno=75 - Value too
> large
> for defined data type) in test.php on line 5
>
> when I do the following line of code:
> filemtime ('master.log');
>
> The file in question is over 2GB, but I'm not interested in its size, I
> just want to know the time it was last modified.
2 gigs? Ever considered rotating the logfile?
> I presume filemtime is just doing a stat which is failing when it tries to
> read the size field. Whatever the cause filemtime is returning false and
> displaying that warning.
>
> Does anyone know a work around for this warning (which does not involve
> shelling out a command line app)?
Rotate the logfile for instance once a month, Tar it up and move it to a proper place
> My code was working fine until the file reached 2GB.
> P.S I'm running PHP 4.3.10-13 on a Debian distro.
On some older systems there´s a 2gb limit: http://archives.neohapsis.com/archives/sf/forensics/2002-q2/0031.html
"Let me guess. The file is >2GB? If so, this is simply because your
file utilities are not compiled with large file (64 bit) support.
Here are some notes I have on fixing things for Linux:
Updates to Red Hat 7.1 system required to deal with large (>2GB)
partition image files with The Coroner's Toolkit and TCTutils/autopsy."
I think that´s the problem. Rotating the logfile is a nice and simple solution.
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper