mac installation php56
$ brew install php56 \ --without-snmp \ --without-<strong>Apache</strong> \ --with-debug \ --with-fpm \ --with-intl \ --with-homebrew-curl \ --with-homebrew-libxslt \ --with-homebrew-openssl \ --with-imap \ --with-mysql \ --with-tidy
==> Installing php56 from homebrew/homebrew-php
==> Installing dependencies for php56: curl, libpng, freetype, gettext, h
==> Installing php56 dependency: curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.41.0_1.yosemite.bott
######################################################################## 100.0%
==> Pouring curl-7.41.0_1.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/curl/lib
CPPFLAGS: -I/usr/local/opt/curl/include
==> Summary
?? /usr/local/Cellar/curl/7.41.0_1: 301 files, 2.9M
==> Installing php56 dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.16.yosemite.bott
######################################################################## 100.0%
==> Pouring libpng-1.6.16.yosemite.bottle.tar.gz
?? /usr/local/Cellar/libpng/1.6.16: 17 files, 1.3M
==> Installing php56 dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.5.5.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring freetype-2.5.5.yosemite.bottle.tar.gz
?? /usr/local/Cellar/freetype/2.5.5: 60 files, 2.6M
==> Installing php56 dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.4.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gettext-0.19.4.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.
OS X provides the BSD gettext library and some software gets confused if both are in the library path.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/gettext/lib
CPPFLAGS: -I/usr/local/opt/gettext/include
==> Summary
?? /usr/local/Cellar/gettext/0.19.4: 1920 files, 21M
==> Installing php56 dependency: homebrew/dupes/tidy
==> Downloading https://homebrew.bintray.com/bottles-dupes/tidy-20090325.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring tidy-20090325.yosemite.bottle.tar.gz
?? /usr/local/Cellar/tidy/20090325: 10 files, 940K
==> Installing php56 dependency: homebrew/dupes/zlib
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/dupes/zlib-1.2.8.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring zlib-1.2.8.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/zlib/lib
CPPFLAGS: -I/usr/local/opt/zlib/include
==> Summary
?? /usr/local/Cellar/zlib/1.2.8: 9 files, 392K
==> Installing php56 dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-54.1.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring icu4c-54.1.yosemite.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
OS X provides libicucore.dylib (but nothing else).
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/icu4c/lib
CPPFLAGS: -I/usr/local/opt/icu4c/include
==> Summary
?? /usr/local/Cellar/icu4c/54.1: 242 files, 65M
==> Installing php56 dependency: imap-uw
==> Downloading https://homebrew.bintray.com/bottles/imap-uw-2007f.yosemite.bott
######################################################################## 100.0%
==> Pouring imap-uw-2007f.yosemite.bottle.tar.gz
?? /usr/local/Cellar/imap-uw/2007f: 150 files, 9.5M
==> Installing php56 dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-8d.yosemite.bottle.2.t
######################################################################## 100.0%
==> Pouring jpeg-8d.yosemite.bottle.2.tar.gz
?? /usr/local/Cellar/jpeg/8d: 18 files, 776K
==> Installing php56 dependency: unixodbc
==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.2_1.yosemite.b
######################################################################## 100.0%
==> Pouring unixodbc-2.3.2_1.yosemite.bottle.1.tar.gz
?? /usr/local/Cellar/unixodbc/2.3.2_1: 31 files, 1.0M
==> Installing php56
==> Downloading https://www.php.net/get/php-5.6.7.tar.bz2/from/this/mirror
########################### 37.9%
curl: (56) SSLRead() return error -9806
Error: Failed to download resource "php56"
Download failed: https://www.php.net/get/php-5.6.7.tar.bz2/from/this/mirror
localhost:~ zhoujunwen$ brew install php56
==> Installing php56 from homebrew/homebrew-php
==> Downloading https://homebrew.bintray.com/bottles-php/php56-5.6.7.yosemite.bo
######################################################################## 100.0%
==> Pouring php56-5.6.7.yosemite.bottle.tar.gz
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/opt/php56/libexec/Apache2/libphp5.so
The php.ini file can be found in:
/usr/local/etc/php/5.6/php.ini
???? PEAR ????
If PEAR complains about permissions, 'fix' the default PEAR permissions and config:
chmod -R ug+w /usr/local/Cellar/php56/5.6.7/lib/php
pear config-set php_ini /usr/local/etc/php/5.6/php.ini system
???? Extensions ????
If you are having issues with custom extension compiling, ensure that
you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PATH="/usr/local/bin:$PATH"
PHP56 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.
???? PHP CLI ????
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,
~/.zshrc, ~/.profile or your shell's equivalent configuration file:
export PATH="$(brew --prefix homebrew/php/php56)/bin:$PATH"
???? FPM ????
To launch php-fpm on startup:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
The control script is located at /usr/local/opt/php56/sbin/php56-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH="/usr/local/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'homebrew-php.josegonzalez.php56. plist' in old versions
of this formula.
To have launchd start php56 at login:
ln -sfv /usr/local/opt/php56/*.plist ~/Library/LaunchAgents
Then to load php56 now :
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
==> Summary
?? /usr/local/Cellar/php56/5.6.7: 500 files, 51M
The above introduces the installation of php56 on Mac, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.
