Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at https://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: brandonkirsch at gmail dot com Reported by:dctucker at hotmail dot com Summary:stat failed on cifs-mounted files Status: Feedback Type: Bug Package:Filesystem function related Operating System: Arch Linux (current) PHP Version:5.3.2 Block user comment: N Private report: N New Comment: We recently upgraded our underlying Linux OS and ran into this same issue. For other Googlers who come across this bug report: Use the "noserverino" mount option as specified by others. If you want to know more about this issue, see: http://linux.die.net/man/8/mount.cifs The important thing to know is that CIFS servers will frequently return inode integer values that are greater than 31^2. If you read the PHP documentation for these filesystem functions, you will find a disclaimer that these large unsigned integer values will break in PHP. Disable the possibility of really big inode numbers from your CIFS mounts by using the "noserverino" mount option. Previous Comments: [2010-07-30 15:20:05] beststom14 at hotmail dot com Same issue. Windows Seven 32 bit. When programming a file manager i found that some dirs were being listed as files. For some reason when i create a new dir it gets listed correctly but when i COPY it from somewhere it is listed as a file. [2010-06-04 08:32:44] m...@php.net Cannot reproduce, still works fine here. When you edit your report, please re-open it, too. [2010-06-03 20:37:31] dctucker at hotmail dot com The mount command lacks noserverino: $ tail -n 1 /etc/fstab //theword/d /mnt/theword cifs nocase,file_mode=0664,dir_mode=0775,username=Administrator%,uid=nobody 0 0 [2010-05-21 11:23:44] m...@php.net How does the mount command look like, so that it fails? [2010-05-20 21:54:15] dctucker at hotmail dot com Mike, Using the 'noserverino' workaround does mitigate the problem, but it does not address the underlying issue. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=51266 -- Edit this bug report at https://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: beststom14 at hotmail dot com Reported by:dctucker at hotmail dot com Summary:stat failed on cifs-mounted files Status: Feedback Type: Bug Package:Filesystem function related Operating System: Arch Linux (current) PHP Version:5.3.2 Block user comment: N New Comment: Same issue. Windows Seven 32 bit. When programming a file manager i found that some dirs were being listed as files. For some reason when i create a new dir it gets listed correctly but when i COPY it from somewhere it is listed as a file. Previous Comments: [2010-06-04 08:32:44] m...@php.net Cannot reproduce, still works fine here. When you edit your report, please re-open it, too. [2010-06-03 20:37:31] dctucker at hotmail dot com The mount command lacks noserverino: $ tail -n 1 /etc/fstab //theword/d /mnt/theword cifs nocase,file_mode=0664,dir_mode=0775,username=Administrator%,uid=nobody 0 0 [2010-05-21 11:23:44] m...@php.net How does the mount command look like, so that it fails? [2010-05-20 21:54:15] dctucker at hotmail dot com Mike, Using the 'noserverino' workaround does mitigate the problem, but it does not address the underlying issue. [2010-05-20 12:19:16] m...@php.net Works fine here too, so I assume it's not a PHP bug. The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51266 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: dctucker at hotmail dot com Reported by: dctucker at hotmail dot com Summary: stat failed on cifs-mounted files Status: Feedback Type: Bug Package: Filesystem function related Operating System: Arch Linux (current) PHP Version: 5.3.2 New Comment: The mount command lacks noserverino: $ tail -n 1 /etc/fstab //theword/d /mnt/theword cifs nocase,file_mode=0664,dir_mode=0775,username=Administrator%,uid=nobody 0 0 Previous Comments: [2010-05-21 11:23:44] m...@php.net How does the mount command look like, so that it fails? [2010-05-20 21:54:15] dctucker at hotmail dot com Mike, Using the 'noserverino' workaround does mitigate the problem, but it does not address the underlying issue. [2010-05-20 12:19:16] m...@php.net Works fine here too, so I assume it's not a PHP bug. [2010-03-24 20:05:42] mail at daniel-berlin dot de Adding cifs option "noserverino" solves the problem. [2010-03-23 19:23:33] mail at daniel-berlin dot de Sorry, I meant 5.2.4 ... The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51266 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: dctucker at hotmail dot com Reported by: dctucker at hotmail dot com Summary: stat failed on cifs-mounted files Status: Bogus Type: Bug Package: Filesystem function related Operating System: Arch Linux (current) PHP Version: 5.3.2 New Comment: Mike, Using the 'noserverino' workaround does mitigate the problem, but it does not address the underlying issue. Previous Comments: [2010-05-20 12:19:16] m...@php.net Works fine here too, so I assume it's not a PHP bug. [2010-03-24 20:05:42] mail at daniel-berlin dot de Adding cifs option "noserverino" solves the problem. [2010-03-23 19:23:33] mail at daniel-berlin dot de Sorry, I meant 5.2.4 ... [2010-03-23 19:20:19] mail at daniel-berlin dot de For me, it doesn't even work with PHP 5.3.2 [2010-03-10 21:13:33] dctucker at hotmail dot com I would also like to add that this bug did not exist in versions prior to php-5.2.5 The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=51266 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: mail at daniel-berlin dot de Reported by: dctucker at hotmail dot com Summary: stat failed on cifs-mounted files Status: Open Type: Bug Package: Filesystem function related Operating System: Arch Linux (current) PHP Version: 5.3.2 New Comment: Adding cifs option "noserverino" solves the problem. Previous Comments: [2010-03-23 19:23:33] mail at daniel-berlin dot de Sorry, I meant 5.2.4 ... [2010-03-23 19:20:19] mail at daniel-berlin dot de For me, it doesn't even work with PHP 5.3.2 [2010-03-10 21:13:33] dctucker at hotmail dot com I would also like to add that this bug did not exist in versions prior to php-5.2.5 [2010-03-10 21:09:04] dctucker at hotmail dot com Works fine under shell with the same user as PHP runs in Apache: $ sudo -u nobody stat /mnt/share/Dir/file.wav File: `/mnt/share/Dir/file.wav' Size: 159432852 Blocks: 311400 IO Block: 16384 regular file Device: fh/15d Inode: 281474976737089 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 99/ nobody) Gid: (0/ root) Access: 2010-03-08 09:01:09.98784 -0500 Modify: 2010-03-06 00:00:00.0 -0500 Change: 2010-03-05 07:31:34.933320700 -0500 [2010-03-10 21:06:22] dctucker at hotmail dot com Description: This bug affects filemtime, filesize, and other stat-related functions. When attempting to get file information from a file hosted on a mounted CIFS share (e.g. /mnt/share/Dir/file.wav), it fails. This is specifically a PHP problem because I am able to work around this problem by executing the stat command from a shell or using `back-tick operator`. Test script: --- Expected result: 18293749557 Actual result: -- Warning: filemtime(): stat failed for /mnt/share/Dir/file.wav in - on line 3 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: mail at daniel-berlin dot de Reported by: dctucker at hotmail dot com Summary: stat failed on cifs-mounted files Status: Open Type: Bug Package: Filesystem function related Operating System: Arch Linux (current) PHP Version: 5.3.2 New Comment: Sorry, I meant 5.2.4 ... Previous Comments: [2010-03-23 19:20:19] mail at daniel-berlin dot de For me, it doesn't even work with PHP 5.3.2 [2010-03-10 21:13:33] dctucker at hotmail dot com I would also like to add that this bug did not exist in versions prior to php-5.2.5 [2010-03-10 21:09:04] dctucker at hotmail dot com Works fine under shell with the same user as PHP runs in Apache: $ sudo -u nobody stat /mnt/share/Dir/file.wav File: `/mnt/share/Dir/file.wav' Size: 159432852 Blocks: 311400 IO Block: 16384 regular file Device: fh/15d Inode: 281474976737089 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 99/ nobody) Gid: (0/ root) Access: 2010-03-08 09:01:09.98784 -0500 Modify: 2010-03-06 00:00:00.0 -0500 Change: 2010-03-05 07:31:34.933320700 -0500 [2010-03-10 21:06:22] dctucker at hotmail dot com Description: This bug affects filemtime, filesize, and other stat-related functions. When attempting to get file information from a file hosted on a mounted CIFS share (e.g. /mnt/share/Dir/file.wav), it fails. This is specifically a PHP problem because I am able to work around this problem by executing the stat command from a shell or using `back-tick operator`. Test script: --- Expected result: 18293749557 Actual result: -- Warning: filemtime(): stat failed for /mnt/share/Dir/file.wav in - on line 3 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: mail at daniel-berlin dot de Reported by: dctucker at hotmail dot com Summary: stat failed on cifs-mounted files Status: Open Type: Bug Package: Filesystem function related Operating System: Arch Linux (current) PHP Version: 5.3.2 New Comment: For me, it doesn't even work with PHP 5.3.2 Previous Comments: [2010-03-10 21:13:33] dctucker at hotmail dot com I would also like to add that this bug did not exist in versions prior to php-5.2.5 [2010-03-10 21:09:04] dctucker at hotmail dot com Works fine under shell with the same user as PHP runs in Apache: $ sudo -u nobody stat /mnt/share/Dir/file.wav File: `/mnt/share/Dir/file.wav' Size: 159432852 Blocks: 311400 IO Block: 16384 regular file Device: fh/15d Inode: 281474976737089 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 99/ nobody) Gid: (0/ root) Access: 2010-03-08 09:01:09.98784 -0500 Modify: 2010-03-06 00:00:00.0 -0500 Change: 2010-03-05 07:31:34.933320700 -0500 [2010-03-10 21:06:22] dctucker at hotmail dot com Description: This bug affects filemtime, filesize, and other stat-related functions. When attempting to get file information from a file hosted on a mounted CIFS share (e.g. /mnt/share/Dir/file.wav), it fails. This is specifically a PHP problem because I am able to work around this problem by executing the stat command from a shell or using `back-tick operator`. Test script: --- Expected result: 18293749557 Actual result: -- Warning: filemtime(): stat failed for /mnt/share/Dir/file.wav in - on line 3 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1
Bug #51266 [Com]: stat failed on cifs-mounted files
Edit report at http://bugs.php.net/bug.php?id=51266&edit=1 ID: 51266 Comment by: dctucker at hotmail dot com Reported by: dctucker at hotmail dot com Summary: stat failed on cifs-mounted files Status: Open Type: Bug Package: Filesystem function related Operating System: Arch Linux (current) PHP Version: 5.3.2 New Comment: I would also like to add that this bug did not exist in versions prior to php-5.2.5 Previous Comments: [2010-03-10 21:09:04] dctucker at hotmail dot com Works fine under shell with the same user as PHP runs in Apache: $ sudo -u nobody stat /mnt/share/Dir/file.wav File: `/mnt/share/Dir/file.wav' Size: 159432852 Blocks: 311400 IO Block: 16384 regular file Device: fh/15d Inode: 281474976737089 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 99/ nobody) Gid: (0/ root) Access: 2010-03-08 09:01:09.98784 -0500 Modify: 2010-03-06 00:00:00.0 -0500 Change: 2010-03-05 07:31:34.933320700 -0500 [2010-03-10 21:06:22] dctucker at hotmail dot com Description: This bug affects filemtime, filesize, and other stat-related functions. When attempting to get file information from a file hosted on a mounted CIFS share (e.g. /mnt/share/Dir/file.wav), it fails. This is specifically a PHP problem because I am able to work around this problem by executing the stat command from a shell or using `back-tick operator`. Test script: --- Expected result: 18293749557 Actual result: -- Warning: filemtime(): stat failed for /mnt/share/Dir/file.wav in - on line 3 -- Edit this bug report at http://bugs.php.net/bug.php?id=51266&edit=1