Brett
Brett

Reputation: 20069

PEAR Mailer not found? - Failed opening required 'Mail.php'

Ok I have no idea why it can't include this file; I have followed the instructions on this page: http://pear.php.net/manual/en/installation.checking.php

The PEAR install path is: /usr/local/lib/php

My include path is:

include_path = ".:/usr/lib/php:/usr/local/lib/php"

PEAR Mail has been installed from what I can tell - there is a Mail.php in the PEAR install path as well as a mail directory.

I have restarted services after adding the include path; the full error is:

Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/includes/functions.php on line 3290

I am using it on my other server fine, not sure why it's not working here!?

Upvotes: 0

Views: 8719

Answers (2)

Brett
Brett

Reputation: 20069

It was caused by using the suPHP handler; apparently that doesn't work too well with PEAR Mailer.

Upvotes: 1

cweiske
cweiske

Reputation: 31137

So you can confirm that the file /usr/local/lib/php/Mail.php exists? If that's the case, you may have permission problems so that the file is not readable by your web server.

Check the permissions with ls -l:

$ ls -l /usr/local/lib/php|grep Mail
drwxr-xr-x  3 root root   4096 Sep  5  2011 Mail
-rw-r--r--  1 root root   9903 Sep 26  2010 Mail.php

There should be three "r" for Mail.php. If that's not the case, fix it with

$ chmod og+r /usr/local/lib/php/Mail.php

Upvotes: 0

Related Questions