Can't set upload_max_file_size in php.ini

Posted on 2006-03-20
Last Modified: 2013-12-13
I have a problem setting the upload_max_file_size. I have changed php.ini. I set the upload_max_file_size to 25M in php.ini, saved it, restarted the webserver and I still can't upload files larger than 2M. When I look at a phpinfo() page it says that the upload_max_file_size is 2M. When I open php.ini the upload_max_file_size is correctly set at 25M. Help! Apache 2, Suse Linux, PHP 5.0.4
Question by:mdkgeurts
    LVL 9

    Expert Comment

    I had a similar problem - and ended up having two ini files.  
    You can set the limit in the .htaccess file as well as in your php file (I believe).
    LVL 14

    Accepted Solution


    Perhaps php loads a different php.ini file than the php.ini that you have edited.

    Type the command "php -i | more" or run phpinfo() and look for the config path info under this line:

    Configuration File (php.ini) Path => /etc/php.ini

    LVL 1

    Author Comment

    The config path pointed to a non-existing folder, I created the folder with the php.ini and it worked.
    LVL 9

    Expert Comment

    That was the same problem I had. :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to count occurrences of each item in an array.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now