1

Today I upgraded from CiviCRM on WordPress, from 4.7.5 up to 4.7.9.

I can't say if the problem started with the upgrade, or not. As it is a test installation I abandoned some months ago. I am now picking it back up, to further develop it for the non-profit that's looking at using it.

The Issue...

The dashboard does not load the two dashlets that are on it. Sometimes one might load, usually not. It's like it hangs. It can cause the server to go into a spin, resulting in 500 Server Errors when I try to refresh the page or perhaps even when accessing another admin page of WordPress.

Things tried so far..

I've read numerous posts about this issue (at least, a matching description of it) but found no confirmed solutions.

I tried some of the suggestions on this post: CiviCRM Dashboard Hangs for 5+ minutes

Namely...

  1. Add your IP and domain to /etc/hosts file

  2. Check if your firewall is blocking any AJAX calls

  3. Check if any .htaccess file in any of the directories (mainly wp-admin directory) is blocking the AJAX call

I am assuming the /etc/hosts is referring to my local computer? Not sure. As for the firewall... I assume that's referring to the firewall on the server Civi is on? It's a shared hosting environment, so how would I check that?

As for the .htaccess files. That's one thing I was able to act on. I found no .htaccess files that were blocking directories.

I also tried these suggestions... (found here)

  1. Check the civicrm log in /../uploads/civicrm/ConfigAndLog or /../plugins/files/civicrm/ConfigAndLog

  2. Check the error_log. phpinfo() will tell you where it is.

The only thing in the log is the entries for the update I just performed.

PHP error_log

I did find errors in the error_log file in the /wp-admin/ folder. Those errors are:

