Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run composer and laravel (artisan) commands without ssh access

I want to test some Laravel applications on my basic shared host.

Currently I just upload my complete application including the vendor files, however this takes quite long.

Since I do not have ssh access to my host I'd like to know whether there's an option to run composer / artisan commands without this.

I found this link: Use Composer without ssh access to server (Second Answer) which describes how to run composer using http://phpshell.sourceforge.net/

However, I can change folders in the console etc. But I cannot run php commands - I always get internal server error.

like image 690
Frnak Avatar asked Apr 25 '16 12:04

Frnak


1 Answers

Check if your shared hosting provider has console feature in their CP which allows to run shell commands. Maybe you'll be able to run commands from there.

As alternative, you could right your own artisan runner and call artisan commands from the code:

Artisan::call('migrate');

To run composer command from PHP code, use shell_exec:

shell_exec('composer update');
like image 175
Alexey Mezenin Avatar answered Sep 23 '22 09:09

Alexey Mezenin