075-845-490 | 097-165-2449
Line ID: @hostnakhonitech
🎉 โปรโมชั่นพิเศษ! ลด 10% สำหรับลูกค้าใหม่
NakhoniTech
075-845-490
support@NakhoniTech.com

วิธีเพิ่มขีด จำกัด หน่วยความจำ memory limit PHP ใน DirectAdmin Print

  • 1

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:

/usr/local/lib/php.ini

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

/var/www/html/roundcube/.htaccess

So be sure to increase them there as well, if they're set.


Was this answer helpful?

« Back