Warning: require_once(Mail.php): failed to open stream

Issue

After upgrading PHP from 5.4.16 to 5.6.36 web pages that contain PEAR mail scripts fail to load with Error 500 (Internal Server Error)

After enabling display_errors in PHP settings following errors were displayed:

Warning: require_once(Mail.php): failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/forms/contact_form.php on line 18

Fatal error: require_once(): Failed opening required ‘Mail.php’ (include_path=’.:/opt/plesk/php/5.6/share/pear’) in /var/www/vhosts/domain.com/httpdocs/forms/contact_form.php on line 18

Resolution

Issue was resolved by adding PEAR install path (/usr/share/pear) to include_path in PHP settings.

 

June 2018
Plesk Onyx 17
CentOS 7
PHP
PEAR Mail


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha
captcha
Reload