Benim sunucuda bir PHP application yüklemeye çalışıyorum. Ama bu hatayı alıyorum:
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
Ben Soruna dosya ve kod bölümü (aşağıda) tespit ettik. Ben bu kodu nasıl düzeltebilirim ki? Ne PHP_TZ yapmak gerekiyordu? Neden böyle PHP değil? Ben yerine ne yapabilirim?
//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"]);
}
PHP 5.2.10 gidiyorum. Ben hem 'Europe / Zürih' denedim, ve $ configdata ["timezone"] için değerler için 'UTC' ve hem de aynı hata var.