If I understand you correctly, then the following should work: php ../artisan since artisan is the PHP file you want to execute in the parent of the public directory
Multi PHP versions on server. Possible to make artisan run from public directory?
Hi
I've got multiple Laravel sites on a VPS (Centos 6). I have some running Laravel 4.2, some on 5.2 and some on 5.5.
I'm running EasyApache 4 on the server which allows me to have different versions of php for each domain which is great, the laravel sites all run fine but artisan commands have stopped working on the older versions of Laravel.
Any artisan commands give me the following:
[Symfony\Component\Debug\Exception\FatalThrowableError] Call to undefined function mysql_connect()
If I do 'php -v' in the Laravel directory it always say php7.1 is running but if I go into the public directory it will give me the correct version for each domain.
So I'm wondering if there's a way I can make artisan run from the public directory so it sees the correct php version for the application.
Please or to participate in this conversation.