简体   繁体   中英

pear installation in wamp

I am running wamp 2.2 on windows 7. when I try to . it shows some mkdir problem. Then I try

pear config-set autodiscover 1


Then I checked my pear.bat file. and I see some warning below,

REM launch pearcmd
GOTO RUN
:PEAR_INSTALL_ERROR
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_INSTALL_ERROR2
ECHO PHP_PEAR_INSTALL_DIR is not set correctly.
ECHO pearcmd.php could not be found there.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_INSTALL_DIR%
GOTO END
:PEAR_BIN_ERROR
ECHO PHP_PEAR_BIN_DIR is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_BIN_DIR%
GOTO END
:PEAR_PHPBIN_ERROR
ECHO PHP_PEAR_PHP_BIN is not set correctly.
ECHO Please fix it using your environment variable or modify
ECHO the default value in pear.bat
ECHO The current value is:
ECHO %PHP_PEAR_PHP_BIN%
GOTO END

The installer is looking for your PEAR directory to be in the environment variable PHP_PEAR_INSTALL_DIR . The instructions provided there say to go set your install directory in pear.bat or to set that environment variable.

"failed to open stream: Permission denied" suggests that it is unable to write due to a lack of write permission. I see that it is attempting to write to the windows folder and you're using windows 7. It is possible that UAC is blocking the write attempt. If you have not tried running the batch file in a command windows with elevated permissions I suggest doing so.

Right click on CMD > Run as Administrator

Execute .bat file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM