Skip to content

This little bash script changes the php version (at least for Linux)

License

Notifications You must be signed in to change notification settings

zuernBernhard/bash_php_changer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

bash_php_changer

This shell-script changes the php version (at least for Ubuntu Linux) if you ave installed multiple Versions from the Ondrej-PPA as described by Lorna Jane.

ALSO WORKS WITH OH-MY-ZSH

Installation

# 1.) Install in /opt for all users
cd /opt

# 2.) Clone from github (use https if you don't have a ssh-key on github)
git clone [email protected]:ueberbit/bash_php_changer.git

# 3.) Create a softlink to the shellscript on your path
sudo ln -s /opt/bash_php_changer/activate-php.sh /usr/local/bin/activate-php

# 4.) Make it executable
sudo chmod +x /usr/local/bin/activate-php

USAGE:

activate-php [YOUR-VERSION]

For Example:

activate-php 5.6

# To Check: 
php -v

->
PHP 5.6.25-1+deb.sury.org~xenial+1 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

About

This little bash script changes the php version (at least for Linux)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%