Skip to content

Builds PHP so that multiple versions can be used side by side.

License

Notifications You must be signed in to change notification settings

php-build/php-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c30036b · Oct 31, 2024
Oct 31, 2024
Jan 22, 2022
Jan 12, 2022
Oct 31, 2024
Aug 30, 2020
Aug 7, 2020
Oct 2, 2015
Oct 31, 2024
Oct 31, 2024
Dec 4, 2015
Apr 16, 2015
Nov 2, 2021
Nov 5, 2012
Aug 8, 2020
Aug 31, 2020
Sep 10, 2024
Oct 14, 2018
Jan 14, 2016
Oct 31, 2024
Apr 19, 2015
Mar 12, 2014

Repository files navigation

php-build Build Status

php-build is a utility for building versions of PHP to use them side by side with each other. The overall structure is loosly borrowed from Sam Stephenson's ruby-build.

Overview

Installation

As phpenv plugin

With phpenv via installer

It's the standard way: installs phpenv in $HOME/.phpenv (default $PHPENV_ROOT value).

curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer \
    | bash

See more on https://github.com/phpenv/phpenv-installer: install phpenv + php-build/php-build (and other plugins), updating all of them when you want to!

With phpenv manually

Locate your phpenv directory:

% ls $HOME/.phpenv

Clone the Git repository into phpenv plugins directory:

% git clone https://github.com/php-build/php-build.git $HOME/.phpenv/plugins/php-build

Now you can use php-build as phpenv plugin, as follows:

% phpenv install <definition>

The built version will be installed into $HOME/.phpenv/versions/<definition>.

As standalone php-build

Clone the Git Repository:

% git clone https://github.com/php-build/php-build.git

Then go into the extracted/cloned directory and run:

% ./install.sh

This installs php-build to the default prefix /usr/local.

To install php-build to an other location than /usr/local set the PREFIX environment variable:

% PREFIX=$HOME/local ./install.sh

If you don't have permissions to write to the prefix, then you have to run install.sh as superuser, either via su -c or via sudo.

Contributing

Issue reports and pull requests are always welcome.

All contributions will be reviewed and merged by the core team:

See CONTRIBUTING.md.

Changelog

See CHANGELOG.md.

License

php-build is released under the MIT License.