Last week I upgraded my PHP to 5.4 on my mac. It was not that bad, but I am starting to pay little by little.
I am using Ratchet for a websocket and for pushing I was using 0MQ.
My composer.json looks
.... "require": "cboden/Ratchet": "0.3.*", "react/zmq": "dev-master" } ...
Then I do composer install, it was complaining zmq is not found in the system.
I had zmq already but it is on the php5.3 default directory. And I can’t use the zmq.so file I compiled b/c i am using 5.4 now.
Here is the fix:
Go and grab the git clone from github
git clone git://github.com/mkoppanen/php-zmq.git
for further ways checkout this
Then do the following
Make sure you run the correct phpize in this case. If you are upgrading from 5.3 and still you have the old version sitting around on your machine, phphize will take the older one by default.
My new php 5.4’s one is in /opt/local/bin/phpize54. So make sure you are running the phpize with the new one.
One easy thing to do would be to symlink the old phpize with the new one like:
sudo ln -s new/phpize/path old/phpize/location/phpize
Backing to the topic,
Then do the configure, being inside the php-zmq folder, as follows
make sure to replace the value of –with-php-config with your proper php-config path
if you don’t have the packageconfig, you will have an error requesting for that and you can install it from macport – if you are using mac as follows:
sudo port install pkgconfig
Just search for pkgconfig for others distros you have and it should not be that difficult ..
once you do that install it by
make && make install
the compiled file should be inside the modules directory.
After this, copy that file into the php executables folder and add extention=zmq.so into your php.ini
Now you can do the composer install and it should install it..