php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38666 i getting error while upload my files
Submitted: 2006-08-31 08:17 UTC Modified: 2006-09-09 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: chella_it05 at yahoo dot co dot in Assigned:
Status: No Feedback Package: IIS related
PHP Version: 5.1.6 OS: windows2003
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chella_it05 at yahoo dot co dot in
New email:
PHP Version: OS:

 

 [2006-08-31 08:17 UTC] chella_it05 at yahoo dot co dot in
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:
--------------
.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-31 08:27 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2006-09-01 04:54 UTC] chella_it05 at yahoo dot co dot in
In my database(mysql), all fields were added successfully except(picture files, BLOB) i check it while image array types then it ll added..  i done another method like add directel picture files to database..

then picture files can't show properly, only half of image was display and not clear view.. 
i'm normally using <?php ?> those type of tags only...
 [2006-09-01 09:39 UTC] tony2001@php.net
I still do not understand what you're talking about.
A short and complete reproduce script would help more than thousand of words. 
 [2006-09-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC