Pear module class not defined

Hi guys, I just installed HTTP_Download using Pear install --alldeps and it was successfully installed. 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 / php". Is there a directory in which I should be included that is part of the pear to make the module work?

Fatal error: Class 'HTTP_Download' not found in /home/collab13/public_html/testing123.php on line 2
+3
source share
2 answers

It looks like your PEAR path is not within the possible paths.

to 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 loading the module, otherwise just add it to your php.ini and restart the server.

+2
source

PEAR php_dir,

 $ pear config-show  | grep php_dir

include_path, , .

+1

Source: https://habr.com/ru/post/1762384/


All Articles