aaelghat
01-15-2007, 04:07 PM
Hi, I'm relatively new to PHP, but I have a PHP file that I installed that leverages PEAR that I'm trying to get to run.
After looking at other posts here, I verified that PEAR is installed by typing "pear list" at a bash prompt (although I do get a Zend error).
# pear list
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so: /usr/local/Zend/lib/ZendExtensionManager.so: cannot open shared object file: No such file or directory
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
HTML_Template_IT 1.1 stable
Net_UserAgent_Detect 2.0.1 stable
PEAR 1.4.9 stable
XML_RPC 1.5.1 stable
I also modified the include_path of the PHP.ini file so that it has the line below (hopefully I got the syntax correct) and copied it to all the sub-directories of public_html.
include_path = ".:/usr/lib/php:/usr/local/lib/php:/usr/lib/php/PEAR" ;
What's happening is that the file that is getting called has the following section to check that PEAR is installed, and I'm getting the following message in my browser as a result, "PHP PEAR must be installed. Visit http://pear.php.net for help with installation."
So what am I missing? Thanks.
// check for PEAR
$include_path = ini_get('include_path');
$buf = split(':|,',$include_path);
$found = 0;
foreach ($buf as $path) {
$path = fixPathSlash($path);
$pear_check_path = $path . "DB.php";
if (is_file($pear_check_path)) {
$found = 1;
break;
}
}
if (!$found) {
echo _("PHP PEAR must be installed. Visit http://pear.php.net for help with installation.");
exit();
}
}
After looking at other posts here, I verified that PEAR is installed by typing "pear list" at a bash prompt (although I do get a Zend error).
# pear list
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so: /usr/local/Zend/lib/ZendExtensionManager.so: cannot open shared object file: No such file or directory
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
HTML_Template_IT 1.1 stable
Net_UserAgent_Detect 2.0.1 stable
PEAR 1.4.9 stable
XML_RPC 1.5.1 stable
I also modified the include_path of the PHP.ini file so that it has the line below (hopefully I got the syntax correct) and copied it to all the sub-directories of public_html.
include_path = ".:/usr/lib/php:/usr/local/lib/php:/usr/lib/php/PEAR" ;
What's happening is that the file that is getting called has the following section to check that PEAR is installed, and I'm getting the following message in my browser as a result, "PHP PEAR must be installed. Visit http://pear.php.net for help with installation."
So what am I missing? Thanks.
// check for PEAR
$include_path = ini_get('include_path');
$buf = split(':|,',$include_path);
$found = 0;
foreach ($buf as $path) {
$path = fixPathSlash($path);
$pear_check_path = $path . "DB.php";
if (is_file($pear_check_path)) {
$found = 1;
break;
}
}
if (!$found) {
echo _("PHP PEAR must be installed. Visit http://pear.php.net for help with installation.");
exit();
}
}