简体   繁体   中英

PHP and Windows 7 error reporting

i have installed php 5.3.0 on windows 7 & IIS and i configure it for CGI

i fond a great article at

 http://www.hauser-wenz.de/s9y/index.php?/archives/280-Installing-PHP-on-Windows-7.html

its really easy and it works (thanks who have uploaded this)

php run fine, but problem is when there is any error in script instead of getting error reporting (like page name, line no etc) as normal PHP errors it gives following error

 PHP Warning: Unknown: 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 '..../....' for '4.0/no     

DST' instead in C:\\inetpub\\wwwroot\\test.php on line 4

its not time zone error. even i disable the internet explorer "show Friendly HTTP errors"

for example if i write this simple php script

   <?php
   echo("hello");
  ?>

this works and if i write like this

   <?php
   echo("hello);
  ?>

it give same error as mention above.

Thanks for helping.

The error you're getting is caused by the timezone setting. You've probably set it wrong in the php.ini, or haven't set it at all.

As the error suggests, you can fix it with date_default_timezone_set

For example

date_default_timezone_set('Europe/Helsinki');

The list of available timezones can be found at php's manual . Though as far as I know, the error should not appear unless you attempt to use one of the date-related functions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM