I'm trying to install a PHP application on my server. But I'm getting this error:
Warning: putenv() [function.putenv]: Safe Mode warning: Cannot set environment variable 'PHP_TZ' - it's not in the allowed list in .../public/timezone.inc on line 14
I've located the offending file and section of code (below). How would I fix this code? What is PHP_TZ supposed to do? Why doesn't PHP like it? What can I do instead?
//set the timezone
if ($configdata["timezone"] != "") {
putenv("PHP_TZ=" . stripslashes($configdata["timezone"]));
putenv("TZ=" . stripslashes($configdata["timezone"]));
//for >= PHP 5.1
if(function_exists("date_default_timezone_set")) {
date_default_timezone_set($configdata["timezone"]);
}
I'm on PHP 5.2.10. I tried both 'Europe/Zurich', and 'UTC' for the values for $configdata["timezone"] and got the same error for both.