我是Codeigniter的新手,我想问为什么当我想用作曲家安装CI 4时会导致
Problem 1
- codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2].
但是我已经不推荐php.ini上的intl扩展名(我正在使用XAMPP)
我已经尝试找到答案,但找不到。如果你们对正在发生的事情有意见,请告诉我。谢谢你
答案 0 :(得分:0)
如果您使用的是5.6或更低版本的php
apiVersion: v1
kind: BuildConfig
metadata:
name: image-build
spec:
output:
to:
kind: ImageStreamTag
name: image-build:latest
source:
dockerfile: |-
FROM jee-runtime:latest
COPY ROOT.war /deployments/ROOT.war
images:
- from:
kind: ImageStreamTag
name: artifact-image:latest
paths:
- sourcePath: /wildfly/standalone/deployments/ROOT.war
destinationDir: "."
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: jee-runtime:latest
triggers:
- imageChange: {}
type: ImageChange
从php.ini文件中的行中删除分号
如果php 7或以上
从php.ini中的行;extension=php_intl.dll
中删除分号
一旦您更新了php.ini,请重新启动XAMPP / WAMP
答案 1 :(得分:0)
CodeIgniter 4需要PHP> = 7.2。
CodeIgniter 4的 composer.json 文件包含php> = 7.2 require;所以您应该看到要求不满足是第一个问题。但是奇怪的是,您已经print(out)
array([nan, nan, 1., 1., 1., 1., 0., nan, 1., 1., 0., 1., 1.,
0., nan, 1., nan])
进入了PHP配置文件:从PHP 7.2版开始,您应该拥有extension=php_intl.dll;
。因此,请检查XAMPP中已安装的PHP版本。
然后检查您是否已extension=intl
进入Windows PATH(或系统中正确的php目录路径)。
尝试启动您的 composer安装;如果出现相同的错误,请尝试在您的Web根目录中创建一个 test.php 文件,其中包含
C:\xampp\php
使用浏览器在本地Web服务器上打开 test.php 页面,并搜索国际化支持。如果找不到此信息,则表示该扩展名未激活。
在这种情况下,请查看是否已编辑正确的PHP.INI。有关XAMPP扩展名的正确设置,请参见this question。
答案 2 :(得分:0)
您可以尝试使用标志-ignore-platform-reqs 来运行composer来强制安装,但是请注意要解决依赖关系才能运行项目。
(当服务器在与主机规格不同的docker上运行时,我使用此标志进行安装)