Can anybody help me with instructions of some sort for installing PHP 7 on my homestead box? I haven't had much luck with my own attempts and not found much online about this.
Just a disclaimer before I try to explain, I haven't tried this so it may not work.
If you follow the instructions from Zend PHP7 Repositories for setting up the repo and installing PHP you should then on your host machine edit the file homestead/scripts/serve.sh and change the line fastcgi_pass unix:/var/run/php5-fpm.sock; to fastcgi_pass unix:/run/php7-fpm.sock; then provision homestead and hopefully it should work. I used this guide, Running PHP7-FPM Nightly Build on Ubuntu 14.04, to help me out a bit.
If that doesn't work you could try using Rasmus Lerdorf's PHP7 Dev Vagrant Image image, it isn't have the ease-of-use that the homestead commands give but you can use php7dev.yaml in a very similar way. You will need to create the nginx hosts yourself but there is a guide how to do that in the readme.
It explains it in the homestead docs. Homestead that has php 7 goes into its own file. Cd into the new file and use vagrant up. To switch back vagrant halt, cd into the normal homestead (or if installed globally cd out of new homestead and homestead up).
By the way you ask how, and reply you don't want a tutorial, but demand your question get answered as to how? @Corez64 had a great answer.
We have to probably wait for a few days before the official PHP7 homestead box is released. Last time I heard, they are waiting for Memchached to be updated for PHP 7. The Homestead-7 repository is still using RC last time I checked.
Hi all,
thanks for your reply. The reason I want to keep two boxes because some development still using php 5.x and I would try out php 7 on the new project. Want to have video tutorial / page tutorial so setup two boxes and allowed me to swap it.
Unable to load my app in the browser after upgrading my homestead box to 7 as described in the docs. I added the box directive at the top of the yaml file too. I can vagrant up and ssh into a server session, but nothing appears in the browser. Things ran perfectly before. I'm really stuck now, and any help is deeply appreciated.
I posted this as a new question since here it shows up having 9 responses when that is really the total for the thread.
@shiroamada what about Per Project Homestead rather than two global installs? All you need to do is add the box: honestead7 directive at the top under the ---- of your Homestead.yaml file. Then vagrant up from that project's directory.
---
box: laravel/homestead-7
@DavidEwers I'll find your other thread, but suspect you just need to edit your /etc/nging/sites-enabled/yoursite.app configuration. Look for:
Thanks, Lindstrom. Wish I could say that solved the problem, but this line was already correct in the file. Any other ideas? Really want to get working again.
Problem solved with help from a friend in my PHP group. I had to map directly to my app code directory in the yaml file. Then I had to destroy the vagrant box and start it up again. Success! I'm not sure why I got by with the default homestead mapping before. Hope this helps someone having the same trouble.
I switched to docker cause I couldn't wait any longer for Homestead PHP7 box. I would advise to all to switch also, more control and much faster. But I have to be fair, homestead is pretty fast, fastest box out there.
Hello guys, I have installed Homestead 3.0.1, but I saw that by default PHP 7 is installed, and I need to install PHP 5.6 for my current projects. There is some how to change the homestead.rb file to install just PHP 5.6 in my VM?