简体   繁体   中英

PHP PEAR Mail.php path problems

I have a VPS running CentOS 6.5 with Directadmin. For a client I need the PEAR Mail function to work. I installed pear and pear Mail. I followed the instructions on this page: http://pear.php.net/manual/en/installation.checking.php to ensure the installation is correct. Which it is.

The problem is I still get a 'no such file or directory' error when I try to require my Mail.php file in a script. I tried to embed system.php in the check_pear.php test from the manual, this is working fine and I get te Bool(true) message.

What I found is this: My system.php file is located in /usr/local/lib/php while the Mail.php is located in /usr/share/pear/Mail.

I looked at the include path in phpinfo, this is pointing to /usr/local/lib/php. What is wrong? Do I need to add the /usr/share/pear path to include_path in php.ini?

Mail.php should be in the same directory as System.php . Somehow your setup is wrong.

How did you install the mail package?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM