2013-02-20 2 views
3

joomla 및 wordpress 파일을 이전 서버에서 새 서버로 변경했습니다. 프론트 엔드와 관리자 측에서는 오류없이 작동합니다. 그러나 데이터베이스 (phpMyAdmin을) 섹션에서이 같은 일부 경고 메시지를 보여줍니다 ..PHP 경고 : strtotime() 오류

Warning: strtotime() [function.strtotime]: 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/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 88 

Warning: strftime() [function.strftime]: 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/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483 

어떻게 이러한 경고 메시지를 숨기기 위해, 제안 주시겠습니까?

미리 감사드립니다. php.ini 파일에서

+0

*** 주를 방문 다른 경우'apache2'의'php .ini 파일. 동기화를 유지하고 혼동을 피하기 위해 서로 상징적 인 연결을 제안합니다! –

답변

-4

:

+2

그건 정말 좋은 솔루션은 아니지만, 다른 오류가있을 수 있습니다. 모든 오류를 감추는 것은 좋은 생각이 아닙니다. – Tom

4

를 나타내는 것 ?

새 서버에서는 php.ini 파일의 설정 date.timezone을 주석 처리해야합니다. . 여기에서, 당신은 예를 들어, 내 서버는 독일에 위치한 서버가에있는 시간대를 지정해야합니다, 그래서 여기 Europe/Berlin를 사용

:

date.timezone = Europe/Berlin 

당신이있어 지원 시간대의 전체 목록을 찾을 수

http://www.php.net/manual/en/timezones.php

이 설정을 변경 한 후 웹 서버를 다시 시작하면 경고 메시지가 표시됩니다.

1

가장 좋은 방법은 기본 표준 시간대를 설정하는 것입니다. 내가 생각 나는 귀하의 경우 "미국/상파울루"를 사용하여 내 경우

date_default_timezone_set('America/Sao_Paulo'); 

"아시아/캘커타"에 대한 자세한 내용은

된다 config.inc.php를 파일에서 , 하나 개의 줄을 삽입 ***은`PHP-cli`의`php.ini` 파일 : 시간대는 ... http://php.net/manual/en/function.date-default-timezone-set.php

1
date_default_timezone_set('Europe/London'); 

이 PHP 코드는 문제가 해결이 될 수있다 시도