GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing phpbrew.github.io — Phpbrew by phpbrew PhpbrewBrew & manage PHP versions in pure PHP at HOMEView on GitHub Download .zip Download .tar.gzPHPBrewRead this in other languages: English, Português - BR, 日本語. phpbrew builds and installs multiple version php(s) in your $HOME directory. What phpbrew can do for you:
RequirementPlease see Requirement before you get started. you need to install some development packages for building PHP. InstallationJust download it: curl -L -O https://github.com/phpbrew/phpbrew/releases/latest/download/phpbrew.phar chmod +x phpbrew.phar Then you can install it into your bin folder: sudo mv phpbrew.phar /usr/local/bin/phpbrew Be sure to have Setting upInit a bash script for your shell environment: $ phpbrew init Add these lines to your [[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc Setting up lookup prefixYou may setup your prefered default prefix for looking up libraries, available
options are For Homebrew users: $ phpbrew lookup-prefix homebrew For Macports users: $ phpbrew lookup-prefix macports Basic usageTo list known versions: $ phpbrew known 7.0: 7.0.3, 7.0.2, 7.0.1, 7.0.0 ... 5.6: 5.6.18, 5.6.17, 5.6.16, 5.6.15, 5.6.14, 5.6.13, 5.6.12, 5.6.11 ... 5.5: 5.5.32, 5.5.31, 5.5.30, 5.5.29, 5.5.28, 5.5.27, 5.5.26, 5.5.25 ... 5.4: 5.4.45, 5.4.44, 5.4.43, 5.4.42, 5.4.41, 5.4.40, 5.4.39, 5.4.38 ... 5.3: 5.3.29, 5.3.28 ... To show more minor versions: $ phpbrew known --more To update the release info: $ phpbrew update To get older versions (less than 5.4)
$ phpbrew update --old To list known older versions (less than 5.4) $ phpbrew known --old Starting Building Your Own PHPSimply build and install PHP with default variant: $ phpbrew install 5.4.0 +default Here we suggest You can enable parallel compilation by passing $ phpbrew install -j $(nproc) 5.4.0 +defaultWith tests: $ phpbrew install --test 5.4.0 With debug messages: $ phpbrew -d install --test 5.4.0 To install older versions (less than 5.3): $ phpbrew install --old 5.2.13 To install the next (unstable) version: $ phpbrew install next as php-7.1.0 To install from a github tag: $ phpbrew install github:php/[email protected] as php-7.0.0 Cleaning up build directory$ phpbrew clean php-5.4.0 VariantsPHPBrew arranges configure options for you, you can simply specify variant name, and phpbrew will detect include paths and build options for configuring. PHPBrew provides default variants and some virtual variants, to the default variants, which includes the most commonly used variants, to the virtual variants, which defines a variant set, you may use one virtual variant to enable multiple variants at one time. To check out what is included in these variants, simply run $ phpbrew variants
Variants:
all, apxs2, bcmath, bz2, calendar, cgi, cli, ctype, dba, debug, dom, embed,
exif, fileinfo, filter, fpm, ftp, gcov, gd, gettext, hash, iconv, icu,
imap, intl, ipc, ipv6, json, kerberos, mbregex, mbstring, mcrypt, mhash,
mysql, openssl, pcntl, pcre, pdo, pgsql, phar, posix, readline, session,
soap, sockets, sqlite, tidy, tokenizer, xml_all, xmlrpc, zip, zlib, gmp
Virtual variants:
dbs: sqlite, mysql, pgsql, pdo
mb: mbstring, mbregex
neutral:
default: filter, dom, bcmath, ctype, mhash, fileinfo, pdo, posix, ipc,
pcntl, bz2, zip, cli, json, mbstring, mbregex, calendar, sockets, readline,
xml_all
Using variants to build PHP:
phpbrew install 5.3.10 +default
phpbrew install 5.3.10 +mysql +pdo
phpbrew install 5.3.10 +mysql +pdo +apxs2
phpbrew install 5.3.10 +mysql +pdo +apxs2=/usr/bin/apxs2To enable one variant, simply add a prefix
To disable one variant, simply add a prefix
For example, if we want to build PHP with the default options and database supports (mysql, sqlite, postgresql), you may simply run: $ phpbrew install 5.4.5 +default+dbs You may also build PHP with extra variants: $ phpbrew install 5.3.10 +mysql+sqlite+cgi $ phpbrew install 5.3.10 +mysql+debug+pgsql +apxs2 $ phpbrew install 5.3.10 +pdo +mysql +pgsql +apxs2=/usr/bin/apxs2 To build PHP with pgsql (PostgreSQL) extension: $ phpbrew install 5.4.1 +pgsql+pdo Or build pgsql extension with postgresql base dir on Mac OS X: $ phpbrew install 5.4.1 +pdo+pgsql=/opt/local/lib/postgresql91/bin The pgsql path is the location of To build PHP with neutral compile options, you can specify $ phpbrew install 5.4.1 +neutral For more details, please check out PHPBrew Cookbook. Extra Configure OptionsTo pass extra configure arguments, you can do this: $ phpbrew install 5.3.10 +mysql +sqlite -- \
--enable-ftp --apxs2=/opt/local/apache2/bin/apxsUse And SwitchUse (switch version temporarily): $ phpbrew use 5.4.22 Switch PHP version (switch default version) $ phpbrew switch 5.4.18 Turn Off: $ phpbrew off If you enable apache PHP modules, remember to comment out or remove the settings. $ sudo vim /etc/httpd/conf/httpd.conf # LoadModule php5_module /usr/lib/httpd/modules/libphp5.3.21.so # LoadModule php5_module /usr/lib/httpd/modules/libphp5.3.20.so List installed PHP$ phpbrew list The Extension InstallerYou can also install PHP extension with ease, either the extensions shipped with PHP source code or even from PECL. If the extension directory is found in PHP source, PHPBrew automatically switch into the PHP source directory and install the extension. If the extension directory is not found in PHP source, PHPBrew fetch the extension package from PECL http://pecl.php.net. PHPBrew also creates extension config to enable the installed extension, so you don't need to write the config file to enable it by hands. The extension config directory is in:
Installing Extension - The Most Simple WayBefore you install any PHP extension, you should set your current running php: $ phpbrew use php-5.5.6 Then run $ phpbrew ext install apcu $ phpbrew ext install memcache Installing Extension With StabilityTo install extensions with stability tag: $ phpbrew ext install xdebug stable $ phpbrew ext install xdebug latest $ phpbrew ext install xdebug beta To install extensions with version name: $ phpbrew ext install xdebug 2.0.1 Showing extension config optionsTo see if there are some configure options to build the extension, you can use
the phpbrew ext show apcu Install extensions with customized options:$ phpbrew ext install yaml -- --with-yaml=/opt/local Installing Extension from GitHubThe special prefix $ phpbrew ext install github:php-memcached-dev/php-memcached php7 -- --disable-memcached-sasl Installing Extension with specific downloaderRight now, phpbrew supports 4 different downloader implementation:
It's possible to replace the default downloader with your preference:
The curl php extension based downloader supports User-Agent and Proxy Settings, thus you can do this if you encountered some network issues:
Enabling ExtensionYou can also install extension via PECL and enable it manually: pecl install mongo
phpbrew ext enable mongoThe Configuring the php.ini for current php versionSimply run: $ phpbrew config You may specify the EDITOR environment variable to your favorite editor: export EDITOR=vim
phpbrew configUpgrade phpbrewTo upgrade phpbrew, you may simply run the $ phpbrew self-update The Installed PHP(s)The installed phps are located in
And you should put your configuration file in:
Extension configuration files should be put in:
Quick commands to switch between directoriesSwitching to PHP build directory $ phpbrew build-dir Switching to PHP dist directory $ phpbrew dist-dir Switching to PHP etc directory $ phpbrew etc-dir Switching to PHP var directory $ phpbrew var-dir PHP FPMphpbrew also provides useful fpm managing sub-commands. to use them, please
remember to enable To start php-fpm, simply type: $ phpbrew fpm start To stop php-fpm, type: $ phpbrew fpm stop To show php-fpm modules: phpbrew fpm module To test php-fpm config: phpbrew fpm testTo edit php-fpm config: phpbrew fpm config
Enabling Version Info PromptTo add PHP version info in your shell prompt, you can use
The default is export PHPBREW_SET_PROMPT=1To embed version info in your prompt, you can use
PS1=" \$(phpbrew_current_php_version) \$ "Known Issues
TroubleshootingPlease see TroubleShooting FAQQ: How do I have the same version with different compile option? A: Currently, you can install php5.x.x and rename the /Users/phpbrew/.phpbrew/php/php-5.x.x folder to the new name, for example, php-5.x.x-super , and install another php-5.3.3 ContributionPlease see Contribution DocumentationPlease see Wiki Author
LicenseSee LICENSE file. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |