简体   繁体   English

作曲家更新中的错误

[英]Composer update error in doctrine

I tried to do a composer update command and got this error. 我尝试执行composer update命令,但出现此错误。 What might be the problem? 可能是什么问题?

It was working well before. 之前运作良好。

[RuntimeException]  
Could not delete /var/www/vhosts/kaikacampus.com/httpdocs/kaikacampus.com/vendor/
doctrine/annotations/phpunit.xml.dist: date_defaut_timezone_get():It is not safe 
to reply on the system's timezone settings. You are *required* to use the 
data.timezone setting or the date_default_timezone_set() function. In case you 
used any of those methods and you are still getting this warning, you most 
likely misspelled the timezone identifier. We selected the timezone 'UTC' for 
now, but please set date.timezone to select your timezone.

在此处输入图片说明

I'm not sure about the suggestion given in the red area as I'm a newbie. 我是新手,所以不确定红色区域中的建议。

The composer version is: Composer version 1.0-dev (ffffab37a294f3383c812d0329623f0a4ba45387) 2014-11-05 06:04:18 撰写者版本为:撰写者版本Composer version 1.0-dev (ffffab37a294f3383c812d0329623f0a4ba45387) 2014-11-05 06:04:18

Performed the action: 执行动作:

mv vendor vendor_old && composer update

This saved my day!!! 这节省了我的一天!

What might be the problem? 可能是什么问题?

If you take a look at the screenshots you see a bigger red section (circa the lower half of the screenshot). 如果您查看屏幕截图,则会看到较大的红色部分(大约屏幕截图的下半部分)。

It contains an error messages that starts about telling what went wrong. 它包含了约开始告诉什么问题的错误消息。 It then has a colon (":") and after the colon, the reason what the problem is, has been given to you. 然后,它有一个冒号(“:”),并在冒号之后给出了问题所在。

It is a common PHP error message, for which references should exist. 这是常见的PHP错误消息,应该存在对其的引用。 Both on site as well as on other websites in the internet. 既可以在网站上也可以在互联网上的其他网站上使用。 As you're inclined to search and research before posting, I assume it's okay I leave the straight forward search operation as an exercise to you. 由于您倾向于在发布前进行搜索和研究,因此我认为可以将直接搜索操作作为练习留给您,这是可以的。

Let me know if you've got problems to read the screen because of the colors used or the size of the letters. 让我知道您是否由于使用的颜色或字母的大小而无法阅读屏幕。


As added your first comment, it looks you're puzzled about where to make the timezone changes, right? 正如您添加的第一条评论一样,您似乎对时区更改的位置感到困惑,对吧? The error message is speaking about 错误消息正在谈论

"the date.timezone setting" date.timezone设置”

(bold by me). (被我大胆)。 When you don't understand what this means, one thing easy to do in PHP is to prefix it with php.net/ and enter it into your browser: 当您不了解这意味着什么时,在PHP中容易做的一件事就是在它的php.net/加上php.net/并将其输入到浏览器中:

http://php.net/date.timezone http://php.net/date.timezone

This brings you directly to the documentation of that setting. 这直接将您带到该设置的文档。

You need to set a timezone for your server/computer. 您需要为服务器/计算机设置时区。

You should first locate your php.ini file. 您应该首先找到您的php.ini文件。 You will find the path of it in the output of this command: 您将在以下命令的输出中找到它的路径:

php -i | grep -e 'Loaded Configuration'

Then load it in your browser (for example http://localhost/info.php ) and check in the page that opens where your php.ini is located. 然后将其加载到浏览器中(例如http://localhost/info.php ),并在打开php.ini的页面中检入。

When you know where it is, open the php.ini file, look for date.timezone setting, change it and save the file. 当您知道它在哪里时,请打开php.ini文件,查找date.timezone设置,对其进行更改并保存该文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM