1

i tried to use cassandra php driver

after i follow installation steps, i have an error:

Fatal error: Class 'Cassandra' not found in /var/www/web/xx/yy.php.....

Cassandra module seems with php -m

php -m command result

But in phpinfo, it does not seem as a module.

what should i do to fix it ?

notes: op system : ubuntu, php version : 5.5, cassandra.so file exits is right path, php.ini file is updated with cassandra.so file path. php5-fpm restarted

mst
  • 466
  • 5
  • 17

1 Answers1

1

On typical installations there are separate php configuration files for CLI and http module. So it might be that it is only enabled for CLI mode (which you use with the output of php -m), whilst it is not loaded when php is used as module inside your http server.

You want to check the configuration file php.ini. The call to phpinfo(); will show you the path which configuration file is loaded.

arkascha
  • 41,620
  • 7
  • 58
  • 90
  • thank you very much, there is different php.ini files. one of them located at /etc/php5/fpm/php.ini, the other is /etc/php5/cli/php.ini. after update the file under the cli folder it is working now. – mst Aug 08 '15 at 12:16