刚开始我的第一个symfony2项目,在安装运行http://127.0.0.1/inventory/web/config.php
后,我得到了以下信息。
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".
我在以下文件中设置了date.timezone = "Asia/Karachi"
/etc/php5/cli/php.ini
/etc/php5/apache2/php.ini
这也是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();
}
但仍然是同样的错误。
但是,当我在控制台上运行此php -i | grep "timezone"
命令时,我得到了这个,
Default timezone => Asia/Karachi
date.timezone => Asia/Karachi => Asia/Karachi
关于在test.php文件上运行phpinfo()函数的更多内容我得到了这个,