ʲôÊÇPEAR£¿
PEARÊÇPHPÀ(C)Õ¹ÓeÓ¦Óÿa(the PHP Extension and Application Repository)µÄËoд¡£ËuÊÇÒ»¸oPHPÀ(C)Õ¹¼°Ó¦ÓõÄÒ»¸o´uÂe²Ö¿a£¬¼oµ¥µØ˵£¬PEARÖ®ÓÚPHP¾ÍÏñÊÇCPAN(Comprehensive Perl Archive Network)Ö®ÓÚPerl¡£
Óɴ˿ɼuPEARÊÇPHP´uÂeµÄ²Ö¿a£¬ÔÚÕaÀi¿ÉÒÔÕÒµ½ºÜ¶aÓÐÓõĴuÂe£¬±ÜÃaÎÒÃÇÖظ´Ð´Ò»Ð(C)¹¦ÄÜ£¬µ«ÊÇPEAR´uÂe°u²¢²»ÊÇÖ±½Óͨ¹ýHTTPÍøÕ¾ÏÂÔصģ¬ÎÒÃÇÐeÒª°²×°PEAR¡£
ÈçºÎ»ñÈ¡²¢°²×°PEAR
½¨Òe£ºÏÂÃae²Ù×÷ÔÚWindows 7»¾³ÏÂÍe³É£¬Í¬ÑuÊÊÓÃÓÚWindows XP/2003/Vista/2008ϵͳ£¬²¿Ö²Ù×÷´øÓг¢ÊÔÐÔ£¬ÎªÁ˱ÜÃaÍaÂ*£¬½¨ÒeÏÈ¿´Íe±¾ÎÄ£¬È»ºoÔÙ½øÐÐÏa¹Ø²Ù×÷¡£
Èç¹uPHPĿ¼ÏÂûÓÐ×Ô´øPEAR£¬¼´ÕÒ²»µ½go-pear.phpÎļþ£¬ÄÇô¾ÍÐeÒªÎÒÃÇÊÖ¶¯ÏÂÔØgo-pear.phpÎļþ£¬µa»÷ÕaÀiÏÂÔز¢Ái´aeΪgo-pear.php£¬Õa¸oÎļþ*ŵ½php.exeËuÔÚµÄPHP°²×°Ä¿Â¼Ï£¬ÎÒÕaÀi°²×°Ä¿Â¼ÊÇD:\php5£¨ÏÂÎÄÒÔ´ËĿ¼Ϊ׼£(C)£¬ÄÇôgo-pear.phpµÄλÖÃÓ¦¸ÃÊÇD:\php5\go-pear.php¡£
¿ªÊ¼ ¨C ÔËÐУ¬ÊaÈecmd£¬Æo¶¯ÃuÁiÌaʾ*u£¬ÊaÈeÒÔÏÂÃuÁi£¬Ö÷ÒªÊÇÇл»µ½go-pear.phpĿ¼Ï£¬È»ºoÖ´ÐÐÕa¸oPHP½Å±¾Îļþ£º
cd D:\php5
D:
php go-pear.php
Òź¶µÄÊÇ¿ÉÄÜÓÉÓÚÎÒµÄPHP°ae±¾Ì«Ð£¬ÉÏÊo²Ù×÷Ìaʾʧ°Ü£¬¾ßÌaµÄÐÅÏ¢ÈçÏ£º
Deprecated: Assigning the return value of new by reference is deprecated in D:\php5\go-pear.php on line 733
Sorry! Your PHP version is too new (5.3.8) for this go-pear.
Instead use http://pear.php.net/go-pear.phar for a more stable and current version of go-pear, more suited to your PHP version.
Thank you for your coopertion and sorry for the inconvenience!
Òa˼ÊÇÒªÇoÎÒÃǵ½http://pear.php.net/go-pear.pharÏÂÔØgo-pear.pharÎļþ£¬È»ºoÈ¡´ugo-pear.phpÔÙÊÔ¡£ÏÂÔغÃgo-pear.pharÎļþ²¢*ŵ½D:\php5Îļþ¼ÐÖУ¬Ö´ÐÐÏÂÃaeµÄÃuÁi£º
cd D:\php5
D:
php go-pear.phar
Õaʱ³oÏÖ£º
Are you installing a system-wide PEAR or a local copy?
**(system|local) [system] :
**°´»Ø³µÄ¬ÈÏsystemÈ»ºo¼ÌÐø¡£ÒÔÏÂÊÇĬÈϵÄpearµÄÁÙʱ¡¢Êý¾Ý¡¢ÅaÖᢲaÊÔ¡¢Ö´ÐÐĿ¼µÄÉeÖãº
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : D:\php5
2. Temporary directory for processing : D:\php5\tmp
3. Temporary directory for downloads : D:\php5\tmp
4. Binaries directory : D:\php5
5. PHP code directory ($php_dir) : D:\php5\pear
6. Documentation directory : D:\php5\docs
7. Data directory : D:\php5\data
8. User-modifiable configuration files directory : D:\php5\cfg
9. Public Web Files directory : D:\php5\www
10. Tests directory : D:\php5\tests
11. Name of configuration file : C:\Windows\pear.ini
12. Path to CLI php.exe : D:\php5
1-12, 'all' or Enter to continue:
Ö±½Ó»Ø³µÊ¹ÓÃĬÈÏֵȻºo¼ÌÐø°²×°¡£±¾À´ÒÔΪÍoÊ´o¼ªµÄ£¬¿ÉÊÇÆ«Æ«ÔÚÕaÀi³oÏÖÁË´iÎo£º
Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ¡®UTC' for '8.0/no DST' instead in phar://D:/php5/go-pear.phar/PEAR/Registry.php on line 1012
PEAR_Config::writeConfigFile fopen(¡®C:\Windows\pear.ini','w') failed (fopen(C:\Windows\pear.ini): failed to open stream: Permission denied)
¿´Ñu×ÓÊÇûÓÐȨÏÞдÈeC:\Windows\pear.ini£¬ÓÉÓÚÎÒʹÓõÄÊÇWindows 7ϵͳ£¬È»ºoÆÕͨÓû§´o¿ªµÄÃuÁiÌaʾ*u£¬ÔÚÕaÀiµ±È»Ã»ÓÐȨÏÞдÈeC:\WindowsĿ¼ÁË£¬¿´À´ÒªÁi±Ùoe¾¶ÁË¡£»Øµ½¸Õ²ÅAre you installing a system-wide PEAR or a local copy?Õa¶Î£¬ÎªÊ²Ã´²»Ñ¡Ôñlocal copyÄØ£¿ÍøÉ϶¼ÊÇÖ±½Ó˵ĬÈϻسµÑ¡ÔñsystemµÄ£¬²»Ïe¸ÄдC:\WindowsĿ¼£¬ÓÚÊÇÎÒÖØÐÂÖ´ÐÐphp go-pear.phar£¬²¢ÇÒÑ¡Ôñlocal¡£
Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : local
Please confirm local copy by typing 'yes' : yes
ºÃÁË£¬ÕaÏÂÕý³£ÁË:-)
Would you like to alter php.ini <D:\php5\php.ini>? [Y/n] :
È»ºo¾ÍÊÇÉÏÃaeÕa¾a£¬Ö»ÓÐÑ¡ÔñYͬÒaÐÞ¸Äphp.ini¡£
php.ini <D:\php5\php.ini> include_path updated.
Current include path : .;C:\php\pear
Configured directory : D:\php5\pear
Currently used php.ini (guess) : D:\php5\php.ini
Press Enter to continue:
½Ó×ųoÏÖÉÏÃaeÕa¶Î£¬¿´À´Ã»ÓÐʲôºÃ¸ÄµÄ£¬Ö±½Ó»Ø³µÈ*Èϼ´¿É¡£
µ½ÕaÀiÓ¦¸ÃÄÜ¿´µ½Thanks for using go-pear!Õa¾aÁË£¬ÄÇô¹§Ï²Äa£¬PEAR×ÜËaÊÇ°²×°³É¹¦ÁË£¡
ÈçºÎ°²×°PEAR Package°u
½ÓÏÂÀ´ÈÃÎÒÃÇÈ¥PEARÍøÕ¾ÉÏ¿´¿´ÓÐʲôÐeÒªµÄ°É¡£PEARÿ¸o°u¶¼Óа²×°ÃuÁiµÄÌaʾ£¬±ÈÈç˵MDB2Õa¸o°u£¬ÉÏÃaeÒѾÌaʾʹÓÃpear install MDB2ÃuÁi°²×°ÁË£¬¼ÙÉeĿ¼»¹ÊÇD:\php5£¬ÄÇôÎÒÃÇÀuÓÃÏÂÃaeµÄÃuÁiÊÔÊÔ£º
cd D:\php5
D:
pear install MDB2
½a¹u³oÏÖÏÂÃaeÕa¸o´iÎo£º
D:\php5>pear install MDB2
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
..........................done: 119,790 bytes
ERROR: failed to mkdir C:\php\pear\docs\MDB2\docs\examples
ÎÞ¨´´½¨Ä¿Â¼£¬¿´À´ÓÖÊÇȨÏÞÎÊÌa£¬Ë÷ÐÔÒÔ¹ÜÀiÔ±ÉiÝÆo¶¯cmdÃuÁiÌaʾ*u£¬È»ºoÖØÐÂÖ´ÐÐÉÏÃaeµÄÃuÁi¡£Õa´Î×ÜËa°²×°³É¹¦ÁËinstall ok£¡
ÁiÒ»¸o°²×°±¨´i°¸Àý£º**PHP pear°²×°³oÏÖ Warning: require_once(Structures/Graph.php)...´iÎo**
ÔÚWINDOWS°²×°pear,Ò»Â*ÎÞ×eºÜ˳Àu°²×°Íe³É£¬½Ó×ÅÏe°²×°ÏÂpear email°uÀ´ÍaeÏ£¬µ«½ÓÏÂÀ´È´±¨£º
Warning: require_once(Structures/Graph.php): failed to open stream: No such file
or directory in PEAR\Downloader.php on line 1217
PHP Warning: require_once(Structures/Graph.php): failed to open stream: No such
file or directory in E:\Program Files\php5_3\pear\pear\PEAR\Downloader.php on l
ine 1217
ÐÂÊÖû°i*¨£¬ÍøÉÏÕÒ½a¾o¡£ÕÛÌÚÁËÀÏ°eÌi£¬»¹ÊDZ¨Õa´iÎo.ÔÒoºÜÇa³þ¾ÍÊÇÉÙÁËStructures_GraphÕa¸oPEARÓ¦Óã¬ÏaÖ±½ÓͨÓÃpearÃuÁi£º
pear install Structures_Graph-1.1.1
ÔÚÏß°²×°Õa¸oÓ¦Ó㬵«ÈÃÈËÍ´ÐĵÄÊǾ¹È»Ò²±¨Í¬ÑuµÄ´iÎo£¬ÎÒ¶ª¡£¡£
²»¸uËuÍaeÁËÖ±½Óµ½PEAR¹ÙÍøÏÂÔØStructures_Graph-1.1.0.tgz°u¡£½aѹ¿´¿´ÀiÃaeµÄ½a¹¹£»¢ÏÖÀiÃaeÕýºÃÓÐÒ»¸oStructures/Graph.php£»ÓÚÊǽaѹ²¢°ÑѹËo°uÀiµÄStructuresÎļþ¼Ðŵ½pear¸uÄ¿ÏÂÃae¡£½Ó×ÅÔÙÔËÐÐStructures_GraphµÄ°²×°ÃuÁi£¬¾ªÏ²£¡£¡³É¹¦ÁË¡£
½Ó×ÅÔÙ°²×°email£¬²»³oÒaÍaÒ²³É¹¦¡£µ½´ËÕa¸o¾À½aÁËÎÒ°eÌiµÄÎÊÌaÖÕÓÚ½a¾oÁË¡£
лл´o¼ÒµÄÔĶÁŶ£¡