Error: Database connection "Sqlserver" is missing, or could not be created. From Tasks

I have a valid connection with SQL Server, and all controllers are working fine. But when I try to execute a command Task, I recive this error: Error: Database connection “Sqlserver” is missing, or could not be created.

$this->loadModel('Client');
$this->loadModel('User');

    // Repasar los clientes de SAGE que tengan informados datos de WS
    $clients = $this->Client->find('all', array(
        'conditions' => array(
            'Client.wsName <>' => '',
            'Client.wsPassword <>' => '',
            'Client.Email <>' => ''
        )
    ));
...

Cake Trace:

Welcome to CakePHP v2.5.3 Console
---------------------------------------------------------------
App : app
Path: C:\wamp\www\ipd\comerciales\app\
---------------------------------------------------------------
Error: Database connection "Sqlserver" is missing, or could not be created.
#0 C:\wamp\www\ipd\comerciales\lib\Cake\Model\ConnectionManager.php(105): DboSource->__construct(Array)
#1 C:\wamp\www\ipd\comerciales\lib\Cake\Model\Model.php(3498): ConnectionManager::getDataSource('default')
#2 C:\wamp\www\ipd\comerciales\lib\Cake\Model\Model.php(1136): Model->setDataSource('default')
#3 C:\wamp\www\ipd\comerciales\lib\Cake\Model\Model.php(3525): Model->setSource('Clientes')
#4 C:\wamp\www\ipd\comerciales\lib\Cake\Model\Model.php(2921): Model->getDataSource()
#5 C:\wamp\www\ipd\comerciales\lib\Cake\Model\Model.php(2893): Model->_readDataSource('all', Array)
#6 C:\wamp\www\ipd\comerciales\app\Console\Command\Task\ClientsTask.php(27): Model->find('all', Array)
#7 C:\wamp\www\ipd\comerciales\app\Console\Command\ClientsShell.php(10): ClientsTask->execute()
#8 C:\wamp\www\ipd\comerciales\lib\Cake\Console\Shell.php(440): ClientsShell->main()
#9 C:\wamp\www\ipd\comerciales\lib\Cake\Console\ShellDispatcher.php(209): Shell->runCommand(NULL, Array)
#10 C:\wamp\www\ipd\comerciales\lib\Cake\Console\ShellDispatcher.php(66): ShellDispatcher->dispatch()
#11 C:\wamp\www\ipd\comerciales\app\Console\cake.php(47): ShellDispatcher::run(Array)
#12 {main}

I also try upgrade to 2.9.2, but same error.

Sorry. Seems that the IT guy in the client desn’t know the difference between php.ini for command CLI and php ini for Apache. :pensive: