CakePHP 3.0安装与作曲家是破碎? [英] CakePHP 3.0 install with composer is broken?

查看:135
本文介绍了CakePHP 3.0安装与作曲家是破碎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试拉取localhost时,我收到此错误。

I get this error when trying to pull localhost.

错误:警告:require(C:\ xampp \htdocs \ sync\vendor\autoload.php):无法打开流:在第23行上的C:\ xampp\htdocs\sync\config\bootstrap.php中没有这样的文件或目录

使用composer从cakephp网站安装: http://book.cakephp.org/3.0/en/quickstart.html

using composer to install from the cakephp site here: http://book.cakephp.org/3.0/en/quickstart.html

每次我尝试这是我得到的以及cmd中的一些错误:

Every time I try this is what I get along with some errors in the cmd here:

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安装:系统中缺少intl扩展

Interesting take. I have now installed the CakePHP 3 beta on 5 machines and not once have I seen this error again. After looking, I found this (tried all solutions they offered didn't work): 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

  • Opening /xampp/php/php.ini
  • Changing ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)
  • Copy all the /xamp/php/ic*.dll files to /xampp/apache/bin
  • Restart apache in the Xampp control panel

出于某种奇怪的原因,更多的时间,它只是开始工作随机从30分钟后无处。某些内容必须已缓存或需要硬重置。

For some strange reason, after I restarted apache several more times it just started working randomly out of nowhere 30 mins later. Something must have cached or required a hard reset.

但最后做到了。
看来,我的标题比其他解决的人更准确。希望这有助于更多的人。

But that finally did it. And it seems that my title was much more accurate for people to find than the other solved one. Hope this helps more people.

推荐答案

不,只是阅读


  • 问题1(...)cakephp / cakephp 3.0.x-dev需要ext-intl

  • 问题2 - cakephp / cakephp 3.0.x-dev要求ext-intl - > 您的系统缺少所请求的PHP扩展程序intl。

  • Problem 1 (...) 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.

安装扩展程序,问题解决。 官方文档还会告诉您必需 >运行框架。

Install the extensions, problem solved. The official documentation tells you also what is required to run the framework.

每当你遇到错误,阅读并注意它的意思。这似乎是一个常见的问题,人们今天忽略他们。

Whenever you get an error, read it and pay attention to what it says. It seems to be a common problem that people ignore them these days.

安装说明解释了这一点以及包括XAMPP和WAMP用户的说明:

The installation instructions in the official documentation explain this as well including instructions for XAMPP and WAMP users:


在XAMPP和WAMP中,mcrypt和mbstring扩展都默认使用
。在XAMPP中,包括intl扩展,但是你必须
取消注释php.ini中的extension = php_intl.dll并通过XAMPP控制面板重新启动服务器
。在WAMP中,默认情况下intl扩展名是
activated,但不工作。要使它工作,你必须去
到php文件夹(默认)C:\wamp\bin\php\php {version},复制所有的
文件看起来像icu * .dll并将其粘贴到apache bin
目录C:\wamp\bin\apache\apache {version} \bin中。然后重新启动所有
服务,它应该是OK的。

In both XAMPP and WAMP, mcrypt and mbstring extensions are working by default. In XAMPP, intl extension is included but you have to uncomment extension=php_intl.dll in php.ini and restart the server through the XAMPP Control Panel. In WAMP, the intl extension is "activated" by default but not working. To make it work you have to go to php folder (by default) C:\wamp\bin\php\php{version}, copy all the files that looks like icu*.dll and paste them into the apache bin directory C:\wamp\bin\apache\apache{version}\bin. Then restart all services and it should be OK.

这篇关于CakePHP 3.0安装与作曲家是破碎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