How to compile and install php7 on mac
How to compile and install php7 on mac: 1. Download PHP through "wget -c http://mirrors.sohu.com/php/php-7.1.8.tar.gz"; 2. Through "tar -zxvf php-7.1.8.tar.gz" to decompress and compile.
The operating environment of this article: macOS10.15 system, PHP7.1.8 version, macbook pro 2020 computer.
How to compile and install php7 on mac?
Compile and install PHP7.1.8 on Mac:
1. Download the stable version of PHP
wget -c http://mirrors.sohu.com/php/php-7.1.8.tar.gz
2. Problems encountered when decompressing and compiling
tar -zxvf php-7.1.8.tar.gz ./configure --prefix=/usr/local/php/7.1.8 \ --with-config-file-path=/usr/local/php/7.1.8/etc \ --with-config-file-scan-dir=/usr/local/php/7.1.8/etc/conf.d \ --with-apxs2=/usr/sbin/apxs \ --enable-fpm \ --with-fpm-user=www \ --with-fpm-group=www \ --with-mysqli \ --with-pdo-mysql \ --with-iconv-dir \ --with-freetype-dir \ --with-zlib \ --with-jpeg-dir \ --with-png-dir \ --with-libxml-dir=/usr/bin/xml2-config \ --enable-xml \ --disable-rpath \ --enable-bcmath \ --enable-shmop \ --enable-sysvsem \ --enable-inline-optimization \ --with-curl \ --enable-mbregex \ --enable-mbstring \ --with-mcrypt \ --enable-ftp \ --with-gd \ --enable-gd-native-ttf \ --with-openssl \ --with-mhash \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-zip \ --enable-soap \ --without-pear \ --with-gettext \ --disable-fileinfo \ --enable-maintainer-zts \ --enable-mysqlnd
:
- apxs error reporting problem
Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed)
Solution: Find For apxs in the bin directory under the httpd installation directory, try not to write /usr/bin/apxs
- because the openssl that comes with Mac cannot be upgraded (I have not found a way to upgrade), resulting in a later version. Low, error:
configure: error: OpenSSL version 1.0.1 or greater required.
Solution: Since the openssl that comes with Mac cannot be upgraded (I did not find a way to upgrade), use
brew install openssl
to install the latest version of openssl, and then Add the path of ssl installed by brew in the parameters
--with-openssl=/usr/local/Cellar/openssl@1.1/1.1.0e
- --with-gettext error reporting
configure: error: Cannot locate header file libintl.h
Solution:
brew install gettext
Open PHP configure file, modify the
for i in $PHP_GETTEXT /usr/local /usr/ ;do
of the file to
for i in $PHP_GETTEXT /usr/local /usr/ usr/local/opt/gettext;do
- libiconv problem, the error is as follows:
checking for iconv... no checking for libiconv... no configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>
Solution:
Install libiconv ( Character encoding conversion library)
Website address: http://www.gnu.org/software/libiconv/
Current version: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15 .tar.gz
$ wget [https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz $ tar zxvf libiconv-1.15.tar.gz $ cd libiconv-1.15 $ ./configure --prefix=/usr/local/lib/libiconv $ make $ sudo make install
Installation
make && sudo make install
Recommended study: "PHP7 Tutorial"
The above is the detailed content of How to compile and install php7 on mac. For more information, please follow other related articles on the PHP Chinese website!

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











Many Mac users tend to keep the default name of their device and may never consider changing it. Many people choose to stick with the name from the initial setup, such as "Johnny's MacBook Air" or simply "iMac." Learning how to change the name of your Mac is a very useful skill, especially when you have multiple devices, as it can help you quickly distinguish and manage them. Next, we will teach you step by step how to change the computer name, host name and Bonjour name (local host name) in macOS system. Why should you change your Mac name? Changing the name of your Mac can not only show your personality, but also help improve the user experience: Personalize your Mac: The default name may not be to your taste, change it to a name you like.

Preface: Today, this site will share with you the relevant content about installing pkg files on Mac. If it can solve the problem you are facing now, don’t forget to follow this site and start now! The previous version of macos pkg cannot be installed to upgrade the operating system: If your laptop is using an older operating system version, it is recommended to upgrade to the latest operating system version. Because older versions may not support installation of the latest macOS system. Select "Erase" in Disk Utility, then select the Macos extension in the format, do not check the encryption option, and do not select the apfs format, and finally click the "Erase" button to solve the problem of being unable to complete the macOS installation. Drag the application's icon to the file starting with App

Recently, some friends have consulted the editor about how to set up WeChat Mac to automatically convert voice messages into text. The following is a method for setting up WeChat Mac to automatically convert voice messages into text. Friends in need can come and learn more. Step 1: First, open the Mac version of WeChat. As shown in the picture: Step 2: Next, click "Settings". As shown in the picture: Step 3: Then, click "General". As shown in the picture: Step 4: Then check the option "Automatically convert voice messages in chat to text". As shown in the picture: Step 5: Finally, close the window. As shown in the picture:

By default, iPhone takes photos from the camera in HEIC format. HEIC stands for High Efficiency Image Container and can hold more pixel data than PNG or JPG files, taking up significantly less space on iPhone storage compared to other formats. These files work best on iPhones but are not widely accepted on the internet because they often result in blurry/grainy pictures when you share them with non-Apple devices. To ensure that HEIC images are compatible on other devices, you may need to convert them to JPG format. This article will introduce how to convert HEIC images to JPG on Mac. How to Convert HEIC Photos to JPG on Mac [3 Methods] Method

Formatting the drive of your Mac system is crucial for proper functioning. It helps prevent various system problems and makes your Mac more stable overall. While naturally Mac supports various partitioning schemes, GUID offers more modern and versatile features compared to other options. Also essential for newer Macs and supports larger drives, giving you the best compatibility and stability. This guide will take an in-depth look at how to format a drive using a GUID on macOS. That said, let's get started. Why GUID is important for macOS installation A GUID (full form of Globally Unique Identifier) is a partitioning scheme that helps install and run the macOS operating system. It is better than traditional MBR (main lead

Ever since the Apple M4-powered OLED iPad Prolineuparrived, Apple Silicon aficionados have been eagerly awaiting the arrival of the M4 SoC on the Mac lineup. The M4 was undeniably a major leap forward in both compute and graphics performance - leapfr

To resolve the plugin not showing installed issue in PHP 7.0: Check the plugin configuration and enable the plugin. Restart PHP to apply configuration changes. Check the plugin file permissions to make sure they are correct. Install missing dependencies to ensure the plugin functions properly. If all other steps fail, rebuild PHP. Other possible causes include incompatible plugin versions, loading the wrong version, or PHP configuration issues.

Preface: This article is here to introduce you to the relevant content about new shortcut keys for Mac. I hope it will be helpful to you, let’s take a look. How to Set Copy and Paste Shortcuts on Mac To change the copy and paste shortcuts on your Mac, go to the upper left corner of the Apple menu and select System Preferences. In the System Preferences window, find and click the "Keyboard" option. This will open the keyboard settings, allowing you to customize shortcut keys, including copy and paste functions. On Mac computers, the default shortcut keys for copy and paste operations are "Command+C" for copying and "Command+V" for pasting. To do this, first open the text or image you want to copy and paste. After selecting the file, press the shortcut key "comma
