Skip to content

Commit fcb8822

Browse files
authored
Merge pull request #862 from ExpressionEngine/feature/7.x/cli-troubleshooting
Added CLI error troubleshooting
2 parents e029ddc + 16f922c commit fcb8822

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/troubleshooting/error-messages.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@ This error happens when ExpressionEngine tries to save content with an emoji to
109109

110110
This happens when the query has a syntax error. However, if you can't see an obvious syntax error and the query runs in other environments, it may be a server configuration issue. Make certain MySQL is not running with [ANSI_QUOTES](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes) on.
111111

112+
## PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002]
113+
114+
This may happen when attempting to use the CLI when the ExpressionEngine intallation is running on [MAMP](https://www.mamp.info/).
115+
116+
### Troubleshooting
117+
118+
Check following configuration values in config.php: hostname, port. Hostname may need to be ```127.0.0.1``` instead of ``localhost`` and the port may differ from the default 3306. You can check the port used in the MAMP MySQL settings. For example:
119+
120+
```php
121+
$config['database'] = array(
122+
'expressionengine' => array(
123+
'hostname' => '127.0.0.1',
124+
'database' => 'EEdb',
125+
'username' => 'root',
126+
'password' => 'root',
127+
'dbprefix' => 'exp_',
128+
'char_set' => 'utf8mb4',
129+
'dbcollat' => 'utf8mb4_unicode_ci',
130+
'port' => '8889'
131+
)
132+
);
133+
```
134+
112135
## Missing Encryption Keys
113136

114137
ExpressionEngine displays the error: **You do not have value set for \[encryption_key/session_crypt_key\] in your config.php. This may leave your install open to security vulnerabilities. Restore the keys or see this troubleshooting article in the user guide for help.**

0 commit comments

Comments
 (0)