Why does $ pear-> packageExists () always return false in an installed package?

I installed Mail ( http://pear.php.net/package/Mail )

pear install Mail 

everything looks fine, but programmatically checking this package:

 $pear = new PEAR_Registry(); $enabled = $pear->packageExists('Mail'); 

always fail for me (false).

Can anyone give me any advice?

If I try to install Mail again, I get:

 pear/Mail is already installed and is the same as the released version 1.2.0 install failed 

My include_path parameters are:

 include_path = ".;C:\Program Files (x86)\IIS Express\PHP\v5.3\pear;" 

The mail package was installed in C: \ Program Files (x86) \ IIS Express \ PHP \ v5.3 \ pear \ Mail dir

Reinstalling mail did not help

+4
source share
1 answer

I think you are using the wrong registry file.

Try passing the PEAR installation directory as the first parameter to the PEAR_Registry constructor. This is the directory in which the .registry directory .registry , for example. /usr/share/php/ .

0
source

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


All Articles