From: Operating system: CentOS 6.2 PHP version: 5.3.9 Package: Streams related Bug Type: Bug Bug description:file_get_contents does not return all content
Description: ------------ This error began appearing a few days ago after I ran yum update, and recompiled PHP, using './configure' '--prefix=/home/arch120113' '--with-config-file- path=/home/arch120112/php' '--with-mysqli=mysqlnd' '--with-mysql=mysqlnd' '--with- pdo-mysql=mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '-- enable-mbstring' '--enable-sockets' '--with-bz2' '--with-curl' '--with-gd' '-- enable-gd-native-ttf' '--with-jpeg-dir=/opt' '--with-png-dir=/opt' '--with- gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '-- with-openssl' '--with-zlib' '--enable-zip' '--enable-fpm' '--with-freetype- dir=/usr/include/freetype2/' Now, when I use file_get_contents() on a large file (300KB), not the entire thing appears. Test script: --------------- https://www.cheatswhiz.com/info.php <?php <?php $expires_offset = 31536000; header('Content-Type: application/x-javascript; charset=UTF-8'); header('Vary: Accept-Encoding'); // Handle proxies header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); header("Cache-Control: public, max-age=$expires_offset"); echo file_get_contents('wp-includes/js/tinymce/wp-tinymce.js'); ?> File it's reading from is https://www.cheatswhiz.com/wp-includes/js/tinymce/wp-tinymce.js Expected result: ---------------- The entire content of the file is read. Actual result: -------------- Only part of the content is read -- Edit bug report at https://bugs.php.net/bug.php?id=60775&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60775&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60775&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60775&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60775&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60775&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60775&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60775&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60775&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60775&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60775&r=support Expected behavior: https://bugs.php.net/fix.php?id=60775&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60775&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60775&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60775&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60775&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60775&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60775&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60775&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60775&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60775&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60775&r=mysqlcfg