php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47688 filemtime
Submitted: 2009-03-17 11:55 UTC Modified: 2009-03-17 12:06 UTC
From: password12345 at inwind dot it Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.2.9 OS: Deb1an
Private report: No CVE-ID: None
 [2009-03-17 11:55 UTC] password12345 at inwind dot it
Description:
------------
Warning: filemtime($file) and filesize($file)
if the dimensions of the files exceed the 2-3 Gb. 

Reproduce code:
---------------
#!/usr/local/php/bin/php
<?
clearstatcache();
$INT = 4294967295;//2147483647+2147483647+1;

foreach (glob("*") as $filename) {
  clearstatcache();
  $fm=filemtime($filename);
  $fs=filesize($filename);
  echo "File $filename time $fm size $fs\n";
}

exec("ls -al",$out);
for ($j=0;$j<=count($out);$j++) {
  echo "$out[$j]\n";
}
?>


Actual result:
--------------
# ./x.php
File mail_etc-0.tar.gz time 1237078946 size 391903
File mail_etc-1.tar.gz time 1237165351 size 391903
File mail_etc-2.tar.gz time 1237251752 size 391903
File mail_etc-3.tar.gz time 1236733344 size 391903
File mail_etc-4.tar.gz time 1236819742 size 391903
File mail_etc-5.tar.gz time 1236906791 size 391903
File mail_etc-6.tar.gz time 1236992539 size 391903
File mail_usr-0.tar.gz time 1237078945 size 134158206
File mail_usr-1.tar.gz time 1237165349 size 136975379
File mail_usr-2.tar.gz time 1237251750 size 125891072
File mail_usr-3.tar.gz time 1236733342 size 128491746
File mail_usr-4.tar.gz time 1236819741 size 125703927

Warning: filemtime(): stat failed for mail_usr-5.tar.gz in /var/local/backup/zipped/x.php on line 7
Warning: filesize(): stat failed for mail_usr-5.tar.gz in /var/local/backup/zipped/x.php on line 8
File mail_usr-5.tar.gz time  size

File mail_usr-6.tar.gz time 1236992537 size 131379664

Warning: filemtime(): stat failed for mail_var-0.tar.gz in /var/local/backup/zipped/x.php on line 7
Warning: filesize(): stat failed for mail_var-0.tar.gz in /var/local/backup/zipped/x.php on line 8
File mail_var-0.tar.gz time  size

Warning: filemtime(): stat failed for mail_var-1.tar.gz in /var/local/backup/zipped/x.php on line 7
Warning: filesize(): stat failed for mail_var-1.tar.gz in /var/local/backup/zipped/x.php on line 8
File mail_var-1.tar.gz time  size

Warning: filemtime(): stat failed for mail_var-2.tar.gz in /var/local/backup/zipped/x.php on line 7
Warning: filesize(): stat failed for mail_var-2.tar.gz in /var/local/backup/zipped/x.php on line 8
File mail_var-2.tar.gz time  size

Warning: filemtime(): stat failed for mail_var-5.tar.gz in /var/local/backup/zipped/x.php on line 7
Warning: filesize(): stat failed for mail_var-5.tar.gz in /var/local/backup/zipped/x.php on line 8
File mail_var-5.tar.gz time  size

Warning: filemtime(): stat failed for mail_var-6.tar.gz in /var/local/backup/zipped/x.php on line 7
Warning: filesize(): stat failed for mail_var-6.tar.gz in /var/local/backup/zipped/x.php on line 8

File mail_var-6.tar.gz time  size
File x time 1228924381 size 4096
File x.php time 1237289425 size 312

total 26018356
drwxr-sr-x 3 root staff       4096 2009-03-17 12:30 .
drwxr-sr-x 3 root staff       4096 2009-03-09 06:26 ..
-rw-r--r-- 1 root staff     391903 2009-03-15 02:02 mail_etc-0.tar.gz
-rw-r--r-- 1 root staff     391903 2009-03-16 02:02 mail_etc-1.tar.gz
-rw-r--r-- 1 root staff     391903 2009-03-17 02:02 mail_etc-2.tar.gz
-rw-r--r-- 1 root staff     391903 2009-03-11 02:02 mail_etc-3.tar.gz
-rw-r--r-- 1 root staff     391903 2009-03-12 02:02 mail_etc-4.tar.gz
-rw-r--r-- 1 root staff     391903 2009-03-13 02:13 mail_etc-5.tar.gz
-rw-r--r-- 1 root staff     391903 2009-03-14 02:02 mail_etc-6.tar.gz
-rw-r--r-- 1 root staff  134158206 2009-03-15 02:02 mail_usr-0.tar.gz
-rw-r--r-- 1 root staff  136975379 2009-03-16 02:02 mail_usr-1.tar.gz
-rw-r--r-- 1 root staff  125891072 2009-03-17 02:02 mail_usr-2.tar.gz
-rw-r--r-- 1 root staff  128491746 2009-03-11 02:02 mail_usr-3.tar.gz
-rw-r--r-- 1 root staff  125703927 2009-03-12 02:02 mail_usr-4.tar.gz
-rw-r--r-- 1 root staff 4285351561 2009-03-13 02:13 mail_usr-5.tar.gz
-rw-r--r-- 1 root staff  131379664 2009-03-14 02:02 mail_usr-6.tar.gz
-rw-r--r-- 1 root staff 4325402628 2009-03-15 03:03 mail_var-0.tar.gz
-rw-r--r-- 1 root staff 4331416751 2009-03-16 03:04 mail_var-1.tar.gz
-rw-r--r-- 1 root staff 4380545951 2009-03-17 03:05 mail_var-2.tar.gz
-rw-r--r-- 1 root staff 4247708455 2009-03-13 03:13 mail_var-5.tar.gz
-rw-r--r-- 1 root staff 4260856750 2009-03-14 03:01 mail_var-6.tar.gz
drwxr-sr-x 3 root staff       4096 2008-12-10 16:53 x
-rwx------ 1 root root         312 2009-03-17 12:30 x.php


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-17 12:06 UTC] jani@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #27792
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 22:01:28 2024 UTC