I am getting the following error whenever I run certain drush commands, however, the CiviCRM seems to be working fine. I have ensured that my my.conf file is set to max_allowed_packets = 500M
.
An example of drush commands that throw the error follow. Note, I am in the Drupal root, and all commands that generate the error do work unless they are designed to print information into the terminal that I need:
drush fl
drush cc all
drush en some_module
An example of drush commands that do work:
drush pm-list
drush pm-info some_module
drush dl some_module
<p>Initialization Error</p><p><pre>Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => simpleHandler
)
[code] => -24
[message] => DB Error: connect failed
[mode] => 16
[debug_info] => [nativecode=No such file or directory]
[type] => DB_Error
[user_info] => [nativecode=No such file or directory]
[to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=No such file or directory]"]
)
</pre></p><p></p><p>Initialization Error</p><p><pre>Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => simpleHandler
)
[code] => -24
[message] => DB Error: connect failed
[mode] => 16
[debug_info] => [nativecode=No such file or directory]
[type] => DB_Error
[user_info] => [nativecode=No such file or directory]
[to_string] => [db_error: message="DB Error: connect failed" code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info=" [nativecode=No such file or directory]"]
)
</pre></p><p></p>Drush command terminated abnormally due to an unrecoverable error.
My production and test environments do not throw this error, only the local ones.
Here is a drush status. If this is a Drupal issue and not a CiviCRM issue, I can move it to Drupal but the error is distinctly about the CRM.
Drupal version : 7.54
Site URI : http://default
Database driver : mysql
Database hostname : 127.0.0.1
Database port :
Database username : myuser
Database name : drupal
Database : Connected
Drupal bootstrap : Successful
Drupal user :
Default theme : glazed
Administration theme : myadmintheme
PHP executable : /usr/local/bin/php
PHP configuration : /usr/local/etc/php/7.1/php.ini
PHP OS : Darwin
Drush script : /usr/local/Cellar/drush/8.1.15/libexec/drush.php
Drush version : 8.1.15
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Install profile : cms
Drupal root : /Applications/AMPPS/www/myproject/docroot
Drupal Settings File : sites/default/settings.php
Site path : sites/default
File directory path : sites/default/files/
Private file directory path : ../files-private
Temporary file directory path : /tmp
This is installed locally on a Mac OSX 10.12.5, Drupal 7.54 running with AMPPS.
Edit: AMPPS runs on TCP port 80 by default. I've tried changing the base URL in civicrm.settings.php to http://localhost:80/[myprojectroot]
to no avail.