The php that run on the webserver and the CLI version is not using the same php.ini file. If I do a command php --ini, it show this
php --ini
By specifying environment variable PHPRC to point to the same php.ini as the one Apache uses worked for me on Ubuntu
export PHPRC=/etc/php5/apache2/php.ini
Or put it in the $HOME/.bashrc to import every time cli is started