pear module class not defined
I just installed HTTP_Download using Pear install --alldeps, and it installed successfully. However, when I try to use the module, I get. I am using the following php.ini include_path = ".:/usr/lib/php:/usr/local/lib/ph开发者_StackOverflow中文版p". Is there a directory I should be including that is part of pear to get the module to work?
Fatal error: Class 'HTTP_Download' not found in /home/collab13/public_html/testing123.php on line 2
looks like your PEAR Path is not within the includable paths.
try
$paths = explode(PATH_SEPARATOR,get_include_path());
$paths[] = '/path/to/pear';
$path_combined = implode(PATH_SEPARATOR,$paths);
set_include_path($path_combined);
ini_set('include_path',$path_combined);
then try and load the module, otherwise directly append it to your php.ini and restart the server.
Your PEAR packages will get installed to whatever your php_dir setting is as shown in
$ pear config-show | grep php_dir
Change your include_path to include that directory and it should work for you.
精彩评论