Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CHH/phpenv
Thin Wrapper around rbenv for PHP version managment
https://github.com/CHH/phpenv
Last synced: about 1 month ago
JSON representation
Thin Wrapper around rbenv for PHP version managment
- Host: GitHub
- URL: https://github.com/CHH/phpenv
- Owner: CHH
- License: mit
- Created: 2011-08-05T19:38:32.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2021-05-31T19:56:06.000Z (about 3 years ago)
- Last Synced: 2024-01-12T16:05:17.494Z (5 months ago)
- Language: Shell
- Homepage:
- Size: 310 KB
- Stars: 571
- Watchers: 24
- Forks: 89
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-php-cn - 官网
- awesome-php - PHP Env - 另一个PHP版本工具 (PHP 安装(PHP Installation))
- awesome-php - PHP Env - Another PHP version manager. (PHP Installation)
- awesome-php-cn - 官网
- awesome-php - PHP Env - 另一个PHP版本工具 (URL)
- awesome-php - PHP Env - Another PHP version manager. (PHP Installation)
- awesome-php - PHP Env - 另一个PHP版本工具 (PHP 安装(PHP Installation))
README
# phpenv
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/CHH/phpenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)Sets up a separate rbenv environment for PHP
[man page](https://github.com/CHH/phpenv/blob/master/man/phpenv-install.1.ronn)
## SYNOPSIS
phpenv-install.sh
UPDATE=yes phpenv-install.sh## DESCRIPTION
The `phpenv-install.sh` command sets up a separate rbenv
environment for usage with PHP. This environment is
stored in the `$HOME/.phpenv` directory and contains
a `phpenv` executable which sets the `RBENV_ROOT`
environment variable to `$HOME/.phpenv`.To install PHP versions, just put them to the `$HOME/.phpenv/versions`
directory. You can use [php-build](http://github.com/chh/php-build)
to do this with one command:$ php-build -i development 5.4.9 $HOME/.phpenv/versions/5.4.9
$ phpenv versions
5.4.9
$ phpenv rehash
$ phpenv global 5.4.9
$ php --version
PHP 5.4.9 (cli) (built: Nov 25 2012 17:27:10)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick RethansThe `phpenv-install.sh` command has an optional
"update" mode which updates the `$HOME/.phpenv` to
the latest source code from the rbenv repository
and creates a new `phpenv` executable.This mode is triggered by setting the
`UPDATE` environment variable before
calling `phpenv-install.sh`, for example:$ UPDATE=yes phpenv-install.sh
Finally, enable phpenv in your shell by adding `$HOME/.phpenv/bin` and
`$HOME/.phpenv/shims` to your `PATH` and adding `eval "$(phpenv init -)"`
to your `$HOME/.bash_profile` or `$HOME/.bashrc` (or your shell's
respective file) and restart your shell.## IMPORTANT NOTES
- **For rbenv users**: Make sure that `~/.rbenv/bin` takes precedence
in the `PATH` over `~/.phpenv/bin` by placing it before, so `rbenv` gets
used from `~/.rbenv`.- You need to have `git` installed to run the `phpenv-install.sh` command.
## SEE ALSO
[rbenv](http://github.com/sstephenson/rbenv)
[SYNOPSIS]: #SYNOPSIS "SYNOPSIS"
[DESCRIPTION]: #DESCRIPTION "DESCRIPTION"
[IMPORTANT NOTES]: #IMPORTANT-NOTES "IMPORTANT NOTES"
[LICENSE]: #LICENSE "LICENSE"
[SEE ALSO]: #SEE-ALSO "SEE ALSO"