views:

194

answers:

1

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.

+1  A: 

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.

Jani Hartikainen
In php.ini you should set a default for all operation. I would suggest using the function above only if you need to change from a default. To set it in php.ini add or/change the following value: date.timezone = America/Los_Angeles
Kevin Peno
i already set this option , please read my question completely...
air
Your question does not say you set this option, nor the value you set it to. You will not get this error if it's set correctly, and as such, it should fix your other problem if you fix this problem.
Jani Hartikainen