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

Overview

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 git://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 git://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.

Comments
  • Transfer repository over to the

    Transfer repository over to the "php-build" org

    The purpose of this issue is to track the tasks necessary for moving this repo to the php-build org.

    Why I think we should do this:

    • Decouples the project more from my person, especially because I'm not really involved much.
    • I can have my own private branches here if I choose to, released branches can be made public in the org's repo
    • Allows to group the repos of plugins under a common org

    Open Questions

    • [x] Transfer or Fork the repo over to the org? -> Transfer
    opened by CHH 31
  • PEAR package PHP_Archive not installed Warning Causing Install Abort

    PEAR package PHP_Archive not installed Warning Causing Install Abort

    I keep getting this error trying to install various version of php. What can I do to fix this?PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.

    opened by cgunnels 30
  • add master definition

    add master definition

    I think this makes sense for future master / nightly builds, since the current 8.0 snapshot will move to the 8.x branch anyway soon As per the discussion here: https://github.com/travis-ci/php-src-builder/pull/53

    opened by nick-zh 19
  • Added support for patching php source code

    Added support for patching php source code

    I've added support for patching the php source code. This should allow PHP versions lower than 5.3.7 to be compiled on newer systems.

    Which patches are beeing applied is defined by the definition file.

    opened by fabiang 19
  • Replace museum.php.net links with git.php.net

    Replace museum.php.net links with git.php.net

    Hello,

    since museum.php.net ist down (Bug #68130 says it could take some weeks) I've replaced all links to it with links to source tarballs at git.php.net. Unfortunately the file name can not received the download url, so I've added support for the Content-Disposition http header.

    This PR should bring support for older PHP versions back to php-build

    opened by fabiang 18
  • No X-Debug being installed

    No X-Debug being installed

    php-build -i development 5.6.13 $HOME/php
    

    Then on the build php binary php --version

    PHP 5.6.13 (cli) (built: Oct  9 2015 08:30:45)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    

    No X-Debug.

    Any ideas?

    opened by bweston92 17
  • Update `download_from_github` function

    Update `download_from_github` function

    Clones the repository and its submodules instead of download the tarball from GitHub.


    I was starting to work on HHVM implementation, but it's necessary to update the configure_package function with a lot of things and I don't think I'm gonna have time to do it now. I decided to send this pull request because maybe it can be useful for another person.

    opened by henriquemoody 15
  • Delete the destination folder on failed install

    Delete the destination folder on failed install

    I just run the script with wrongly set path to $HOME (stupid), but imaging what this script did:

    function cleanup_abort {
        log "Warn" "Aborting build."
    
        rm -rf "$PREFIX"
    
        make -C "$TMP/source/$DEFINITION" clean &> /dev/null
    }
    

    Just deleted all my HOME without any alert.

    What I consider the bug here, that cleanup_abort, should only delete files it created!

    opened by Kostanos 15
  • Added php 5.4.40, 5.5.24, and 5.6.8

    Added php 5.4.40, 5.5.24, and 5.6.8

    ~~DO NOT MERGE YET~~

    ~~These releases will only become available in the next 40-50 hours. I'm just getting this done in advance. :)~~

    Looks ready to me. :)

    opened by GrahamCampbell 14
  • Use pear instead of Pyrus as new default for all builds?

    Use pear instead of Pyrus as new default for all builds?

    Pyrus is in the very alpha stages and I've had my fair share of problems while using it daily. There are some popular channels out there too, which are broken (for example the EZ Components channel).

    The other benefit of using pear would be that the 5.2.x builds as well as the 5.3.x and 5.4.x builds will use the same environment for PEAR packages.

    Update: Another benefit would be the availability of the solid pecl command to install PHP extensions. (Thanks @ampt)

    1.0 
    opened by CHH 13
  • Better sort for definitions

    Better sort for definitions

    Displays:

     5.6.0
     5.6.1
     5.6.2
     5.6.3
     5.6.4
     5.6.5
     5.6.6
     5.6.7
     5.6.8
     5.6.9
     5.6.10
     5.6.11
     5.6.12
     5.6snapshot
    

    Instead of:

    5.6.0
    5.6.1
    5.6.10
    5.6.11
    5.6.12
    5.6.2
    5.6.3
    5.6.4
    5.6.5
    5.6.6
    5.6.7
    5.6.8
    5.6.9
    5.6snapshot
    
    opened by henriquemoody 12
  • libicuio.so.71 missing on Arch Linux

    libicuio.so.71 missing on Arch Linux

    After a recent system update, I'm getting the following error message

    php-fpm: error while loading shared libraries: libicuio.so.71: cannot open shared object file: No such file or directory

    /usr/lib contains the following libraries libicuio.so@ libicuio.so.72@ libicuio.so.72.1*

    I went ahead and created a symlink libcuio.so -> libicuio.so.71, but then other packages were missing... so I doubt this is the solution

    opened by ad-on-is 0
  • Fail to install php 7.3.33

    Fail to install php 7.3.33

    I'm triying to install php version 7.3.33 and keeps failing. I'm not sure about the error, maybe you can point me in the right direction.

    Here is the logfile: php-build.7.3.33.20221028181813.log

    Thanks!

    opened by impresionista 0
  • FIX nothing below PHP 8.1 installs in Ubuntu 22.04 (`RSA_SSLV23_PADDING` undeclared in OpenSSL 3.0.0)

    FIX nothing below PHP 8.1 installs in Ubuntu 22.04 (`RSA_SSLV23_PADDING` undeclared in OpenSSL 3.0.0)

    my system has openssl 3.0.2-0ubuntu1.1

    ~/.phpenv/plugins/php-build/install-dependencies.sh:

    autoconf is already the newest version (2.71-2).
    bash is already the newest version (5.1-6ubuntu1).
    bison is already the newest version (2:3.8.2+dfsg-1build1).
    build-essential is already the newest version (12.9ubuntu3).
    ca-certificates is already the newest version (20211016).
    findutils is already the newest version (4.8.0-1ubuntu3).
    libbz2-dev is already the newest version (1.0.8-5build1).
    libicu-dev is already the newest version (70.1-2).
    libjpeg-dev is already the newest version (8c-2ubuntu10).
    libonig-dev is already the newest version (6.9.7.1-2build1).
    libpng-dev is already the newest version (1.6.37-3build5).
    libreadline-dev is already the newest version (8.1.2-1).
    libsqlite3-dev is already the newest version (3.37.2-2).
    libtidy-dev is already the newest version (2:5.6.0-11build2).
    libxslt1-dev is already the newest version (1.1.34-4build2).
    pkg-config is already the newest version (0.29.2-1ubuntu3).
    re2c is already the newest version (3.0-1).
    zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9).
    autoconf2.13 is already the newest version (2.13-69).
    autoconf2.64 is already the newest version (2.64+dfsg-1).
    libmcrypt-dev is already the newest version (2.5.8-7).
    curl is already the newest version (7.81.0-1ubuntu1.2).
    git is already the newest version (1:2.34.1-1ubuntu1.2).
    libcurl4-gnutls-dev is already the newest version (7.81.0-1ubuntu1.2).
    libssl-dev is already the newest version (3.0.2-0ubuntu1.2).
    libxml2-dev is already the newest version (2.9.13+dfsg-1ubuntu0.1).
    libzip-dev is already the newest version (1.7.3-1+ubuntu20.04.1+deb.sury.org+2).
    0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
    
    opened by allanlaal 8
  • FIX version number autocomplete sort order should be numeric

    FIX version number autocomplete sort order should be numeric

    currently its alphabetic:

      allan@L4:~$ phpenv install 7.1
      7.1.0        7.1.25
      7.1.1        7.1.26
      7.1.10       7.1.27
      7.1.11       7.1.28
      7.1.12       7.1.29
      7.1.13       7.1.3
      7.1.14       7.1.30
      7.1.15       7.1.31
      7.1.16       7.1.32
      7.1.17       7.1.33
      7.1.18       7.1.4
      7.1.19       7.1.5
      7.1.2        7.1.6
      7.1.20       7.1.7
      7.1.21       7.1.8
      7.1.22       7.1.9
      7.1.23       7.1snapshot
      7.1.24 
    
    opened by allanlaal 0
  • FIX if build fails, clean up partial install

    FIX if build fails, clean up partial install

    failed PHP builds seem to be included in list of installed PHP according to phpenv versions

    expected

    php-build cleans out failed builds (by default), keeping downloaded installer archive file

    opened by allanlaal 1
