Hi,
I am getting a red triangle icon with an exclamation mark and a message “The crons need to be enabled” error on a new Self-Hosted ver5.5.24 W93 installation. Several test installations produced the same issue which did not disappear even after several days.
This is the cron job command that I have in my cpanel.
cd /home/xxxxx/public_html/iv && /opt/cpanel/ea-php81/root/usr/bin/php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1
Tried run the command with a single “>” in the “schedule:run >> /dev/null 2>&1” part of the command but the results is same.
Manually running the above cron job command in the terminal is producing the following error in the “error_log” (this file is in the invoice ninja root directory)
[04-Oct-2022 19:40:02 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2621440 bytes) in /home/xxxxx/public_html/iv/vendor/composer/autoload_static.php on line 1013
Could this issue be related to the artisan command in my above cron job command? Because I get the same error when I run any artisan command, including the “php artisan optimize”. Whenever I make changes to .env file I have to run the command as “php -d memory_limit=-1 artisan optimize”
Increasing memory_limit to 2048M in php.ini did not help.
There is no error log in storage/logs folder.
I’ve been searching for a solution to this problem for the past couple of days but could not find any.
Any ideas why I am having this problem?
Thanks in advance for any help.
php.ini
; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
allow_url_fopen = On
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 300
max_input_time = 60
max_input_vars = 5000
memory_limit = 1032M
post_max_size = 118M
session.gc_maxlifetime = 1440
session.save_path = “/var/cpanel/php/sessions/ea-php81”
upload_max_filesize = 112M
zlib.output_compression = Off
allow_url_include = On