The message you get is correct. Your understanding of the subject is incomplete. I can help you, but please do refrain from using all caps in an entire sentence; it's the Internet-equivalent of yelling.
As a matter of fact, there is no single PHP configuration (php.ini
). Each PHP SAPI (that is to say: CGI/FastCGI, Apache module, PHP-FPM, and CLI) has its own configuration. On top of that, there are SAPI-specific overrides. I am not making this up. This is what the official PHP documentation tells you in "The configuration file" section.
cPanel's EasyPHP configuration only applies to the web SAPIs: CGI/FastCGI, Apache module, or PHP-FPM depending on your server configuration. Changing the configuration there DOES NOT have any effect on the CLI SAPI. Yes, I know, it's very stupid and frustrating. I disagree with the way cPanel handles that, but there's nothing I can do about it.
You need to ask your host if there is a way on their hosting environment to change the configuration of the PHP 8.1 CLI SAPI. If they do not know, or they are completely unaware that configuring EasyPHP in cPanel has no effect under CLI, I can tell you how I solved the exact same issue on my cPanel-hosted sites. You need to add the argument -dmemory_limit=1024M
after the PHP binary. Therefore, your command line must change to:
/usr/local/bin/ea-php81 -dmemory_limit=1024M /home/townof31/public_html/cli/joomla.php akeeba:backup:take
I noted the necessary change in bold type.
Further to that, I believe that you were misled about your memory limit in general.
If you checked your cPanel's server status to find out your PHP version and its memory limit, sorry, this has actually nothing to do with your site and/or PHP under CLI. cPanel is written in PHP, but it runs in its own web server, with its own PHP installation, with its own PHP configuration. What you see there is the configuration of cPanel's own PHP installation, not the one you are using.
If you checked Joomla's PHP information, or used a file to run phpinfo()
and display its results over the web, you were unwittingly misled as well. What you saw is the configuration of your web SAPI (one of CGI/FastCGI, Apache module, or PHP-FPM, depending on how your server is configured). Its configuration does not apply to the CLI SAPI.
As you can now better understand, the message you got is correct. It's just that the way cPanel works is very misleading and took you down to the wrong path.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!