GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ppmathis/gatherphp: Manage multiple PHP versions easily and comfortably.

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
custom
custom
 
 
inst
inst
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
default.sh
default.sh
 
 
helpers.sh
helpers.sh
 
 
install.sh
install.sh
 
 
options.sh
options.sh
 
 

Repository files navigation

GatherPHP

Manage multiple PHP versions easily and comfortably with GatherPHP.

License

Apache License (version 2)

Installation of GatherPHP

Just clone the git repository of gatherphp into some directory of your choice and you are good to go!

git clone git://github.com/NeoXiD/gatherphp.git

Install a new PHP version

Just run the following command and a new PHP version will get installed:

# Example: ./install.sh 5.4.10
./install.sh [PHP Version]

Notice: Do not use sudo for installing new versions. Either put GatherPHP in a directory where you've got write access to or use an interactive shell. (sudo -i, sudo su...)

GatherPHP will automatically fetch the correct archive, extract, configure and install it. But that is not all yet - you can append flags after the PHP Version, like here:

./install.sh 5.4.10-debug
./install.sh 5.4.10-debug-zts

The order of the flags does not matter - GatherPHP will sort them for you! These are all the available flags:

  • debug compiles a version with debugging symbols
  • zts enables thread safety
  • 32bits forces the creation of a 32bits version on a 64bit machine
  • pear adds & installs PEAR support

After the installation, GatherPHP creates some symlinks in /inst/bin. If you will extend your $PATH variable so that it will point to /path/to/gatherphp/inst/bin, you can use commands like this:

php-5.4.10 ...
phpize-5.4.10-debug ...
pear-5.3.0 ...

Switching the standard PHP version

With GatherPHP, you can also easily change the system-wide standard PHP version. Just execute the following command and a nice 'setup' will guide you through the progress:

./default.sh

Ofcourse you must run this command with the correct permissions. (It will install itself into /usr/local/bin or /usr/local/sbin, so you should use sudo.)

Configure options customization

Whenever you install a PHP version, GatherPHP will look for the following files in the custom/ folder:

  • options- major.minor.patch-flags .sh (e.g. options-5.4.10-debug-pear.sh)
  • options- major.minor-flags .sh (e.g. options-5.4-debug-pear.sh)
  • options- major-flags .sh (e.g. options-5-debug-pear.sh)
  • options- major.minor.patch .sh (e.g. options-5.4.10.sh)
  • options- major.minor .sh (e.g. options-5.4.sh)
  • options- major .sh (e.g. options-5.sh)
  • options.sh

The first file which can be found will be taken - other files will be ignored. While installating a PHP version, GatherPHP shows you which configure options file will be used. A options file should look like this:

#!/bin/bash
config_options="		\
--disable-all			\
--enable-session		\
--enable-filter			\
--disable-cgi			\
"

php.ini customization

GatherPHP will also look for the following files in the custom/ folder to generate a php.ini file:

  • php.ini
  • php- major .ini (e.g. php-5.ini)
  • php- major.minor .ini (e.g. php-5.4.ini)
  • php- major.minor.patch .ini (e.g. php-5.4.10.ini)
  • php- major-flags .ini (e.g. php-5-debug-pear.ini)
  • php- major.minor-flags .ini (e.g. php-5.4-debug-pear.ini)
  • php- major.minor.patch-flags .ini (e.g. php-5.4.10-debug-pear.ini)

Other than during the configure options part, all the available ini files are merged together in the order specified as above. If no custom file can be found, GatherPHP will try to copy the php.ini-recommended / php.ini-development configuration from the PHP sources. If there is also no configuration file available, GatherPHP will notice you.

Post-installation scripts

GatherPHP also supports post-installation scripts for copying extensions, installating PEAR modules and so on. Again, it will look for the following files in the custom/ folder:

  • post-install.sh
  • post-install- major .sh (e.g. post-install-5.sh)
  • post-install- major.minor .sh (e.g. post-install-5.4.sh)
  • post-install- major.minor.patch .sh (e.g. post-install-5.4.10.sh)
  • post-install- major-flags .sh (e.g. post-install-5-debug-pear.sh)
  • post-install- major.minor-flags .sh (e.g. post-install-5.4-debug-pear.sh)
  • post-install- major.minor.patch-flags .sh (e.g. post-install-5.4.10-debug-pear.sh)

A post-installation script gets called with the following parameters:

/bin/bash script.sh [Installed Version] [Installation Directory] [Binary Directory]

GatherPHP - © 2013 P. Mathis ([email protected])

About

Manage multiple PHP versions easily and comfortably.

Resources

Readme
License
Activity

Stars

4 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.