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

Noxter68's avatar

Artisan commands with SSH

Hi,

I've got an issue with SSH. I can reach my remote server but when I try to use something like "php artisan list" i've got this message:

Status: 404 X-Powered-By: PHP/4.4.9 Content-type: text/html

I've got the same error when I try to install composer...

I'm hosting my website with 1&1(I know this is not the best choice...)

I just needed to execute a "php artisan config:clear"

Does someone had the same issue ?

Thanks for your help =)

0 likes
4 replies
Noxter68's avatar

The weird thing is that When I run the phpinfo() I have the version 7.4.1 but when I do a php -v with ssh I have the 4.4.9 version how can I update it and is that possible ?

Thanks for the link @sujancse btw

Tray2's avatar

That is not so strange.

There are two (or more) php installed. Your webserver uses 7.4 while your client points to 4.4.

If you do which php it will give you the path to the one you are using (4.4). So you need to make your 7.4 installation default. Not knowing your system setup but something like

sudo update-alternatives --set php /usr/bin/php7.4

Should do the trick.

fideloper's avatar

The php command is likely actually running “php-cgi” and thus running php as a web request (instead of running “php” the command line client).

There likely is a php-cli command or similar available to use instead:

e.g. php-cli artisan list

Please or to participate in this conversation.