Enable PHP Semaphore Functions on MAMP

隐身守侯 提交于 2019-12-06 11:00:30

As you said in your question, you need to compile a php version with Semaphore enabling. The steps are:

  1. Download PHP
  2. Execute ./configure with required --enable-xxx params (list that I used mentioned below). It's not that easy and you might also need to install some brew packages (I needed to install map-uw and libiodbc).
  3. Execute make
  4. Replace MAMP version with the new compiled version

./configure params that I use:

./configure \
--prefix=/Applications/MAMP/bin/php/php5.4.45 \
--exec-prefix=/Applications/MAMP/bin/php/php5.4.45 \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/Applications/MAMP/bin/php/php5.4.45/conf \
--enable-cli \
--with-config-file-path=/Applications/MAMP/bin/php/php5.4.45/conf \
--with-libxml-dir=/Applications/MAMP/Library \
--with-openssl=/Applications/MAMP/Library \
--with-kerberos=/usr \
--with-zlib=/Applications/MAMP/Library \
--with-zlib-dir=/Applications/MAMP/Library \
--enable-bcmath \
--with-bz2=/Applications/MAMP/Library \
--enable-calendar \
--with-curl=/Applications/MAMP/Library \
--enable-dba \
--enable-exif \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-icu-dir=/Applications/MAMP/Library \
--with-iodbc=/Applications/MAMP/Library \
--enable-mbstring=all \
--enable-mbregex \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--without-pear \
--with-pdo-mysql=mysqlnd \
--with-mysql-sock=/var/mysql/mysql.sock \
--enable-shmop \
--enable-soap \
--enable-pcntl \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-xmlrpc \
--with-iconv=/Applications/MAMP/Library \
--with-xsl=/Applications/MAMP/Library \
--enable-zip \
--with-kerberos \
--enable-intl \
--with-pcre-regex \
--with-freetype-dir=/Applications/MAMP/Library \
--with-jpeg-dir=/Applications/MAMP/Library \
--with-png-dir=/Applications/MAMP/Library \
--with-t1lib=/Applications/MAMP/Library \
--with-gettext=shared,/Applications/MAMP/Library \
--with-mcrypt=shared,/Applications/MAMP/Library \
--enable-opcache \
--enable-cgi \
--with-libexpat-dir=/Applications/MAMP/Library \
--with-mhash
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!