JarJarBernie / jimmybox

Web developer box with multiple PHP Versions
42 stars 15 forks source link

Way to Change Confusing PHP Version #7

Closed B1NAR10 closed 3 years ago

B1NAR10 commented 3 years ago

Hi, I'm trying to use this web server project but I need to change the php version to 7.4, could you explain how to do it for beginners. Thank you!

JarJarBernie commented 3 years ago

Hey @B1NAR10! Thank you for trying Jimmybox. Depending on how your needs, there are different ways to change PHP Version.

The easiest solution is to simply edit your local hosts file and add these lines to it:

192.168.33.11  jimmy80.com
192.168.33.11  jimmy74.com
192.168.33.11  jimmy73.com
192.168.33.11  jimmy72.com
192.168.33.11  jimmy71.com
192.168.33.11  jimmy70.com
192.168.33.11  jimmy56.com

Please google, how to change the hosts file in your OS.

After this, you can open your browser and open Jimmybox with the PHP Version you want to use (http://jimmy74.com links to PHP 7.4).


The second way is to edit the default host file of Jimmybox which is set to PHP 8:


The third and most professional solution is to create your own host configuration. You should use this if you are working on multiple projects that require different PHP Versions. (site1.com = PHP 8.0, site2.com = PHP7.2 ...).


Since solutions 1 and 2 are very easy I would recommend you start with one of these. You can switch to solution nr. 3 later if you need it. For this I would also recommend you to become more familiar with Apache configuration files.

Hope this helps!

Cheers Bernie