php - PEAR on Windows: How to change pear.ini location -
I try to install a peer package on a Windows 7 64-bit in my recent XMP PHP installation (PHP 5.3.1) I am doing
Installing new packages fails because the pear tries to use c: \ windows \ pear.ini
instead of the current c: \ path_to_xampp \ Php \ pear.ini
. This result (right) has permission denied
error as I'm logged on as administrator but enjoys some additional security IIRC in the Windows directory.
Instead of filling with the right to write in the Windows directory, I would like to use the existing pear.ini file.
Does anybody know that according to the behavior of PAR?
Not entirely sure but registered by PAR .... <:
REGEDIT4 [HKEY_CURRENT_USER \ environment] "PHP_PEAR_SYSCONF_DIR" = "\\ webserver \\ XAMPP \\ php D" key in my machine's registry following / pre> and pear / config. Php contains the following piece of code:
if (getenv ('PHP_PEAR_SYSCONF_DIR')) {defined ('PEAR_CONFIG_SYSCONFDIR', getenv ('PHP_PEAR_SYSCONF_DIR'));
and the creator for the config class
the function is PEAR_Config ($ user_file = '', $ system_file = '', $ ftp_file = false, strict $ = True) {$ this-> Peer (); PEAR_Installer_Role :: initializeConfig (this $); $ Sl = DIRECTORY_SEPARATOR; If (empty ($ user_file)) {if (OS_WINDOWS) {$ user_file = PEAR_CONFIG_SYSCONFDIR $ SL 'Pear.ini'; } And {$ user_file = getenv ('HOME'). $ SL '.pearrc'; }}
$ user_file = PEAR_CONFIG_SYSCONFDIR $ SL 'Pear.ini';
It looks like "My" peer installation file uses D: \ webserver \ xampp \ php \ pear.ini. If this is correct then all you have to do is to either change the environment variable PEAR_CONFIG_SYSCONFDIR
Comments
Post a Comment