When installing Drupal 8.2.x dev i get an error with translations.
Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.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. in Symfony\Component\HttpFoundation\Response->sendHeaders() (line 331 of vendor/symfony/http-foundation/Response.php).
Symfony\Component\HttpFoundation\Response->sendHeaders() (Line: 371)
Symfony\Component\HttpFoundation\Response->send() (Line: 629)
install_run_task(Array, Array) (Line: 530)
install_run_tasks(Array) (Line: 115)
install_drupal(Object) (Line: 39)
Vertalingen voor drupal aan het importeren. (15%).
Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.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. in Symfony\Component\HttpFoundation\Response->sendHeaders() (line 331 of vendor/symfony/http-foundation/Response.php).
Symfony\Component\HttpFoundation\Response->sendHeaders() (Line: 371)
Symfony\Component\HttpFoundation\Response->send() (Line: 629)
install_run_task(Array, Array) (Line: 530)
install_run_tasks(Array) (Line: 115)
install_drupal(Object) (Line: 39)
Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.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. in Symfony\Component\HttpFoundation\Response->sendHeaders() (line 331 of vendor/symfony/http-foundation/Response.php).
Symfony\Component\HttpFoundation\Response->sendHeaders() (Line: 371)
Symfony\Component\HttpFoundation\Response->send() (Line: 629)
install_run_task(Array, Array) (Line: 530)
install_run_tasks(Array) (Line: 115)
install_drupal(Object) (Line: 39)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screen Shot 2016-05-25 at 12.17.17.png | 124.25 KB | sasanikolic |
| Screen Shot 2016-05-13 at 15.57.17.916.png | 222.6 KB | mr_infinity | |
| Screen Shot 2016-05-13 at 15.59.16.726.png | 496.26 KB | mr_infinity |
Comments
Comment #2
mr_infinity commentedComment #3
sasanikolic commentedI'm also having this error. It even displays as a warning when running tests.
Comment #4
sasanikolic commentedFigured out that this is caused by a misconfigured php.ini. I think we can close this.
Comment #5
amateescu commentedYup, that's definitely a PHP misconfiguration.
Comment #6
ench0 commentedsasanikolic and amateescu - I am glad that have figured out what the problem is but maybe you could share the solution? After all that's the main idea of issues database, isn't it? Please share here how to fix this. Thank you.
Comment #7
ench0 commentedHappens on my new installation of Panopoly 8.x-2.0-alpha4.
Comment #8
amateescu commented@ench0, the solution is in the PHP warning message itself, if you read it. You need to set
date.timezonein your php.ini. See http://php.net/manual/en/datetime.configuration.phpComment #9
ench0 commentedThank you for clarifying this, amateescu.
And is it normal that drupal does not create a php.ini file during the installation? I don't have a php.ini file in my drupal directory, so I created one and added my date.timezone as per http://php.net/manual/en/timezones.php and restarted httpd but that did not solve the issue...
I then edited the php.ini file in /etc after which the error disappeared, but I thought that a local php.ini file is supposed to override the global one....
Thanks.
Comment #10
diamondseaThat depends on how the server is configured as to which INI files it will read.
Example links:
http://php.net/manual/en/configuration.file.php
http://php.net/manual/en/configuration.file.per-user.php
https://www.howtoforge.com/how-to-specify-a-custom-php.ini-for-a-website...
Comment #11
bogdog400 commentedBTW, I continue to encounter this issue on 1and1's shared hosting. They don't seem very helpful.
Comment #12
srikanth.g commentedunable to install drupal 8.5.1
Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.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. in Symfony\Component\HttpFoundation\ResponseHeaderBag->initDate() (line 336 of vendor\symfony\http-foundation\ResponseHeaderBag.php).
Symfony\Component\HttpFoundation\ResponseHeaderBag->initDate() (Line: 41)
Symfony\Component\HttpFoundation\ResponseHeaderBag->__construct(Array) (Line: 199)
Symfony\Component\HttpFoundation\Response->__construct() (Line: 68)
Drupal\Core\Render\BareHtmlPageRenderer->renderBarePage(Array, 'Error', 'install_page', Array) (Line: 76)
Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer->renderBarePage(Array, 'Error', 'install_page', Array) (Line: 1005)
install_display_output(Array, Array, Array) (Line: 260)
_drupal_log_error(Array, 1) (Line: 600)
_drupal_exception_handler(Object)
Comment #13
bogdog400 commentedI've resorted to adding an extra line to vendor/symfony/http-foundation/ResponseHeaderBag.php so the initialization function now sets the default time zone like this. This has made the problem go away for me. It's a total hack and it's a pain that we need it, but after I included it the installation process works.
Comment #14
lissy commentedHere is the same problem with a completely fresh installation of 8.5.1
Strict errors are excluded from reporting in php.ini and date.timezone was set to Europe/Berlin.
Installation aborts with error messages.
Comment #15
sajosh commentedSame here.
Strict Standards: DateTime ... ResponseHeaderBag.php on line 336
After database screen, I get ...
The website encountered an unexpected error. Please try again later.
RuntimeException: Failed to start the session because headers have already been
I tried php.ini in the main drupal folder. No luck. Then copied to sites/default folder, still no luck.
D8.5.1, mysql 5.5, php 7.2 on 1and1.com shared
"Solved" it by putting .user.ini file with date.timezone = 'America/New_York' in the main drupal folder.
Credit: https://www.drupal.org/forum/support/installing-drupal/2017-10-25/cannot...
However, I suspect the .user.ini or php.ini is the cause of another problem after installation completes ... internal server error for any page except the main one.
Comment #16
sajosh commentedOk. Solved it for real (for my case ... subfolder subdomain for testing).
The 500 internal server error solved by uncommenting "ReWriteBase /" line 123 in .htaccess ... because subdomain. phew
The Strict Standards error solved by .user.ini with only date.timezone = America/New_York for my case (1and1 shared). Didn't need php.ini (might need it later for other settings but not for the strict error.)
Comment #17
goz commentedSame thing here, on a 1and1 shared, fixed adding a .user.ini file with
date.timezone = Europe/Berlin