1
votes

I am new to php and drupal.After i successfully installed pear and dependency files of pear i got error in log/error.log like as below

PHP Fatal error:require_once():Failed opening required '/usr/share/php/Mail.php'(include_path='.:/usr/share/php:/usr/share/pear') in /home/user/public_html/domainname.com/public/sites/all/modules/modulename/ modulename.module on line 93, referer: http://domainname.com/

in my module these lines are

require_once "/usr/share/php/Mail.php";

require_once "/usr/share/php/Mail/mime.php";

i searched the files Mail.php and Mail/mime.php where these are installed by locate mail.php and locate mime.php

locate mime.php

/usr/share/php/Mail/mime.php

locate mail.php

/usr/share/php/Mail/mail.php

/usr/share/php/Mail/sendmail.php

i googled then i changed php.ini file. in this file(php.ini) ;UNIX: "/path1:/path2"

;include_path = ".:/usr/share/php:/usr/share/pear

again it shows same error. what is the problem? what i want change? can any one help me from this

1
i think that /usr/share/php/Mail/mail.php differs from /usr/share/php/Mail.php. set proper paths in php file. - Anton F
tthanks your approach.but till i am not getting answer - Sankar N

1 Answers

0
votes

Mail and Mail_mime are two different packages, so it might be that you have Mail_mime installed, but not Mail.

Install the mail package as root:

$ pear install mail