Code Monkey home page Code Monkey logo

phpenv's Introduction

phpenv

Sets up a separate rbenv environment for PHP

man page

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 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 Rethans

The 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

phpenv's People

Contributors

banyan avatar chh avatar cmbuckley avatar davedevelopment avatar hnw avatar loicfrering avatar milly avatar rogeriopradoj avatar yukio-goto avatar yuya-takeyama avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.