$Php_Autoconf Errors on MAC Os X 10.7.3 When Trying to Install Pecl Extensions

$PHP_AUTOCONF errors on mac os x 10.7.3 when trying to install pecl extensions

brew install autoconf

Much easier solution

phpize Install xcache in mac os x 10.7.3,no such file directory

You need autoconf utility to complete the installation. You can install Homebrew and then do

brew install autoconf

in Terminal. After that repeat XCache installation.

I prefer Homebrew because it's easy to use and it puts all its data in /usr/local and doesn't require you to provide sudo password. So it keeps less garbage in your system than for example MacPots.
However, any package manager will help.

UPD:
Don't forget to check if XCode has Command Line Tools installed

Building XHP php extension on mac os x with xampp

Finally I solved it. I thought the solution in the Github issue was modifying the Makefile in the source directory, while it was in fact the xhp/Makefile that was the issue.

The solution was to add do the following modifications to xhp/Makefile:

Change:

g++ -shared -Wl,-soname,libxhp.so -o libxhp.so $^

To:

g++ -m32 -shared -Wl,-arch,i386 -o libxhp.so $^

Change:

ifdef DEBUG
CPPFLAGS = -fPIC -ggdb -Wall -DDEBUG
else
CPPFLAGS = -fPIC -g -Wall -O3 -minline-all-stringops
endif

To:

ifdef DEBUG
CPPFLAGS = -fPIC -ggdb -Wall -DDEBUG -arch i386
else
CPPFLAGS = -fPIC -g -Wall -O3 -minline-all-stringops -arch i386
endif

Then configure with parameters:

./configure --with-php-config=/usr/local/zend/bin/php-config 
--target=i386-apple-darwin10.8.2 --build=i386-apple-darwin
--host=i386-apple-darwin10.8.2 CFLAGS='-arch i386' LDFLAGS='-arch i386'
CC='gcc -m32' CXX='g++ -m32' CHOST='i386-apple-darwin10.8.2'
CPPFLAGS='-arch i386'

I don't know if all of the above steps are necessary, but it worked for me. Hopefully this will save someone else a couple of headaches.

PHP Xdebug on OS X 10.9 Mavericks

The fast copy-paste way

sudo sh -c 'echo zend_extension=$(find /usr/lib/php/extensions -name "xdebug.so") >> $(php -qr "echo php_ini_loaded_file();") && apachectl restart'

This command do the following :

  • Finds the native Xdebug extension that comes with Xcode
  • Asks php which config file is loaded
  • Adds the Xdebug extension path in the config file
  • Restarts apache.

Compatible with Sierra, El Capitan & Yosemite with the bundeled apache, but untested with MAMP & XAMPP.

Before launching the command, make sure Xcode command line tools are installed : xcode-select --install



Related Topics



Leave a reply



Submit