Unable to run CLI command on OS X/MAMP
Permalink 1 user found helpful
I'm trying to use concrete5 from the command line and I'm running into a fatal error. Any idea on how I can solve this ?
concrete/bin/concrete5 list
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [2002] No such file or directory in file /web/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 47
Stack trace:
1. Doctrine\DBAL\Driver\PDOException->() /web/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47
| array(1) {
| [0] =>
| string(48) "SQLSTATE[HY000] [2002] No such file or directory"
| }
2. PDOException->() /web/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
| array(1) {
| [0] =>
| string(48) "SQLSTATE[HY000] [2002] No such file or directory"
| }
concrete/bin/concrete5 list
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [2002] No such file or directory in file /web/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 47
Stack trace:
1. Doctrine\DBAL\Driver\PDOException->() /web/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47
| array(1) {
| [0] =>
| string(48) "SQLSTATE[HY000] [2002] No such file or directory"
| }
2. PDOException->() /web/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
| array(1) {
| [0] =>
| string(48) "SQLSTATE[HY000] [2002] No such file or directory"
| }
Event find resolution to this? I'm running in to this myself.
Getting this error too when trying to follow the cli tutorial from:
http://documentation.concrete5.org/developers/appendix/cli-commands...
mamp | Concrete5.7.5.9 (not running from updates folder)
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [2002] No such file or directory in file /Users/Username/Documents/htdocs/development/concrete5.7/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 47
http://documentation.concrete5.org/developers/appendix/cli-commands...
mamp | Concrete5.7.5.9 (not running from updates folder)
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000] [2002] No such file or directory in file /Users/Username/Documents/htdocs/development/concrete5.7/concrete/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 47
You can change the php path in concrete/bin/concrete5
- php -d short_open_tag=On "${SCRIPT_PATH}/concrete5.php" "$@"
+ /Applications/MAMP/bin/php/php7.0.8/bin/php -d short_open_tag=On "${SCRIPT_PATH}/concrete5.php" "$@"
- php -d short_open_tag=On "${SCRIPT_PATH}/concrete5.php" "$@"
+ /Applications/MAMP/bin/php/php7.0.8/bin/php -d short_open_tag=On "${SCRIPT_PATH}/concrete5.php" "$@"
This seems to work, thanks. A reason this php path is not picked up automatically?
How to adjust this for the v8 version?