php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11198 File Upload Fails
Submitted: 2001-05-30 12:02 UTC Modified: 2001-05-30 22:14 UTC
From: php at shannonbrown dot net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.4pl1 OS: Linux 2.2.19
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: php at shannonbrown dot net
New email:
PHP Version: OS:

 

 [2001-05-30 12:02 UTC] php at shannonbrown dot net
File uploading simple does not work correctly for GIF and JPEG images.  The files upload, can be moved and saved, but will not display.  HTTP_POST_FILES[imagefile][type] is blank no matter which browser is used.

NOTE:  I note the CERN httpd exception.  I am running Apache 1.3.19.

Paths OK
Permissions OK

Image simply will not display.


        if (is_uploaded_file($imagefile))
        {       
                $uploadfilename = "100.jpg" ;

                $tempfile = $HTTP_POST_FILES['imagefile']['name'] ;

                move_uploaded_file($imagefile, $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/display/" . $uploadfilename) ; //or echo("FILE UPLOAD ERROR") ;
                echo("New file = " . $HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/display/" . $uploadfilename . "<BR>") ;


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-30 22:14 UTC] sniper@php.net
This should be fixed in PHP 4.0.5.
Please update.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 00:01:29 2024 UTC