0
votes

I'm running PHP 5.5.22 via MAMP (pro) on OSX 10.10.4 and I just want to use PHP to work with Cassandra (running locally).

Datastax seems to be the big boys of the Cassandra world. So I'm assuming I need to install this driver: https://github.com/datastax/php-driver/ via these instructions: https://github.com/datastax/php-driver/blob/master/ext/README.md but they make no sense to me.

How can I get my cassandra.so module loaded?

1

1 Answers

3
votes

Ok, got to it like this:

First I had to get my php on MAMP to be configured with the appropriate php source which does not ship with MAMP

  1. I changed to the latest PHP version on MAMP, for me 5.6.10, also changed my PATH variables to the new bin for php: /Applications/MAMP/bin/php/php5.6.10/bin/
  2. Downloaded the php 5.6.10 source, extracted it and renamed the folder to just ‘php
  3. Navigated to /Applications/MAMP/bin/php/php5.6.10 and created a directory called ‘include’ - copied the downloaded php folder in there
  4. cd /Applications/MAMP/bin/php/php5.6.10/include/php and ran ./configure

Then followed the instructions here: https://github.com/datastax/php-driver/blob/master/ext/README.md

  1. In terminal, ran: brew install libuv cmake gmp
  2. In a directory where in makes sense, run :

git clone https://github.com/datastax/php-driver.git cd php-driver git submodule update --init cd ext ./install.sh phpize ./configure make install

Then edited the php.ini to add in: extension=cassandra.so