13:29:12: bonsai $ sudo pecl install apc Password: pecl/apc is already installed and is the same as the released version 3.1.13 install failed 13:29:32: bonsai $ sudo pecl install apc pecl/apc is already installed and is the same as the released version 3.1.13 install failed 13:29:50: bonsai $ which apc 13:30:19: bonsai $ which pecl. How Tos General Install a PHP extension using PECL. Use the following guideline to compile your own extensions. This example uses the mongodb extension and PHP 7.0.15.
Getting ZeroMQ working on a Mac looks like a pain if you try to compile, but there’s a much easier way to get it up and running, with just a few brew and PECL commands.
I’ve been wary of Homebrew for a while, as there were lots of issues with Macports in the past, but I’ve found it’s a lot easier than trying to compile various things yourself in OS X (I tried to compile 0MQ, which took a while and ended up broken anyway)
Installation
Install Homebrew and ZeroMQ
Grab a copy of Homebrew then run the following command
brew install zeromq
Then once this is installed, install the PECL extension for PHP
Enable ZeroMQ support for PHP
sudo pear channel-discover pear.zero.mq
sudo pecl install pear.zero.mq/zmq-beta
sudo pecl install pear.zero.mq/zmq-beta
Errors
If you have more than one PHP binary on your computer (such as if you are using Zend Server on OS X, which means you will have the default PHP binary and the Zend PHP binary) then even if 0MQ looks like it is enabled using phpinfo() you may still get the following error from Composer:
– Installation request for react/zmq dev-master -> satisfiable by react/zmq[dev-master].
– react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
– react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.
This is because Composer uses the PHP-CLI binary to both check and install things, meaning that unless it’s enabled for the binary it’s looking at, it won’t install, even if your web server has it enabled.
You just need to add (even temporarily) the correct PHP binary to the shell path:
export PATH=/usr/local/zend/bin:$PATH
(change depending on where your other binary is)
Then run composer.phar install again and it should work.
Posted 7 years, 40 weeks ago.
This last weekend, I decided to knuckle down and build an OAuth server in PHP. One thing that had kept me from doing it until now was that I didn’t have the required extension installed in my development environment.
My development environment is MAMP (not the PRO version), which I’m running on OS X Mountain Lion. The combination made it a little more difficult to install extensions than I would have liked (though I am a bit of a command line n00b, so I guess there’s that).
So both to assist those who come after me, and also to remind me when I have to go through this again, here’s what I did.
Install Command Line Tools
First up we need to install the Command Line Tools that usually come with Xcode. Regardless of whatever that previous sentence will have you believe, you don’t actually require Xcode to install them. Fanco warm air manual.
If you have Xcode, installation is as simple as opening up Xcode, going into the Downloads pane of the Preferences, selecting components and installing “Command Line Tools”. It’ll take a couple of minutes or whatever, but then it’s done. BOOM. Close Xcode and move on to the next step.
If you don’t have Xcode, you first need to download the tools from the Downloads for Apple Developers page (you’ll need to register as an Apple Developer if you haven’t already). Find the latest version of Command Line Tools for your version of OS X on that page and download them. Once it’s done, open up the disk image and run the installer package.
Additional Tools
There are a few tools that we need which aren’t included in Apple’s little package. Fortunately, I managed to find a blog post that included a useful script which does all the heavy lifting. I took that and turned it into a shell script that you can run with terminal.
Download the script from GitHub, then unzip it and move it into your home folder. Open terminal and then simply run the following command (you might need to type in an administrator’s password at some stage):
This will download and install all the tools included in the script. Once it’s done Terminal will display “Installation complete.” and throw you a new command prompt. Championship manager for mac.
Freddy fazbear%27s pizzeria simulator game for mac. Once it’s done check the last few lines that have printed to the Terminal window. If you’re seeing a whole lot of “command not found” style errors on screen, you might need to open the script in a text editor and enter each line individually. I had to do this on one of my machines to get things working.
Preparing MAMP
If you use OS X’s built in PHP server, you probably don’t need to go through this next part. If, however, you’re using MAMP, then you’ll need to configure it to be able to install your extensions.
Providing the PHP source
Assuming you’ve already installed MAMP (it has an installer package, so it’s pretty easy), you’ll need to download the MAMP Server components and libraries from the MAMP Downloads page (under the heading “Source code”). Tukacad software cracked.
Once this is downloaded, unzip it and find the file for PHP with the version number corresponding to the one you use. If you’re not sure which one you’re using, open the MAMP application, and look at the PHP section in the Preferences pane. Unzip this as well.
Now we need to find the PHP folder in your MAMP install. It’ll reference the PHP version number selected in the Preferences, and it’s pretty likely that you’ll find it in
/Applications/MAMP/bin/php
. Open it in Finder and then create a new folder inside called include
. Copy the folder we unzipped into here and rename it php
. The result should be something like this:Now go to Terminal and use the following command to navigate to the folder we copied. You might have to adjust it if your MAMP installation or version of PHP is different.
Coleman spas hot tub error codes. Then configure it using this command:
It’ll build and run checks and eventually you’ll get a License and a thank you notice and you’ll get a new command prompt.
Using the correct PHP installation
Now that we have everything in place, we need to use the MAMP installation of PHP rather than the default OS X installation. We can change this pretty easily (again, adjust the path if necessary to that it points to your version of PHP): Black ops 3 zombies shadows of evil cheats.
Now we just need to get Terminal to read in the new path variable.
And now we tell pear and pecl where our php.ini file is. You can find this by going to your MAMP installation’s phpInfo page – http://localhost/MAMP/ – and looking at the “Loaded Configuration File”. Then just run these two commands (adjusting depending on where your php.ini is located):
Install an extension
There are two ways to install an extension: the shortcut and the full version. They both do basically the same thing, but if you have issues with one, try the other.
The Shortcut
Open up Terminal and start by doing a channel update for either PEAR or PECL (in this case, PECL):
Now run the install for your extension.
And then add the extension to the php.ini file.
Assuming you get no errors, that’s it. Restart the MAMP servers and away you go!
The Long Way Around
Open up Terminal and browse to whatever directory you want temp files to be located in. In this case,
temp
in the user’s home folder.Next we’ll download and extract the extension’s source with the following two commands:
Navigate into the new directory and prepare for compiling.
Finally, compile and install the extension.
And finally, add the extension to the php.ini file.
Restart the MAMP servers and away you go!
Dealing with errors…
If you try installing an extension at this point, you might get an error complaining that the config file is corrupted. If you get that error then simply delete the pear.conf file (it should be located in the same folder as php.ini).
Installing Php Pear And Pecl Extensions On Mamp For Mac Free
If you get an error saying that autoconf couldn’t be found, then the additional command line tools probably didn’t get installed correctly. Open up the script you downloaded and enter each line individually into Terminal rather than running the script. IF everything seems ok, try installing again.