Running Civicrm v4.7.14 on Wordpress v4.7 PHP v 5.6.29
For the last couple of weeks, I've been getting the following PHP warning emails, mostly hourly, from my host's server, after the CRON runs with cli.php. All permissions are set correctly in root /httpdocs /wp-content /plugins /civicrm /civicrm /bin/cli.php.
My host has investigated the email setup but found no problems.
Everything else with CRON is working normally and all scheduled jobs are being executed as far as I can tell, with the exception of mail_report where error message is "Finished execution of Mail Reports with result: Failure, Error message: A fatal error was triggered: is not of type String". I'm not sure whether this has any relevance and it would appear that this message was being received prior to when the PHP warnings started.
Mail() is used (rather than SMTP).
The PHP warning messages are as follows: PHP Warning: scandir(INBOX/cur): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(INBOX/new): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(INBOX/cur): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(INBOX/new): failed to open dir: No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Mailing/MailStore/Maildir.php on line 85
Lines 85 to 89 in the Maildir.php file shows: foreach (scandir($dir) as $file) { if ($file == '.' or $file == '..') { continue; } $path = $dir . DIRECTORY_SEPARATOR . $file;
I'm not sure whether I have any missing core files and any help to find out the cause of these warning messages would be greatly appreciated.