Warning: require_once(): It is not safe to rely on the system's timezone settingserror in PHP
I am trying to install a open source PHP application IIS; after installation I am getting the following error:
Warning: require_once(): 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 'Asia/Kolkata' for '5.5/no DST' instead in D:\Inetpub\wwwroot\dotproject\lib\adodb\adodb.inc.php
This has nothing to do with require_once() but with the time/date function you're using in the included script.
see http://docs.php.net/datetime.configuration#ini.date.timezone and http://docs.php.net/timezones
Simplest solution: Put
date.timezone = "Asia/Kolkata"
into your php.ini. Use
<?php echo get_cfg_var('cfg_file_path');
to determine which php.ini you have to edit.
精彩评论