Error reading during creating PAMI client

I have written PHP code (I replaced real username with ‘*’ and real password with ‘?’): include_once 'PAMI/Autoloader/Autoloader.php'; (...) error_reporting(1);error_reporting(E_ERROR | E_PARSE);PAMI\Autoloader\Autoloader::load('log4php\Logger'); PAMI\Autoloader\Autoloader::load('PAMI\Exception\PAMIException'); PAMI\Autoloader\Autoloader::load('PAMI\Client\Exception\ClientException'); PAMI\Autoloader\Autoloader::load('PAMI\Message\Event\Factory\Impl\EventFactoryImpl'); PAMI\Autoloader\Autoloader::load('PAMI\Client\IClient'); PAMI\Autoloader\Autoloader::load('PAMI\Message\Message'); PAMI\Autoloader\Autoloader::load('PAMI\Message\OutgoingMessage'); PAMI\Autoloader\Autoloader::load('PAMI\Message\Action\ActionMessage'); PAMI\Autoloader\Autoloader::load('PAMI\Message\Action\LoginAction'); PAMI\Autoloader\Autoloader::load('PAMI\Client\Impl\ClientImpl'); $options = array( '' => '', 'host' => '', 'scheme' => 'tcp://', 'port' => 5038, 'username' => '*', 'secret' => '?' ); $client = new PAMI\Client\Impl\ClientImpl($options); $client->open();
[size=85]I cannot have included any log4php and PAMI source file except the file of PAMI Autoloader and I cannot have run ‘Autoloader::register()’. When I did this, the script was not loaded further.[/size] [size=65]The script is not standalone.[/size]

I receive ‘Error reading’:[code]DEBUG - ------ Sending: ------
action: Login
actionid: 1393590876.2732
username: *
secret: ?

Error reading[/code]

A list of Asterisk users:[code]kamilszmit-laptop*CLI> sip show users
Username Secret Accountcode Def.Context ACL ForcerPort

  •                      ?                                 home             No   No        [/code]

I try to create listener of Asterisk dials. The version of PHP is 5.5.3, the version of Asterisk is 1.8.20 and system is CentOS Linux 6.5. What causes ‘error reading’? What should I do so that this error does not appear? Could you help me?