-2

I am starting development of Cassandra databases and I wanted to start using the PHP driver DataStax.

I followed the installation guide https://github.com/datastax/php-driver and it appears to have been installed properly. I want to test my local server xampp and the connection is not being made properly. I am using Ubuntu 14.04 LTS as my development environment.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Luis Ed
  • 1
  • 2
  • Where is your PHP code, what have you done so far, did you check if your cassandra has been installed, have you started with the sample php code. – azngunit81 Mar 17 '16 at 02:20

1 Answers1

1

The specific error message you are getting would be helpful.

Some tips:

  • Make sure you are using Cassandra 2.0 or 2.1
  • Make sure you are connecting to the right ip
  • Make sure you are connecting to the right port

Example code to connect, with ip and port:

$cluster = Cassandra::cluster()
->withContactPoints("$ip")
->withPort(9042)
->build();

$session = $cluster->connect('system');
Reinier
  • 262
  • 3
  • 13