尝试拉本地主机时出现此错误。
error: Warning: require(C:\xampp\htdocs\sync\vendor\autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\sync\config\bootstrap.php on line 23
使用 composer 从 cakephp 站点安装:http: //book.cakephp.org/3.0/en/quickstart.html
每次我尝试这都是我在 cmd 中遇到的一些错误:
C:\xampp\htdocs>php composer.phar create-project --prefer-dist -s dev cakephp/app sync
Installing cakephp/app (dev-master ebdd94ef28cd742b90fc03a5f8cca46c6306ded2)
- Installing cakephp/app (dev-master master)
Loading from cache
Created project in sync
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
Problem 2
- cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
- cakephp/debug_kit 3.0.x-dev requires cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
- Installation request for cakephp/debug_kit 3.0.*-dev -> satisfiable by cakephp/debug_kit[3.0.x-dev].
更新:
有趣的拍摄。我现在已经在 5 台机器上安装了 CakePHP 3 测试版,而且我再也没有看到这个错误。看了之后,我发现了这个(尝试了他们提供的所有解决方案都不起作用):CakePHP 3.0 installation: intl extension missing from system
解决方案
我试过了:
- 打开 /xampp/php/php.ini
- 将 ;extension=php_intl.dll 更改为 extension=php_intl.dll (删除分号)
- 将所有 /xamp/php/ic*.dll 文件复制到 /xampp/apache/bin
- 在 Xampp 控制面板中重启 apache
出于某种奇怪的原因,在我多次重新启动 apache 后,它在 30 分钟后突然开始随机工作。某些东西必须已缓存或需要硬重置。
但这最终做到了。似乎我的标题比另一个解决的标题更准确。希望这可以帮助更多的人。