[17-Jul-2016 02:55:59 UTC] PHP Warning:  include_once(/home/sewaluna/public_html/wp-content/plugins/civicrm/includes/civicrm.users.php): failed to open stream: No such file or directory in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm.php on line 422
[17-Jul-2016 02:55:59 UTC] PHP Warning:  include_once(): Failed opening '/home/sewaluna/public_html/wp-content/plugins/civicrm/includes/civicrm.users.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm.php on line 422
[17-Jul-2016 02:55:59 UTC] PHP Fatal error:  Class 'CiviCRM_For_WordPress_Users' not found in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm.php on line 423
[17-Jul-2016 23:07:36 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756
Stack trace:
#0 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(199): PEAR->loadExtension('mysql')
#1 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(564): DB_mysql->connect(Array, false)
#2 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2308): DB::connect('mysql://sewalun...')
#3 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(378): DB_DataObject->_connect()
#4 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#5 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1268): CRM_Core_DAO->__construct()
#6 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(114): CRM_Core_DAO::executeQuery('SET NAMES utf8')
#7 /home/sewaluna/public in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 756
[17-Jul-2016 23:07:40 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756
Stack trace:
#0 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(199): PEAR->loadExtension('mysql')
#1 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(564): DB_mysql->connect(Array, false)
#2 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2308): DB::connect('mysql://sewalun...')
#3 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(378): DB_DataObject->_connect()
#4 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#5 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1268): CRM_Core_DAO->__construct()
#6 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(114): CRM_Core_DAO::executeQuery('SET NAMES utf8')
#7 /home/sewaluna/public in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 756
[17-Jul-2016 23:07:42 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756
Stack trace:
#0 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(199): PEAR->loadExtension('mysql')
#1 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(564): DB_mysql->connect(Array, false)
#2 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2308): DB::connect('mysql://sewalun...')
#3 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(378): DB_DataObject->_connect()
#4 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#5 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1268): CRM_Core_DAO->__construct()
#6 /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(114): CRM_Core_DAO::executeQuery('SET NAMES utf8')
#7 /home/sewaluna/public in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php on line 756

Are these indicating a potential cause of this issue?

PHP Version

I have also tried different versions of PHP (something my host suggested). Was originally on v5.6.23, then changed to v5.5.37. Same effect occurred on both. I also tried v5.4.45 and 7.x. Same issue. So I think it's fairly safe to say it's not a PHP version related issue.

PHP Modules

I can select which PHP modules load into PHP. Are there any selected that shouldn't be, or not selected that should be? See this image...

enter image description here

Which dashlets

The dashlets configured to load are Activities, and Latest News.

System Error

I should add that I see the following in the footer: Powered by CiviCRM 4.7.9. System Status: Error

When I click on System Status:Error in the footer it takes me to admin.php?page=CiviCRM&q=civicrm%2Fa%2F#/status and no information is present there.

It just looks like this: enter image description here

What next?

Q1) Are the above errors indicating the cause of this issue? If so, can you suggest what I do about it?

Q2) If Q1 above is not the issue/solution, does anyone have any other suggestions on how to resolve this? It seems to be common enough that it suggests to me this is a bug or issue in the way CiviCRM is going about things, rather than something specific to me and my situation.

Thanks,

Jonathan

2

I once had a similar symptom of dashlets frequently hanging. In my case it was caused by using PHP in PHP-FPM mode with pm.max_children set to a value less than 4. I was running on a VPS so I had total control of these settings. On a shared server, you might not have control of this so you might want to ask your hosting provider.

Why this symptom would appear for you only after a Civi upgrade is not clear, however.

  • Thanks BobS. I can't be absolutely sure it only occurred after an update. What's certain is that I updated and then noticed it significantly. But, in reality, I installed CiviCRM on this particular site late last year, but didn’t put time into configuring it fully at that time. It was after this update that I started to work on it, and noticed the dashboard was not functioning. – inspirednz Jul 19 '16 at 20:55
1

Ignore my previous answer! @BobS points out that the timestamps don't quite line up.

However, I'm now focusing on the correct error:

Uncaught Error: Call to undefined function dl() in /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php:756

That suggests this: Call to undefined function dl() error w/Joomla 3.5.1 & PHP 7

Since you've already stated your PHP version - it may be worth checking with your webhost to see if there's a different PHP version for CLI commands. That may be causing your issues. If you can log into the server via SSH, running php --version should also answer whether the CLI is running PHP7.

  • Thanks Jon G. I'll ask the host about that. The result from php --version over SSH is (minus numerous copyright statements), PHP 5.6.23 (cli) (built: Jun 24 2016 07:07:36) Zend Engine v2.6.0, with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, . with Zend OPcache v7.0.4-dev, with Zend Guard Loader v3.3, . I gather from this php CLI is on 5.6.23 – inspirednz Jul 19 '16 at 21:01
1

Sorry to leave another answer - but the previous answer is likely to be accurate in some cases, just not yours!

I decided to dig into the code a little bit to see what's going on. This function loadExtension that has the troublesome code IS tied to your PHP modules. It's intended to load any modules that you didn't enable, but CiviCRM needs, using the dl function.

However, the dl function is deprecated in newer versions of PHP, and removed in PHP7 - hence the answer above. It still doesn't work in PHP 5.4-5.6 in most cases (see here). PEAR (the CiviCRM package with this code) handles this with the "STFU operator", so you don't normally get an error. You're still seeing an error - not sure why. Oh well.

To fix this: This code ONLY fires if the needed PHP module isn't loaded. So if we figure out which missing module is causing this code to fire, we can check it off on that control panel you screenshotted above.

To figure this out, I'd recommend the following:

  • Open up /home/sewaluna/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php.
  • Find line 756, which reads: return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
  • Just ABOVE that line, enter this code and save the file: CRM_Core_Error::debug_var('missing module', $ext);
  • Reload the page that causes that stack trace to appear.
  • Search your log for the words "missing module". The module should be listed on that line!
  • Enable that module in your PHP control panel checklist. You may need to do this 2-3 times if you have multiple modules missing.
  • Thanks Jon. I had to put this on hold for a few days. Will implement this debug shortly, and post the results. – inspirednz Jul 26 '16 at 2:12

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.