php-build

Builds PHP so that multiple versions can be used in parallel.

Download as .zip Download as .tar.gz View on GitHub

php-build

php-build builds multiple PHP versions from source, and this fully automatic.

Who uses this?

Install

% git clone git://github.com/php-build/php-build
% cd php-build
% sudo ./install.sh

Usage

Synopsis

php-build --help
php-build --definitions
php-build [-i <environment_or_inifile>] <definition> <prefix>

Before you can build PHP you will need all necessary build dependencies.

If you use Ubuntu:

% sudo apt-get install libmcrypt-dev libreadline-dev
% sudo apt-get build-dep php5-cli

If you use macOS:

  1. Install Homebrew

  2. Install Hombrew packages:

    % brew install pkg-config autoconf openssl icu4c re2c bison libzip mcrypt
  3. Specify the Homebrew library places in configure options:

    env "PATH=/usr/local/opt/bison/bin:$PATH" "PHP_BUILD_CONFIGURE_OPTS=--with-openssl=$(brew --prefix openssl) --with-libzip" phpenv install 7.0.30

Then run this to install PHP 5.5.9 in development configuration:

% php-build -i development 5.5.9 ~/local/php/5.5.9

To get a list of all supported PHP versions pass the --definitions flag:

% php-build --definitions

Meet the core team

License

The MIT License

Copyright (c) 2011-2015 Christoph Hochstrasser

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.