Pear include path problem

From: Date: Tue, 17 Nov 2009 17:40:22 +0000
Subject: Pear include path problem
Groups: php.general 
Request: Send a blank email to php-general+get-299895@lists.php.net to get a copy of this message
I've got script that uses the pear Mail class and have had problems on some shared hosts with the include path to Mail. E.g., Blue Host insists the site owner must change the php.ini file. I'd rather not expect them to do that. Can you folks critique this approach for me. if(EMAIL_MODE=='smtp'){ $basePath = str_ireplace('public_html', '', $_SERVER['DOCUMENT_ROOT']); set_include_path(get_include_path() . PATH_SEPARATOR . basePath); require_once "$basePath/php" . '/Mail.php'; $smtpStatus=(class_exists('Mail'))?true:false; } Thanks....

« previous php.general (#299895) next »