zfcampus/zf-oauth2

Error while running console commands

Closed this issue · 1 comments

When I attempt to run console based commands, I get the included error. I have been googling about to see if anyone has experienced something similar but cant seem to find a solution. I have checked my settings and everything appears in order and running normal routes works perfectly.

I am a little stumped as to how to bug test this further.

If I comment out: 'ZF\OAuth2', from application config, the error vanishes.

Any ideas?

Much appreciated.

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in trunk/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Pdo.php:53
Stack trace:
#0 /Applications/MAMP/htdocs/workspaces/trade/trunk/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Pdo.php(53): PDO->__construct('mysql:dbname=on...', 'root', 'root', Array)
#1 /Applications/MAMP/htdocs/workspaces/trade/trunk/vendor/zfcampus/zf-oauth2/src/Adapter/PdoAdapter.php(89): OAuth2\Storage\Pdo->__construct(Array, Array)
#2 /Applications/MAMP/htdocs/workspaces/trade/trunk/vendor/zfcampus/zf-oauth2/src/Factory/PdoAdapterFactory.php(45): ZF\OAuth2\Adapter\PdoAdapter->__construct(Array, Array)
#3 [internal function]: ZF\OAuth2\Factory\PdoAdapterFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'zfoauth2adapter...', 'ZF\OAuth2\Adapt...')
#4 /Applications/MAMP/htdocs/workspaces/trade/trunk/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceM in /Applications/MAMP/htdocs/workspaces/trade/trunk/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 930

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory' in /Applications/MAMP/htdocs/workspaces/trade/trunk/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 930

This should be fixed with the 1.1.2 release of zf-oauth2. You can update using composer update zfcampus/zf-oauth2; if it does not update, try composer require zfcampus/zf-oauth2:^1.1.2.