dongli5785 2015-09-11 16:08
浏览 53

Symfony2在php.ini错误中设置“date.timezone”设置

Just started my first symfony2 project, and after installation on running http://127.0.0.1/inventory/web/config.php i got below message.

This script will guide you through the basic configuration of your project. You can also do the same by editing the ‘app/config/parameters.yml’ file directly.
**MAJOR PROBLEMS**
Major problems have been detected and must be fixed before continuing:
Set the "date.timezone" setting in php.ini* (like Europe/Paris).
* Changes to the php.ini file must be done in "/etc/php5/apache2/php.ini".

I have set date.timezone = "Asia/Karachi" in following files

/etc/php5/cli/php.ini
/etc/php5/apache2/php.ini

and this too in AppKernel.php

public function init()
{
    // get rid of Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone
    date_default_timezone_set( 'Asia/Karachi' );
    parent::init();
}

but still the same error. however, when i run this php -i | grep "timezone"command on console i got this,

Default timezone => Asia/Karachi
date.timezone => Asia/Karachi => Asia/Karachi

More on running phpinfo() function on test.php file i got this,

enter image description here

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题