将Mamp Pro 4.5与Drupal一起使用时,引起日期时间错误的原因

时间:2018-08-10 22:15:50

标签: mamp drush

我收到此错误:

`DateTime :: createFromFormat():依靠系统的时区设置是不安全的。 要求使用date.timezone设置或date_default_timezone_set()函数。如果您使用了其中任何一种方法[警告] 并且您仍然收到此警告,您很可能拼错了时区标识符。我们暂时选择了时区“ UTC”,但请设置date.timezone以选择您的时区。 Response.php:231 PDOException:SQLSTATE [HY000] [2002] /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php在第79行#0 / Applications / MAMP / htdocs中没有此类文件或目录/access-management/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(149):PDO-> __ construct('mysql:host = loca ...','root','root',数组)

1 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Core/Database/Database.php(376):Drupal \ Core \ Database \ Driver \ mysql \ Connection :: open(Array)< / h1>

2 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Core/Database/Database.php(166):Drupal \ Core \ Database \ Database :: openConnection('default','default' )

3 [内部功能]:Drupal \ Core \ Database \ Database :: getConnection('default')

4 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(79):call_user_func_array('Drupal \ Core \ Dat ...',Array)

5 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Component/DependencyInjection/Container.php(171):Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> createService(Array,'database')< / h1>

6 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(260):Drupal \ Component \ DependencyInjection \ Container-> get('database',1)< / h1>

7 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Component/DependencyInjection/PhpArrayContainer.php(62):Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> resolveServicesAndParameters(Array)

8 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Component/DependencyInjection/Container.php(171):Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> createService(Array,'cache.container' )

9 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Core/DrupalKernel.php(513):Drupal \ Component \ DependencyInjection \ Container-> get('cache.container')

10 /Users/john/drush8/vendor/drush/drush/lib/Drush/Drupal/DrupalKernel.php(53):Drupal \ Core \ DrupalKernel-> getCachedContainerDefinition()

11 /Applications/MAMP/htdocs/access-management/core/lib/Drupal/Core/DrupalKernel.php(466):Drush \ Drupal \ DrupalKernel-> initializeContainer()

12 /Users/john/drush8/vendor/drush/drush/lib/Drush/Boot/DrupalBoot8.php(146):Drupal \ Core \ DrupalKernel-> boot()

13 /Users/john/drush8/vendor/drush/drush/includes/bootstrap.inc(354):Drush \ Boot \ DrupalBoot8-> bootstrap_drupal_full()

14 /Users/john/drush8/vendor/drush/drush/includes/bootstrap.inc(473):drush_bootstrap(5,6)

15 /Users/john/drush8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(59):drush_bootstrap_to_phase(6)

16 /Users/john/drush8/vendor/drush/drush/includes/preflight.inc(66):Drush \ Boot \ BaseBoot-> bootstrap_and_dispatch()

17 /Users/john/drush8/vendor/drush/drush/drush.php(12):drush_main()

18 {main}

由于不可恢复的错误,Drush命令异常终止。 [错误] PDOException:SQLSTATE [HY000] [2002] Drupal \ Component \ DependencyInjection \ PhpArrayContainer-> createService()中没有这样的文件或目录(/ Applications / MAMP / htdocs / access-management / core / lib / Drupal / Component / DependencyInjection / PhpArrayContainer.php)`

在发出命令Drush cex之后

。我制作了一个.user.ini文件没有任何作用。有解决方案吗?

0 个答案:

没有答案