基于WAMP安装pear

安装教程详见官网: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解决所有问题!


你可能感兴趣的:(基于WAMP安装pear)