PHP client can't be installed on linux with given procedures

hello guys, i am installing php client on ubuntu 14.04. i m following the same procedures which is mentioned in the steps. finally when i run $make test . All tests fail. plz help me to get out of this problem.

Thanks & regards manjeet kumar

We’ll take it to the related GitHub Issue 24 :wink:

To summarize the problem, PHP often has two configuration php.ini and two conf.d/ subdirectories - one for the CLI and one for the webserver. You can check if your module is loaded using phpinfo()/php -i

First, check that the PHP interpreter on your PATH is working and loading the module.

php -m | grep aerospike #this should output 'aerospike'
which php
php -i | grep _SERVER | grep _  # confirm this is the same as the path above

The info variable _SERVER[“_”] shows the path of the executing script.

If your CLI does not seem to have the aerospike module, you need to modify its php.ini according to the instructions at the end of your run.

if your script is executing in a webserver context it will be calling a different interpreter. The command line one (CLI) has its own config file, and the one used by the webserver is different. For example if it’s an Apache (Prefork MPM) with mod_php, or if it’s Nginx using PHP-FPM.

Look inside /etc/php5 (or wherever your configurations live) - there’s cli in there, but usually also different subdirectories. Make sure the config block loading the aerospike module is in both versions. ls /etc/php5?

Finally, get familiar with the client. Take a look at the PHP documentation on the Aerospike site, specifically the Quick Guide. Next, run some of the examples. Finally, the GitHub repository includes the API documentation.

1 Like