1

I am beginning to build a new version of our existing Drupal 7 site locally, which has CiviCRM 4.7.15 installed. I installed a fresh copy of the same version of CiviCRM into a fresh SoopterTheme Drupal 7 demo and the installation was successful, however, when I went to review permission settings or click on configuration check list, I get the following error, site-wide. Drupal and CiviCRM both have their own usernames and databases:

Additional uncaught exception thrown while handling exception.

I have run through this process multiple times and get the same error. I also received this same error when trying to set up a local copy of the existing site.

If I run any drush commands, I get:

Drush command terminated abnormally due to an unrecoverable error.                                                                                       [error]
<p>Initialization Error</p><p><pre>Array
(
    [callback] =&gt; Array
        (
            [0] =&gt; CRM_Core_Error
            [1] =&gt; simpleHandler
        )

    [code] =&gt; -24
    [message] =&gt; DB Error: connect failed
    [mode] =&gt; 16
    [debug_info] =&gt;  [nativecode=No such file or directory]
    [type] =&gt; DB_Error
    [user_info] =&gt;  [nativecode=No such file or directory]
    [to_string] =&gt; [db_error: message=&quot;DB Error: connect failed&quot; code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix=&quot;&quot; info=&quot; [nativecode=No such file or directory]&quot;]
)
</pre></p><p></p><p>Initialization Error</p><p><pre>Array
(
    [callback] =&gt; Array
        (
            [0] =&gt; CRM_Core_Error
            [1] =&gt; simpleHandler
        )

    [code] =&gt; -24
    [message] =&gt; DB Error: connect failed
    [mode] =&gt; 16
    [debug_info] =&gt;  [nativecode=No such file or directory]
    [type] =&gt; DB_Error
    [user_info] =&gt;  [nativecode=No such file or directory]
    [to_string] =&gt; [db_error: message=&quot;DB Error: connect failed&quot; code=-24 mode=callback callback=CRM_Core_Error::simpleHandler prefix=&quot;&quot; info=&quot; [nativecode=No such file or directory]&quot;]
)
</pre></p><p></p> 

Screenshot of Drupal Site After Installing CiviCRM

Any guidance is appreciated.

Edit: I reinstalled using the same database user for Drupal and CiviCRM and it seemed to have worked initially but I am getting the same error again the next time I went to access the site locally.

  • 1
    If installed locally, your max_allowed_packet in your .ini file or my.cnf file could be far too low. Since it's local, I would set it high and forget it. Something like 100M or 500M should do the trick. See stackoverflow.com/questions/7942154/… or drupal.org/node/1014172 – Allen Hutchison Mar 28 '17 at 23:29
  • Thanks! I was just reading the MySQL manual and found that. I only set it to 20M but I'm glad to know it can be much higher. It seemed to have done the trick once I restarted the LAMP stack. – Christia Mar 28 '17 at 23:32
  • 1
    So it's working now? Hooray! – Allen Hutchison Mar 28 '17 at 23:34
  • 1
    This is the correct answer, thanks! I wasn't sure until you confirmed. Much appreciated. – Christia Mar 28 '17 at 23:37
  • You're very welcome! – Allen Hutchison Mar 28 '17 at 23:45
1

If installed locally, your max_allowed_packet in your .ini file or my.cnf file could be too low. Since it's local, I would set it high and forget it. Something like 100M or 500M should do the trick. See https://stackoverflow.com/questions/7942154/mysql-error-2006-mysql-server-has-gone-away or drupal.org/node/1014172

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.