Home > Article > Backend Development > How to install php7.1 memcache extension on mac
The content of this article is to introduce the method of installing php7.1 memcache extension on mac. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
1. Download the memcache source code file
https://github.com/websupport-sk/pecl-memcache/archive/php7.zip
The folder name is :pecl-memcache-php7
2. After decompression, enter the folder and execute the following command
phpize
I encountered this error when executing phpize
$ phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No:
The header file of PHP is missing. , then look at the /usr/include folder and type the following command:
$ xcode-select --install xcode-select: note: install requested for command line developer tools
If phpize is still invalid, execute the following command to install the header file SDK:
$ cd /Library/Developer/CommandLineTools/Packages/$ open macOS_SDK_headers_for_macOS_10.14.pkg
./ configure --with-php-config=/usr/local/opt/php\@7.1/bin/php-config
Change php-config to the specified path
which php-config
3. Execute make & make install command
4. Configure php.ini and add the following statement:
extension="memcache.so"
where php.ini path
/private/etc/php.ini
Related videos Tutorial recommendation: "PHP Tutorial"
The above is the entire content of this article, I hope it will be helpful to everyone's learning. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !
The above is the detailed content of How to install php7.1 memcache extension on mac. For more information, please follow other related articles on the PHP Chinese website!