July 1, 2015

Khắc phục lỗi (It is not safe to rely on the system’s timezone)

Khắc phục lỗi (It is not safe to rely on the system’s timezone)
Trên php phiên bản 5.3.0 trở đi một số source sẽ phát sinh lỗi function code không trùng với ngày giờ hệ thống và báo lỗi đòi set mặc định timezone và  gây nên lỗi header cannot add cookies … Vì thế chúng ta hãy mở filefunction.php trong source và thêm vào ngay  function đầu tiên đoạn mã sau:

date_default_timezone_set('UTC');

Hoặc edit file php.ini nếu bạn là chủ vps hay server đang host site đó.
up file lên overwrite file gốc là xong .

0 comments:

Post a Comment