skip to Main Content

My client is running Laravel 5.2 and PHP version 5.6 (all obviously several years old).

I tried to clone the git into Valet with relative success in that the application ran but a bunch of pages threw errors which I am certain is due to me running the latest version of PHP.

So, my question is it better to directly clone the project on Homestead?

Does Homestead offer a more “native environment” for a situation like I am in?

2

Answers


  1. you should try to use an environment that is the closest possible to production.

    If your customer uses apache, try xampp. Else adapt to his environment and PHP version, so you can concentrate on code production instead of keep the solution working on more than one environment.

    Login or Signup to reply.
  2. One year later, I came across with the exact same problem; php 5.6.31 and Laravel 5.2.
    I managed to simulate the environment with homestead 6, following these steps:

    1. copy the project files to a new folder
    2. Unzip php 5.6 to my local pc (remove php7)
    3. run: composer update (must run with php 5.6 on local pc)
    4. run: composer require laravel/homestead:~6.6.0
    5. run: vendor\bin\homestead make
    6. edit Homestead.yml as needed (.ssh path, add php: "5.6" one line below the site sync)
    7. run: vagrant up
    8. run: vagrant ssh
    9. make appropriate changes (google them) according to problems faced on homestead.test (edit xdebug for 502 BAD GATEWAY, edit my.cnf for adding utf8, etc)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search