I am trying to install a PEAR package into my recent XAMPP PHP installation (PHP 5.3.1) on Windows 7 64-bit.
Installing new packages fails because PEAR tries to access c:\windows\pear.ini instead of the existing c:\path_to_xampp\php\pear.ini. This results (rightly) in a permission denied error. I am logged on as Administrator, but the Windows directory enjoys some additional protection IIRC.
Rather than fiddle with write rights in the windows directory, I would like to use the existing pear.ini file.
Does anybody know where to change PEAR’s behaviour accordingly?
Not entirely sure but PEAR registered the following keys in the registry of my machine
And PEAR/Config.php contains the following code snippet:
and the constructor for the Config class
$user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini';seems to be the line that makes “my” PEAR installation use the file D:\webserver\xampp\php\pear.ini.If that’s correct all you have to do is to somehow set the environment variable
PEAR_CONFIG_SYSCONFDIR