PHP Memory Limit - Alibaba Cloud Developer Forums: Cloud Discussion Forums

vaeros
Intern
Intern
  • UID3861
  • Fans0
  • Follows0
  • Posts1
Reads:1532Replies:3

PHP Memory Limit

Created#
More Posted time:Oct 22, 2017 17:42 PM
Dear all, how do i increase my php memory limit, its currently at 48M and i need atleast 128M

shhanshan
Forum Moderator
Forum Moderator
  • UID105
  • Fans5
  • Follows0
  • Posts343
1st Reply#
Posted time:Nov 3, 2017 21:48 PM
You can set it in "Environment Settings > PHP Parameter Settings"
AlibabaCloud.com

GhulamQadir
Engineer
Engineer
  • UID5968
  • Fans2
  • Follows0
  • Posts63
2nd Reply#
Posted time:Aug 1, 2018 23:41 PM
There's an easy way to increase the memory allowed to PHP, write in your script:


ini_set('memory_limit','128M');


The above code will increase the maximum amount of memory available to PHP to 128 MB.

Ranjithkumar
Engineer
Engineer
  • UID5737
  • Fans1
  • Follows3
  • Posts112
3rd Reply#
Posted time:Aug 2, 2018 14:18 PM
Hi vaeros, You can change the memory in the config file.
1) Open the php.ini file with any text editor.
2) Search for memory_limit, without the quotes.
3) Enter the new memory limit
4) Save the file
Guest