PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

[FIXED] Why $pear->packageExists() returns always false on installed package?

 August 31, 2022     iis, pear, php, php-5.3, windows     No comments   

Issue

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

pear install Mail

everything seems to be ok, but checking for this package programmatically:

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

always fails for me (false).

Could someone give me any advice?

If I try to install Mail once again, I am getting:

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

My include_path settings:

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

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

Reinstall Mail didn't help


Solution

I think you're using the wrong registry file.

Try to pass the PEAR installation directory as first parameter to the PEAR_Registry constructor. It's the directory in which the .registry directory exists, e.g. /usr/share/php/.



Answered By - cweiske
Answer Checked By - Willingham (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing