php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25168 not able to upload files larger than 1 Mb.
Submitted: 2003-08-20 03:24 UTC Modified: 2003-08-20 17:29 UTC
From: anjp2003 at indiatimes dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.3.1 OS: Linux
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: anjp2003 at indiatimes dot com
New email:
PHP Version: OS:

 

 [2003-08-20 03:24 UTC] anjp2003 at indiatimes dot com
Description:
------------
sir,

i am not able to upload files having size greater then 1MB. This is not giving any error also. it is just displaying that : " the page cannot be displayed","Refresh options"....


Reproduce code:
---------------
<form name="upload"  enctype="multipart/form-data" method="post"  action="submit_ups.php">
                <input type="hidden" name="MAX_FILE_SIZE" value="5242880">
                <b>File-Name:</b>
                <input type=text name="name1"></td>
                <B>Upload this file: </B><input type=file name="inputfile" value="hai"><BR>
-------------------------------------------------------------
                submit_ups.php
----------------------------------------------------------
 if (!empty($inputfile))
{
       if (move_uploaded_file($inputfile, $tmpfile))
              echo ("File uploaded succesfully ");
       else
              echo ("File can't be uploaded");

       if (!$UPLOAD_ERR_INI_SIZE)
              echo("The uploaded file is uploaded. ");
       else
              echo("The uploaded file exceeds the upload_max_filesize directive in php.ini.");

       if  (!$UPLOAD_ERR_OK)
             echo ("NO ERROR");
       else
             echo("There is error,the file is not uploaded with success.");



Expected result:
----------------
files of size larger than 1 MB should get uploaded...
otherwise if there is some problem while uploading, an error should be printed...



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-20 03:28 UTC] moriyoshi@php.net
What SAPI are you using? (e.g. Apache1, Apache2, CGI)
If you are using Apache2 SAPI, then check if your httpd.conf
 has "LimitRequestBody" directive.

 [2003-08-20 17:29 UTC] sniper@php.net
Also too old PHP version. Update first. (to php 4.3.3RC4)

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC