campaign page failure/imapfactory

We’ve just moved our SuiteCRM install to a new machine and are stuck with a problem that the Campaign “Set up Email” page (and other related campaign pages) is blank. The Apache server throws the following error which certainly looks like the culprit to me:

PHP Fatal error: Uncaught Error: Class ‘ImapHandlerFactory’ not found in /var/www/html/crm/modules/Campaigns/WizardEmailSetup.php:182
Stack trace:
#0 /var/www/html/crm/include/MVC/View/SugarView.php(832): include_once()
#1 /var/www/html/crm/modules/Campaigns/views/view.classic.php(78): SugarView->includeClassicFile(‘modules/Campaig…’)
#2 /var/www/html/crm/include/MVC/View/SugarView.php(226): CampaignsViewClassic->display()
#3 /var/www/html/crm/include/MVC/Controller/SugarController.php(432): SugarView->process()
#4 /var/www/html/crm/include/MVC/Controller/SugarController.php(375): SugarController->processView()
#5 /var/www/html/crm/include/MVC/SugarApplication.php(109): SugarController->execute()
#6 /var/www/html/crm/index.php(52): SugarApplication->execute()
#7 {main}
thrown in /var/www/html/crm/modules/Campaigns/WizardEmailSetup.php on line 182, referer: XXXXXXXX

The ImapHandlerFactory module certainly appears to exist however, in exactly the same place it was in the old installation:

[ ]$ ls -l /var/www/html/crm/include/Imap*
-rw-r–r--. 1 apache apache 2658 Jan 20 23:27 /var/www/html/crm/include/ImapInterface.php
-rw-r–r--. 1 apache apache 3013 Jan 20 23:27 /var/www/html/crm/include/Imap.php

total 100
-rw-r–r--. 1 apache apache 2358 Jan 20 23:27 ImapHandlerException.php
-rw-r–r--. 1 apache apache 7421 Jan 20 23:27 ImapHandlerFactory.php
-rw-r–r--. 1 apache apache 15609 Jan 20 23:27 ImapHandlerFakeCalls.php
-rw-r–r--. 1 apache apache 7026 Jan 20 23:27 ImapHandlerFakeData.php
-rw-r–r--. 1 apache apache 12715 Jan 20 23:27 ImapHandlerFake.php
-rw-r–r--. 1 apache apache 9269 Jan 20 23:27 ImapHandlerInterface.php
-rw-r–r--. 1 apache apache 22678 Jan 20 23:27 ImapHandler.php
-rw-r–r--. 1 apache apache 5614 Jan 20 23:27 ImapTestSettingsEntryHandler.php
-rw-r–r--. 1 apache apache 2374 Jan 20 23:27 ImapTestSettingsEntry.php

Any ideas on debugging and fixing please?

SuiteCRM 7.11.0
Sugar Version 6.5.25 (Build 344)
CentOS Linux release 7.6.1810 (Core)
Server version: Apache/2.4.6 (CentOS)
PHP 7.0.33 (cli) (built: Jan 9 2019 14:57:19) ( NTS )
mysql Ver 15.1 Distrib 10.3.12-MariaDB, for Linux (x86_64) using readline 5.1

I’ve installed versions:
7.11.0 (as initially reported)
7.10.11 <- bug disappears here

Unfortunately my php skills are not great bu I’ll endeavour to diff my way up the calling stack below between 7.10.11 and 7.11.0 to see if I can identify the cause. Don’t hold your breath.

My best hope is that a dev picks this up.

You probably just need to enable the PHP IMAP module in your php.ini. You basically need to tell your web server to include IMAP support.

Search online for how to do it, if you have trouble.

Then restart your web browser.

If you are on Web hosting, you might have this as an option in CPanel.

Thanks for helping, but phpinfo() shows:


IMAP c-Client Version => 2007f
SSL Support => enabled
Kerberos Support => enabled

which seems ok. Any more ideas?

I just found this is a known issue, and there an easy fix (just add a “require”)

That’s my reported issue :wink: I just tested and the excellent devs have fixed! :woohoo: Thanks all round!