Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

chahal's avatar

Artisan commands not working in centOS terminal

I am using the Cpanel terminal to run artisan commands. But they aren't working.

Neither give any error nor respond with anything.

[divasdoor@ns3189134 handheld]$ php artisan key:generate
[divasdoor@ns3189134 handheld]$ php artisan storage:link
[divasdoor@ns3189134 handheld]$ php artisan migrate
[divasdoor@ns3189134 handheld]$
0 likes
7 replies
vincent15000's avatar

Some webhostings change the php command to a custom one like php8.1 for example.

You should check the documentation of your webhosting.

chahal's avatar

@vincent15000 Thanks for your reply, but in that case it should have given an error like

php : command not found

And php -v is also giving correct output

1 like
chahal's avatar

I just checked the error_logs and it is showing

[03-Dec-2022 10:48:38 UTC] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 65536 bytes) in /home/divasdoor/public_html/handheld/vendor/psr/log/src/LogLevel.php on line 14

which seems unusual to me because 33554432 bytes is getting exhausted for 65536 bytes

1 like
chahal's avatar

@vincent15000 Didn't get anything from here. I have already tried setting the memory_limit to 256M, 512M & 1024M

1 like

Please or to participate in this conversation.