SOLVED Allowed memory size exhausted WHMCS

Natig

Registered
Dec 15, 2016
1
0
1
Azerbaijan
cPanel Access Level
Root Administrator
Hi,
Fatal error
: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2048 bytes) in /home/****/public_html/*****/includes/classes/WHMCS/Admin.php on line 0
/usr/local/lib/php.ini memory_limit = 128M
I do not understand why do not work PHP.ini
What I should do
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Could you verify if this system uses EasyApache 4? If so, you can use WHM's MultiPHP INI Editor interface (WHM Home >> Software >> MultiPHP INI Editor) to adjust the memory limit. This will update the correct php.ini file.

Thank you.
 
  • Like
Reactions: juancaco

eugenevdm.host

Well-Known Member
Oct 21, 2019
81
11
8
Cape Town
cPanel Access Level
DataCenter Provider
I've providing more context for my situation here because this seems to be a common problem on even a small installation of WHMCS on cPanel.

1. 33554432 is 32MB, which was calculated by division by 1024 and then another division by 1024.

2. The error emits from the command line - don't confuse the errors on the website front-end with errors from the command line. You'll only see these errors if you have CRONs setup to email you when there is trouble.

2a. When you delve on the front-end, using the **cPanel** interface rather than the **WHM** interface, you will see that the web front-end default is actually a lot higher. On my system it's 128M.

2b. You have to use the **WHM** interface to set the command line value.

3. If you are an ordinary user, and you don't have administrative access to the WHM front-end, you need to contact your host.

4. On my system, I had this oddity:

1680344445739.png

It appears in this instance I was working on a legacy server, whereby the default was never adjusted as WHM was upgraded.

5. If you want to check your work, therefor check that PHP on the command line now has remembered your settings, do this:

**# /usr/local/bin/ea-php73 -i | grep memory_limit**

It should produce thtis:

**memory_limit => 128M => 128M**