From: chella_it05 at yahoo dot co dot in Operating system: windows2003 PHP version: 5.1.6 PHP Bug Type: Compile Warning Bug description: i getting error while upload my files
Description: ------------ PHP was installed ii6, while uploading picture files to database, getting warning like this but add picture in database.. can't read or view retriveing pictures from database Reproduce code: --------------- if (is_uploaded_file($_FILES['userfile']['tmp_name'])) { $userfile = addslashes(fread(fopen($_FILES["userfile"]["tmp_name"], "r"),filesize($_FILES["userfile"]["tmp_name"]))); $file_name = $_FILES["userfile"]["name"]; $file_size = $_FILES["userfile"]["size"]; $file_type = $_FILES["userfile"]["type"]; Expected result: ---------------- Warning: filesize() [function.filesize]: stat failed for C:\WINDOWS\TEMP\php54.tmp in c:\Inetpub\wwwroot\project\picture.php on line 27 Warning: fread() [function.fread]: Length parameter must be greater than 0 in c:\Inetpub\wwwroot\project\picture.php on line 27 Actual result: -------------- . -- Edit bug report at http://bugs.php.net/?id=38666&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38666&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38666&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38666&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38666&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38666&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38666&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38666&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38666&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38666&r=support Expected behavior: http://bugs.php.net/fix.php?id=38666&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38666&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38666&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38666&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38666&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38666&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38666&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38666&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38666&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38666&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38666&r=mysqlcfg