Owner
php-build
A tool for building a number of PHP versions to be run side by side
php-build
Simple PHP version management

phpenv - PHP multi-version installation and management for humans. Key features: My name is phpenv. I was designed for humans, to help simplify the ma

php multiple release management 4 humans 1.3k Dec 30, 2022
Thin Wrapper around rbenv for PHP version managment

phpenv ![Gitter](https://badges.gitter.im/Join Chat.svg) Sets up a separate rbenv environment for PHP man page SYNOPSIS phpenv-install.sh UPDATE=yes p

Christoph Hochstrasser 571 Dec 29, 2022
virtPHP is a tool to create isolated PHP environments.

virtPHP is a tool for creating and managing multiple isolated PHP environments on a single machine. It's like Python's virtualenv, but for PHP. virtPH

VirtPHP 538 Sep 14, 2022
🔰 Instant PHP quality checks from your console

PHP Insights was carefully crafted to simplify the analysis of your code directly from your terminal, and is the perfect starting point to analyze the code quality of your PHP projects.

Nuno Maduro 4.8k Dec 27, 2022
A tool that can be used to verify BC breaks between two versions of a PHP library.

Roave Backward Compatibility Check A tool that can be used to verify BC breaks between two versions of a PHP library. Pre-requisites/assumptions Your

Roave, LLC 530 Dec 27, 2022
A comprehensive library for generating differences between two strings in multiple formats (unified, side by side HTML etc). Based on the difflib implementation in Python

PHP Diff Class Introduction A comprehensive library for generating differences between two hashable objects (strings or arrays). Generated differences

Chris Boulton 708 Dec 25, 2022
A Composer script to run a 'test' or 'spec' Composer script against multiple PHP versions.

composer-multitest composer-multitest is a Composer script that runs a test or spec Composer script against multiple PHP versions managed by PHPBrew o

Raphael Stolt 5 Aug 27, 2019
:white_check_mark: JoliCi - Run your TravisCi builds locally

JoliCi JoliCi is a free and open source Continuous Integration Client written in PHP (5.4 minimum) and powered by Docker (please use a recent version)

JoliCode 659 Nov 20, 2022
Builds Cycle ORM schemas from OpenAPI 3 component schemas

Phanua OpenAPI 3 + Jane + Cycle ORM = ?? Phanua builds Cycle ORM schemas from OpenAPI 3 component schemas. Released under the MIT License. WARNING: Th

Matthew Turland 5 Dec 26, 2022
Builds nice, normalized and easy to consume REST JSON responses for Laravel powered APIs.

REST API Response Builder for Laravel Master branch: Development branch: Table of contents Introduction Why should I use it? Usage examples Features E

Marcin Orlowski 614 Dec 26, 2022
A Zabbix 5.4 module to group items under Monitoring -> Latest data per Tag as it used to be with Application grouping in previous versions of Zabbix

zabbix-module-latest-data Written according to Zabbix official documentation https://www.zabbix.com/documentation/current/manual/modules A Zabbix 5.4

BGmot 18 Dec 6, 2022
Damn Vulnerable Web Services is an insecure web application with multiple vulnerable web service components that can be used to learn real world web service vulnerabilities.

Damn Vulnerable Web Services is an insecure web application with multiple vulnerable web service components that can be used to learn real world web service vulnerabilities.

Sam Sanoop 416 Dec 17, 2022
A PHP library that can be used manually as well as a CLI script that you can just run on your file

Run phpcs on files and only report new warnings/errors compared to the previous version. This is both a PHP library that can be used manually as well

Payton Swick 20 Aug 4, 2022
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

GetOptionKit Code Quality Versions & Stats A powerful option parser toolkit for PHP, supporting type constraints, flag, multiple flag, multiple values

Yo-An Lin 140 Sep 28, 2022
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

GetOptionKit Code Quality Versions & Stats A powerful option parser toolkit for PHP, supporting type constraints, flag, multiple flag, multiple values

Yo-An Lin 140 Sep 28, 2022
Laravel package to search through multiple Eloquent models. Supports sorting, pagination, scoped queries, eager load relationships and searching through single or multiple columns.

Laravel Cross Eloquent Search This Laravel package allows you to search through multiple Eloquent models. It supports sorting, pagination, scoped quer

Protone Media 844 Dec 25, 2022
Textpattern-jquery-ui-theme - The jQuery UI theme used within the Textpattern CMS admin-side.

Textpattern jQuery UI theme The jQuery UI theme used within the Textpattern CMS admin-side. Supported web browsers Chrome, Edge, Firefox, Safari and O

Textpattern CMS 12 Jan 10, 2022
SecLists is the security tester's companion. It's a collection of multiple types of lists used during security assessments

SecLists is the security tester's companion. It's a collection of multiple types of lists used during security assessments, collected in one place. List types include usernames, passwords, URLs, sensitive data patterns, fuzzing payloads, web shells, and many more. The goal is to enable a security tester to pull this repository onto a new testing box and have access to every type of list that may be needed.

Daniel Miessler 44k Jan 3, 2023