I m try to load aerospike php api class but got error
Fatal error: Class 'Aerospike' not found
My code looks
<?php
require "vendor/autoload.php";
$config = [
"hosts" => [
[ "addr" => "127.0.0.1", "port" => 3000]
]
];
// The new client will connect and learn the cluster layout
$db = new Aerospike($config);
I m doing composer install and composer update what`s wrong ? If you need more files to show tell me.
In order to use the Aerospike API client for PHP, you have to be able to compile C code and install the compiled extension on your server.
This requires an additional pack of installed packages than enable your machine to compile stuff, and it is way beyond the scope of Composer to provide any of these.
So this package looks innocent, but it is no genuine PHP Composer package. You cannot use it like any other package - all relevant classes like
Aerospike
are injected into PHP via the extension.