You need to update your include path to reference all directories concerned:
include_path='.:/usr/lib/php:/usr/local/lib/php:/home/username/php/'
سؤال
I'm trying to load the Mail
extension on my cloud hosting server, but it's failing as I have dependencies in multiple locations.
Mail
and Net
were installed via cPanel, and they were installed in /home/username/php
.
The spec for Mail
says to require 'Mail.php'
, which would then load it from the include_path
. However, the include_path='.:/usr/lib/php:/usr/local/lib/php
. This is where PEAR.php
is, as well as other stuff I don't know about.
So,
If I use require '/home/username/php/Mail.php
, Mail's dependencies such as Net_SMTP
fail to load.
If I change the include path to /home/username/php
, then PEAR.php
fails to load.
I'd rather not have to modify the Mail.php
to manually include it's dependencies.
المحلول
You need to update your include path to reference all directories concerned:
include_path='.:/usr/lib/php:/usr/local/lib/php:/home/username/php/'