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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 14:01:30 2025 UTC