type php -m and make sure you have the readline module. If you don't you won't be able to use it.
http://www.php.net/manual/en/features.commandline.interactive.php
As of PHP 5.1.0, the CLI SAPI provides an interactive shell using the
-a option if PHP is compiled with the --with-readline option.