Aerospike returns error [4] AEROSPIKE_ERR_REQUEST_INVALID for PHPClient

I have a simple script with PHPClient.

But unfortunately, it returns an error: [4] AEROSPIKE_ERR_REQUEST_INVALID.

I checked the doc, and I got this msg: Request protocol invalid, or invalid protocol field. that I still can’t know why.

Anyone help? Thanks

###Here is my code:

$config = [
    "hosts" => [
        ["addr" => "", "port" => 3000]

$db = new Aerospike($config);

if (!$db->isConnected()) {
  echo "Failed to connect to the Aerospike server [{$db->errorno()}]: {$db->error()}\n";
        $key = $db->initKey("test", "Test$i", 3);
        $bins=["name"=>"Test $i"];


        if ($status == Aerospike::OK) {
            echo "Record written. ns=test, key=Test$i, bin=name, value='Test $i'\n";
        } else {
            echo "[{$db->errorno()}] ".$db->error().PHP_EOL;

Additional info: the cli command works as expected.

My bad. I clear all data, it works fine.

Maybe I have some invalid data.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.