I'm trying to get to grips with the API. I've no experience of JSON-RPC, so I'm starting entirely from scratch

I'm using the JSON-RPC PHP client. I have a little test file that has the following code:

PHP Code:
<?
include ('jsonRPCClient.php');
try {
    $o = new jsonRPCClient('http://10.2.3.4/zabbix/api_jsonrpc.php');

    $a = $o->exec ("{'jsonrpc': '2.0',
    'method': 'user.authenticate',
    'params': {'user': 'admin', 'password': 'my_password'},
    'id': 1
    }");

    print_r ($a);
} catch (Exception $e) {
    echo nl2br($e->getMessage()).'<br />'."\n";
}
?>
When I view the page, I see:

HTML Code:
Incorrect response id (request id: 1, response id: )
The Apache logs contain the following:

Code:
[Thu Dec 17 11:47:17 2009] [error] [client 10.254.3.119] PHP Warning:  Cannot use a scalar value as an array in /var/www/html/zabbix/api/rpc/class.cjsonrpc.php on line 99
[Thu Dec 17 11:47:17 2009] [error] [client 10.0.64.34] PHP Notice:  Undefined index:  id in /var/www/html/jsonRPCClient.php on line 151
[Thu Dec 17 11:47:17 2009] [error] [client 10.0.64.34] PHP Notice:  Undefined index:  id in /var/www/html/jsonRPCClient.php on line 152
Can anyone tell me where I'm going wrong? How do I authenticate my user?

Russ