安裝教程詳見官網:http://pear.php.net/manual/en/installation.getting.php
安裝後檢測安裝成功與否:http://pear.php.net/manual/en/installation.checking.php
但是在檢測腳本中使用require_once 'System.php'的時候,出現如下異常:
( ! ) Warning: require(D:\wamp\www\auth0/vendor/autoload.php): failed to open stream: No such file or directory in D:\wamp\www\auth0\index.php on line 9 | ||||
---|---|---|---|---|
Call Stack |
( ! ) Fatal error: require(): Failed opening required 'D:\wamp\www\auth0/vendor/autoload.php' (include_path='.;C:\php\pear') in D:\wamp\www\auth0\index.php on line 9 | ||||
---|---|---|---|---|
Call Stack |
我WAMP的安裝目錄是:D:\wamp
根據官方的解決方法:http://pear.php.net/manual/en/installation.checking.php#installation.checking.cli.modifyingphpini
我找到 D:\wamp\bin\php\php5.5.12 下的php.ini,
搜索 include_path,
發現已經存在 include_path = ".;D:\wamp\bin\php\php5.5.12\pear"
很納悶。。
一番查閱後想起 php.ini 不只一個,除了PHP安裝目錄下的 php.ini,還有一個存在與Apache運行目錄下,
去到 D:\wamp\bin\apache\apache2.4.9\bin 下的 php.ini,
搜索include_path,
果然,這裏沒有配pear路徑,增加一行:
include_path = ".;D:\wamp\bin\php\php5.5.12\pear"
重啓WAMP解決所有問題!