nrk/predis — Issue #60: ERR operation not permitted with "auth" command
Author: Arculeo
Created: 2012-02-24 21:26:46+00:00
State: open

Hi,

I use authentication on my Redis box and when I try to reach it using `$redis->auth("My passowrd")` it crashes with an Exception

Here is the code to reproduce

```
'1.2.3.4',
'port' => 6379,
'database' => 15));
$result = $redis->auth("my password");
?>
```

And here is the result

> PHP Warning: Uncaught exception 'Predis\ServerException' with message 'ERR operation not permitted' in /usr/share/nginx/www/Core/predis/lib/Predis/Network/StreamConnection.php:257
Stack trace:
> #0 /usr/share/nginx/www/Core/predis/lib/Predis/Network/ConnectionBase.php(142): Predis\Network\StreamConnection->read()
> #1 /usr/share/nginx/www/Core/predis/lib/Predis/Network/StreamConnection.php(160): Predis\Network\ConnectionBase->readResponse(Object(Predis\Commands\ConnectionSelect))
> #2 /usr/share/nginx/www/Core/predis/lib/Predis/Network/StreamConnection.php(135): Predis\Network\StreamConnection->sendInitializationCommands()
> #3 /usr/share/nginx/www/Core/predis/lib/Predis/Network/ConnectionBase.php(197): Predis\Network\StreamConnection->connect()
> #4 /usr/share/nginx/www/Core/predis/lib/Predis/Network/StreamConnection.php(172): Predis\Network\ConnectionBase->getResource()
> #5 /usr/share/nginx/www/Core/predis/lib/Predis/Network/StreamConnection.php(285): Predis\Network\StreamConnection->writeBytes('*2??$4??AUTH??$...')
> #6 /usr/share/ in /usr/share/nginx/www/Core/predis/lib/Predis/Network/StreamConnection.php on line 257

Did I miss something or is there a bug?

My password is long and complicated but even with a password like 12345 the issue is the same.

Thank you.