php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8525 fileupload bug
Submitted: 2001-01-02 15:18 UTC Modified: 2001-03-09 21:22 UTC
From: manuel at stritt dot de Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4 OS: win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: manuel at stritt dot de
New email:
PHP Version: OS:

 

 [2001-01-02 15:18 UTC] manuel at stritt dot de
I have problems with fileupload with the new version (4.04).
With the old version ( 3.x) all worked fine.

Look at this:
$id=5;
$smallpic = stripslashes($bild);
                  if ((file_Exists($smallpic)) AND (!($smallpic=="")))
                  {
                   $fp = fopen($smallpic,  "r");
                   $datei = fread($fp, filesize($smallpic));
                   fclose($fp);
                   $smallname = $id."bild.jpg";
                   $fp = fopen("$bildpfad$smallname", "w+");
                   fwrite($fp, "$datei");
                   fclose($fp);
                  } else $smallname="";

Normally, in $smallname should be the correct filename
from the uploaded pic - but it's empty. It's empty, 
because the file does not exists.
In $smallname I have something like
"c:tempphp9005.TMP"    - but I think this is incorrect.

Well - with the old version (3.x) it worked fine.




 




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-04 05:08 UTC] mj@php.net
Do you use PHP as CGI or module? IIRC you can't use stripslashes($bild) in the module version on Win32.
Instead you have to access directly to $bild.

-Martin
 [2001-03-09 21:22 UTC] sniper@php.net
No feedback.

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 09:05:54 2022 UTC