简体   繁体   English

PHP PEAR Mail.php路径问题

[英]PHP PEAR Mail.php path problems

I have a VPS running CentOS 6.5 with Directadmin. 我有一个使用Directadmin运行CentOS 6.5的VPS。 For a client I need the PEAR Mail function to work. 对于客户,我需要PEAR Mail功能才能工作。 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. 我按照此页面上的说明进行操作: http : //pear.php.net/manual/en/installation.checking.php以确保安装正确。 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. 问题是,当我尝试在脚本中要求Mail.php文件时,仍然出现“没有此类文件或目录”错误。 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. 我尝试将system.php嵌入手册的check_pear.php测试中,这工作正常,并且收到te Bool(true)消息。

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. 我发现的是:我的system.php文件位于/ usr / local / lib / php中,而Mail.php位于/ usr / share / pear / Mail中。

I looked at the include path in phpinfo, this is pointing to /usr/local/lib/php. 我看了phpinfo中的include路径,它指向/ usr / local / lib / php。 What is wrong? 怎么了? Do I need to add the /usr/share/pear path to include_path in php.ini? 我是否需要将/ usr / share / pear路径添加到php.ini中的include_path?

Mail.php should be in the same directory as System.php . Mail.php应在同一目录System.php Somehow your setup is wrong. 以某种方式您的设置是错误的。

How did you install the mail package? 您是如何安装邮件软件包的?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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