Ad

Installing Laravel 5.1 Application To Server With Older PHP Version

- 1 answer

I created a webapplication using Laravel 5.1 and PHP v. 5.6. However, I need to clone this into a CentOS server which has PHP v. 5.4.16 installed.

Whenever I run composer install, I get the following error:

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Your requirements could not be resolved to an installable set of packages.

Followed by packages that require PHP >= 5.5.9.

Is there a workaround to make this application work without updating PHP?

Thanks in advance!

Ad

Answer

You cannot install Laravel 5.1 on a server running PHP 5.4. You really have 2 options:

  • Try upgrading PHP
  • Migrate your application to Laravel 5.0

Migrating should not be that much work, especially if you have tests setup for your application. There will be some features in your 5.1 app that you may lose and have to work around to migrate to 5.0, but overall, it shouldn't be too difficult.

Ad
source: stackoverflow.com
Ad