Search code examples
phpdrupaluploadlimitacquia

Acquia Drupal 7 - php upload limit won't change


I'm working with acquia-drupal 7 (just localhost for now), inside Microsoft WebMatrix. I can't get my php upload limit to increase from the default 2MB. Having googled around I have done the following:

added to every existing htaccess:

php_value upload_max_filesize 10M
php_value post_max_size 10M

created php.ini file in every dir that had an htaccess (no php.ini files existed anywhere) containing the following:

upload_max_filesize = 10M
post_max_size = 10M

Restarted the site (through the Webmatrix GUI)

No apparent change whatsoever after any of this - my site still has the 2MB upload limit.

Thoughts?


Solution

  • The reason your changes are not taking affect are because you just created a php.ini file anew, rather than finding the one that is being used.

    By definition, since you just created it, it won't be the one that exists in your php directory. :-)

    But don't worry! There's an easy way to find the correct php.ini file that your site is using:

    • Go to /admin/reports/status on your drupal site. Here you will see information about which version of php and apache you're using, etc.
    • The line for 'PHP' on that page should have both the version of php you're using (something like 5.3.6) and a 'more information' link
    • Click on that link and you should be able to see detailed information about the php installation on your machine.
    • Find the line called 'Configuration File (php.ini) Path' on that screen and navigate to that to update it.

    Just like you already knew, make sure you restart your server after any changes. :-)

    Let us know if this fixes your problem!