PHP warning:phpinfo (): It is not safe for rely on the systems timezone settings. Workaround

Source: Internet
Author: User
Tags phpinfo
php warning:phpinfo (): It is not safe for rely on the system ' s timezone settings. Workaround


After installing PHP, use phpinfo (); View information, with Warning:phpinfo (): It is not safe to rely on the system ' s timezone settings, because there is no timezone to set up systems.

Workaround:

1. Open PHP.ini, if you do not know the location of php.ini, you can use

 
  



View the Loaded Configuration File to know the php.ini location that is currently in use.

2. Locate Date.timezone, modify to Date.timezone = RPC, save after.

[Date]

; Defines the default timezone used by the date functions

; Http://php.net/date.timezone

Date.timezone =

Revision changed to

[Date]

; Defines the default timezone used by the date functions

; Http://php.net/date.timezone

Date.timezone = PRC

3. Restart PHP after modification, view phpinfo (); Warning disappeared.


The above describes PHP Warning:phpinfo (): It is not safe to rely on the systems timezone settings. Solution, including the content of the aspects, I hope to be interested in PHP tutorial friends helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.