[英]Symfony 3 PHP Warning: Module 'intl' already loaded in Unknown on line 0
I've recently installed symfony 3, and while it seems to be working okay, I noticed that my error logs keep filling up with the following message. 我最近安装了symfony 3,虽然看起来可以正常工作,但我注意到我的错误日志中不断出现以下消息。
[10-Jan-2016 01:03:11 America/Chicago] PHP Warning: Module 'intl' already loaded in Unknown on line 0
After looking into it, I set these in my composer.json file to see if it would help. 研究完之后,我将它们设置在composer.json文件中以查看是否有帮助。
"symfony/intl": "^3.0.1",
"symfony/polyfill-intl-icu": "^1.0"
but I still see the errors after I do anything with the page, like refresh it, or try to enter in my login etc... 但在对页面执行任何操作(如刷新页面或尝试输入登录名等)后,我仍然看到错误。
The full composer.json is below with my domain name replaced with example.com for security reasons. 出于安全原因,下面是完整的composer.json,其中我的域名替换为example.com。
{
"name": "root/example.com",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"require": {
"php": ">=5.5.9",
"symfony/symfony": "3.0.*",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"symfony/swiftmailer-bundle": "^2.3",
"symfony/monolog-bundle": "^2.8",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"symfony/intl": "^3.0.1",
"symfony/polyfill-intl-icu": "^1.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^2.7"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}
}
}
Also I tried following the advice on a question similar to mine here ( Problems installing Symfony 2.4.1 lib-icu 4.4 dependency ), but when I tried to set "symfony/icu": "1.1.*", composer refused to do it because I'm using symfony 3... 我也尝试遵循与我的问题类似的建议( 安装Symfony 2.4.1 lib-icu 4.4依赖的问题 ),但是当我尝试设置“ symfony / icu”:“ 1.1。*”时,作曲家拒绝这样做因为我正在使用symfony 3 ...
I'm not even sure if my issues are same as his. 我什至不确定我的问题是否与他的相同。
I'm using WHM/Cpanel on Centos Linux Server in case there is any UNIX commands I need to run to solve this. 我在Centos Linux服务器上使用WHM / Cpanel,以防需要运行任何UNIX命令来解决此问题。
I believe I have installed the intl extension already via the WHM control panel as well, but I'm not 100% sure I did this correctly either. 我相信我也已经通过WHM控制面板安装了intl扩展名,但是我也不是100%肯定我也正确地做到了。 I've attached an image of how it looks in my control panel.
我已经在控制面板中附加了一张图像的外观。
I've also tried following instructions here ( http://symfony.com/doc/current/components/intl.html ) 我也尝试过按照以下说明进行操作( http://symfony.com/doc/current/components/intl.html )
How do I get rid of the error message? 我如何摆脱错误消息?
I believe this is not Symfony related. 我相信这与Symfony无关。
Usually the case is your installed PHP version compiled with --with-intl
option ( intl
built-in) and you have also installed intl
extension. 通常情况是您安装的PHP版本使用
--with-intl
选项编译(内置intl
),并且还安装了intl
扩展名。
Try to disable/ uninstall the intl
extension and test if you can still use symfony/intl
features without issues. 尝试禁用/卸载
intl
扩展,并测试您是否仍然可以使用symfony/intl
功能而不会出现问题。
SensioDistributionBundle before v5.0.17 creates this kind of errors when used with Composer v1.3 ( more details ). 与Composer v1.3一起使用时,v5.0.17之前的SensioDistributionBundle会产生此类错误( 更多详细信息 )。
Check if you could be affected: 检查您是否会受到影响:
composer --version && composer show | grep distribution-bundle
If so, get rid of the problem by updating SensioDistributionBundle to the latest version: 如果是这样,请通过将SensioDistributionBundle更新到最新版本来解决该问题:
composer update sensio/distribution-bundle
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.