All Projects → rapidwebltd → php-switch-scripts

rapidwebltd / php-switch-scripts

Licence: LGPL-3.0 License
🔄 Scripts to aid in the setup of and switching between multiple PHP versions in Ubuntu 14.04 LTS or newer

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to php-switch-scripts

main
Mocks Server monorepo
Stars: ✭ 109 (+78.69%)
Mutual labels:  development-tools
Kosm-Classic-FPS-Template-UE4
Classic Arena First-Person-Shooter Mechanics for Unreal Engine 4.
Stars: ✭ 38 (-37.7%)
Mutual labels:  development-tools
docker-dev
A local Docker Environment for building PHP applications 🔨
Stars: ✭ 97 (+59.02%)
Mutual labels:  development-tools
cli
Do not program API integrations! Install them.
Stars: ✭ 14 (-77.05%)
Mutual labels:  development-tools
dev-machine
Ansible setup for maintaining a development environment
Stars: ✭ 30 (-50.82%)
Mutual labels:  development-tools
nanobox-rails
Quickly set up a Ruby on Rails app on Nanobox, the ideal platform for developers. With Nanobox, Rails app developers can set up instant, isolated development environments that can be shared among team members. Rails apps created using Nanobox can be automatically deployed to AWS, Azure, Google Cloud, and other cloud hosts without the need for de…
Stars: ✭ 19 (-68.85%)
Mutual labels:  development-tools
MathJax-dev
Build and release tools for the MathJax project
Stars: ✭ 34 (-44.26%)
Mutual labels:  development-tools
dev-env
Install and configure a development environment with Ansible (Ubunu 16.04 LTS)
Stars: ✭ 26 (-57.38%)
Mutual labels:  development-tools
fast-blazor
Blazor component library for FluentUI. Microsoft's official lightweight wrapper around the FluentUI Web Components for use with .NET 6.0 Blazor applications
Stars: ✭ 928 (+1421.31%)
Mutual labels:  development-tools
OpenHarmony
华为鸿蒙分布式操作系统(Huawei OpenHarmony)开发技术交流,鸿蒙技术资料,手册,指南,共建国产操作系统万物互联新生态。
Stars: ✭ 373 (+511.48%)
Mutual labels:  development-tools
json-server
Create a dummy REST API from a json file with zero coding in seconds
Stars: ✭ 34 (-44.26%)
Mutual labels:  development-tools
wp-offline
Use WordPress without all online-checks. Deactivate autoupdate for core, plugins and themes
Stars: ✭ 47 (-22.95%)
Mutual labels:  development-tools
BileTools
Tools for making garbage
Stars: ✭ 31 (-49.18%)
Mutual labels:  development-tools
AnyBlok
AnyBlok is a Python framework for building business applications.
Stars: ✭ 19 (-68.85%)
Mutual labels:  development-tools
zzz
Go程序热编译、压力测试等,日常开发辅助工具,提升开发效率 - Daily development aids
Stars: ✭ 34 (-44.26%)
Mutual labels:  development-tools
rae
A docker-compose development environment orchestrator
Stars: ✭ 13 (-78.69%)
Mutual labels:  development-tools
OpenHSP
Hot Soup Processor (HSP3)
Stars: ✭ 120 (+96.72%)
Mutual labels:  development-tools
docker-imap-devel
Dockerized SMTP/IMAP server for development
Stars: ✭ 45 (-26.23%)
Mutual labels:  development-tools
spanner-schema-diff-tool
Compare two Cloud Spanner Schema (DDL) files, determine the differences and generate the required ALTER statements to convert one schema to the other.
Stars: ✭ 20 (-67.21%)
Mutual labels:  development-tools
treblle-laravel
The offical Treblle package for Laravel
Stars: ✭ 43 (-29.51%)
Mutual labels:  development-tools

🔄 PHP Switch Scripts

These scripts are designed to aid in the setup of and switching between multiple PHP versions in Ubuntu 14.04 LTS or newer.

Please note that these scripts install packages from a third-party repository, provided by Ondřej Surý. More details are available at the repository's website, PPA page on Launchpad and Twitter account.

Requirements

  • Ubuntu 14.04.* LTS or newer
  • Apache 2.4.*

You can check you have the required versions by running the following command.

lsb_release -a | grep Ubuntu && apache2 -v | grep Apache

You should see something similar to the below.

Description:    Ubuntu 14.04.5 LTS
Server version: Apache/2.4.18 (Ubuntu)

Setup

First, clone the repository, and change directory if you have not already done so.

git clone https://github.com/rapidwebltd/php-switch-scripts.git
cd php-switch-scripts

Next, to setup all the supported PHP versions and common PHP extensions for them, you just need to run the setup.sh script. This is shown below.

./setup.sh

This may take some time depending on your system and connection speed. It will also require you to enter your password to install new packages.

When you see a message similar to the following, setup is complete and you are ready to switch between PHP versions at will.

* Setup complete. You may now use the 'switch-to-php-*.*.sh' scripts.`

Usage

Once setup is complete, you can easily switch between different PHP versions using the appropriately named scripts. Examples are shown below.

./switch-to-php-5.6.sh
./switch-to-php-7.0.sh
./switch-to-php-7.1.sh
./switch-to-php-7.2.sh
./switch-to-php-7.3.sh
./switch-to-php-7.4.sh

This will alter the versions of PHP running in Apache and the command line. Your password will be required to enable/disable Apache modules, restart the web server and alter the default PHP CLI version.

Verification

If you wish, you can check that the switch was completed successfully.

You can verify the command line version of PHP has changed with the following command.

php -v | grep PHP

You can check the version of PHP running in Apache by creating a new PHP file, that calls the phpinfo() method, then accessing it via a web browser. An example is shown below.

<?php phpinfo(); ?>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].