How to increase PHP memory limit in DirectAdmin
- by linda Y
- in Web Hosting
- View 3143
To change upload size in DirectAdmin you need to edit php.ini
Firstly you need to find your php.ini. A new and easy trick to find your php.ini would be to ask php itself what it's using, eg:
/usr/local/bin/php --ini | grep 'Loaded Configuration File'
If you're running the default version of CLI php, your php.ini will be located at:
Edit php.ini. Search for Maximum allowed size for uploaded files.
upload_max_filesize = 2M
Change the 2M to whatever new value you want. If no "memory_limit" found, add the following line at the end of php.ini
memory_limit = 128M; /* Change the 128M to your needs */Save file.
Restart Apache. Consider that this setting may also be related:
Maximum size of POST data that PHP will accept.
post_max_size = 8M
Also some RoundCube versions have limits set in the file
So be sure to increase them there as well, if they're set.