Which is:
Fatal error: Undefined class constant ‘OPT_TTL’ in /path/MyClass.class.php on line 285
I don’t have any problem with other constants, just this one… I’m using the PHP client 3.4.10, and the constant is visibly defined in Aerospike’s files (I checked the aerospike_policy.h file to be sure, and it’s in there).
So I thought “Hey, maybe it’s just an issue with the PHP client, and Aerospike works just fine.” (both are up to date, btw), so I tried to replace the Aerospike::OPT_TTL call by its value “OPT_TTL”, and not only it doesn’t work, but the status returned is -2…
Well, that answers at least 1 question, even though it doesn’t solve the problem.
In the meantime, I have replaced my “append” call with a “put” call, which includes a ttl parameter that works.
It’s a lot costlier in terms of resources, though…