{"id":16314957,"url":"https://github.com/cebe/make-php","last_synced_at":"2025-10-19T15:45:28.524Z","repository":{"id":66289075,"uuid":"27410726","full_name":"cebe/make-php","owner":"cebe","description":"A simple script to build different PHP versions","archived":false,"fork":false,"pushed_at":"2017-11-29T22:53:19.000Z","size":15,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T10:47:05.401Z","etag":null,"topics":["build-automation","build-tool","php","php-versions"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cebe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-02T02:16:04.000Z","updated_at":"2019-06-14T12:01:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c53f69eb-fa1d-4e0b-8303-3001285f381e","html_url":"https://github.com/cebe/make-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cebe/make-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmake-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmake-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmake-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmake-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cebe","download_url":"https://codeload.github.com/cebe/make-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebe%2Fmake-php/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267779065,"owners_count":24143176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-automation","build-tool","php","php-versions"],"created_at":"2024-10-10T21:55:42.340Z","updated_at":"2025-10-19T15:45:23.483Z","avatar_url":"https://github.com/cebe.png","language":"Shell","readme":"make-php\n========\n\nA simple script to build different PHP versions for development. It uses the debian alternatives system to replace the \nsystem-wide PHP binaries and allows resetting to defaults if the PHP binaries installed via the package manager should be used.\n\nInstallation\n------------\n\n### Dependencies\n\nAt least the following packages are needed to run this:\n\n    apt-get install  build-essential autoconf automake\n\nA more complete set of build tools:\n\n    apt-get install  build-essential autoconf automake git curl pkg-config bison re2c libxml2-dev\n\nYou may also need these for some build options of PHP:\n\n    apt-get install  libicu-dev libmcrypt-dev libreadline-dev libxml2-dev libbz2-dev \\\n                     openssl libssl-dev libcurl4-openssl-dev libjpeg-dev libpng-dev \\\n                     libfreetype6-dev libmm-dev libpq-dev\n\n### Clone Repo\n\nAfter installing dependencies you can clone this repository.\nThe location does not matter, but I use to put it under `/srv/php-src`:\n\n    git clone https://github.com/cebe/make-php /srv/php-src\n\nYou may want to adjust the `BUILD_TARGET` in the script.\nBy default PHP binaries are installed to `/srv/php`.\n\n### GPG\n\nThe script will check the signatures of the PHP tar files it downloads, so you need to add the keys of the PHP maintainers to\nyou GPG trust DB. You can do it manually, or use the `make-php-keyring.sh` script:\n\n```\n./make-php-keyring.sh\n```\n\nUsage\n-----\n\n### Building a PHP binary \n\nCreate a `*.conf` file for each build config. If you want to statically link pecl extensions into the binary you may list the\nnames of the extensions in `*.pecl.conf`.\nSee `example.conf` and `example.pecl.conf` for examples.\n\nRun the script (assuming your config is `myconfig.conf`):\n\n    ./make-php.sh myconfig 7.0.12\n\nAfterwards you can use the `switch-php.sh` command to replace the existing `/usr/bin/php*` symlinks using debians `update-alternatives` system. `./switch-php.sh --reset` will restore the original PHP version that may be installed by apt.\n\n\u003e Tip: To enable the switch-php command, you can link it to `/usr/local/bin`:\n\u003e `ln -s /srv/php-src/switch-php.sh /usr/local/bin/switch-php`\n\n### Builing alpha/beta releases\n\nIf you want to install PHP versions that are not officially released or pre-releases like alpha versions, you can specify a URL for the file to download. E.g. to install PHP 7.2.0alpha3 use the following command:\n\n    ./make-php.sh myconfig 7.2.0alpha3 https://downloads.php.net/~remi/php-7.2.0alpha3.tar.bz2 https://downloads.php.net/~remi/php-7.2.0alpha3.tar.bz2.asc\n\n### Applying patches\n\nIf you want to apply patches to the PHP source code, e.g. to fix some bugs or apply workarounds in your specific version, you\ncan place a `.patch` file in the `patches/php-$VERSION` directory. All patch files found in that directory will be applied\nbefore building PHP.\n\nE.g. to apply the [fix for finding cURL on debian](https://github.com/php/php-src/pull/2632) on PHP 7.1.8, you can create a file containing the [patch](https://patch-diff.githubusercontent.com/raw/php/php-src/pull/2632.patch) in `patches/php-7.1.8/curlfix.patch`.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebe%2Fmake-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcebe%2Fmake-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebe%2Fmake-php/lists"}