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

mathishuettl's avatar

Laravel 5.5 on Synology NAS

Hello,

I try to run Laravel on a synology NAS, but I have big troubles with the PHP-Version. I already installed php 7.0 over the PackageManger but when I login via SSH and type

php -v

it shows me, that php 5.6 (cli) is installed. how can i change the cli version???? I searched about 3h for a solution but nothing worked yet... please help me!! :(

0 likes
10 replies
mathishuettl's avatar

i already tryed this solution, but when i hit composer install i get error messages that i need php 7

tykus's avatar

I am not in a position to test on my own NAS right now, but I believe you can use the PHP7 cli using php70 or php71 instead of php, e.g.

php70 artisan migrate

If you wish composer to use a specific php version, then you would need

php70 path/to/composer install

You can get the path from which composer

2 likes
TheGeremy's avatar

you can install Laravel by using php72, if you have php 7.2 installed on your NAS: or you can create alias in your .profile file like this: alias php="php72" and then use command php instead of php72

TheGeremy's avatar

I am able to install Laravel and use artisan and create and apply migration to the database, but when I want to query db for example like this: use App\Tasks; $tasks = Tasks::all(); I get an error "could not find driver (SQL: select * from tasks)" Any idea? Thanks

TheGeremy's avatar

If anybody gets error above, you need to enable PHP extension pdo_mysql.

Please or to participate in this conversation.