Add to documentation: need to activate PHP Client module for web servers

When building Aerospike PHP client on Linux (In my case, Ubuntu Server 14.04), we’re prompted to write an aerospike.ini file to load the module and save it in the /etc/php5/cli/conf.d/ directory.

Then, we’re supposed to check the module is being successfully loaded by calling php -m | grep “aerospike”, which works, since we’re using the command line interface to make this check.

Now, it might seem obvious for many, and not even worth being mentioned in the manual, but if you’re hosting a web server and you want that web server to use Aerospike, you need to activate the module for this interpreter, too.

That is to say, if you have an Apache server, you need to copy you aerospike.ini file in /etc/php5/apache2/conf.d/ and restart Apache… If you’re using Nginx, I think the config file is in /etc/php5/fpm/conf.d/

I’ve seen other people struggling with this issue there : whether supports Alpine? · Issue #24 · aerospike-community/aerospike-client-php · GitHub so I think maybe this should be added to the installation manual…

I concur, though if you develop in PHP this cannot be the first time you run into the giant pain of PHP’s configuration file, the possibility for having multiples of it (or none), and different extension directories. We will try to make it easier, but the problem is essentially there by design for nearly 20 years.

Anyway, I added this to the task list. Thanks for the reminder.

1 Like

Part of the repo’s Installing the Extension section. It will be added to our site’s doc, as well.