Can't overcome upload file size 2MB limit

Discussion in 'PHP and MySQL' started by cnisvcs, Feb 26, 2010.

  1. cnisvcs

    cnisvcs Perch

    Dear all,

    I am coding simple function accepting picture uploads. It works fine, except the server does not accept anything larger than 2MB.

    My function first checks for the upload error based on value of $_FILES[filename][error]. Whenever I upload a JPG over 2MB, the upload terminates with the error 1, meaning:

    "The uploaded file exceeds the upload_max_filesize directive in php.ini. "​

    I increased the value of upload_max_filesize by the command:

    php_value upload_max_filesize 8M​

    placed in .htaccess.

    The phpinfo() reports master value of 2MB and the local value of 8MB.

    At the top of my upload handling code I placed:


    and it returns "8M".

    BTW, the CMS I use for this website also reports 8MB as the upload_max_filesize and it also cannot upload anything bigger than 2MB.

    Has anyone had a similar case? What am I missing? Please help.
  2. akshay

    akshay Administrator Staff Member

    Please open a support ticket with mention all details.
  3. windsurfer

    windsurfer Perch

    I am having a problem where a 2+MB file aborts upload after 30 seconds with no error message. How am I supposed to detect this in PHP? Is there a setting I can use to overcome this bad behavior of the server?
  4. abhishek

    abhishek Administrator Staff Member

    We have your support ticket, we will check and will update you soon in your ticket.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services