PhpWarning: phpinfo (): Itisnotsafetorelyonthesystemstimezonesettings. Solution

Source: Internet
Author: User
: This article mainly introduces phpWarning: phpinfo (): itisnotsafetorelyonthesystemstimezoneset.pdf. the solution is as follows: if you are interested in PHP tutorials, refer to it. Php Warning: phpinfo (): It is not safe to rely on the system's timezone settings. Solution


After installing php, use phpinfo (); to view the information, including Warning: phpinfo (): It is not safe to rely on the system's timezone settings, the reason is that the system timezone is not set.

Solution:

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 current position of php. ini.

2. locate date. timezone, change it to date. timezone = RPC, and save the modification.

[Date]

; Defines the default timezone used by the date functions

Http://php.net/date.timezone

Date. timezone =

Change

[Date]

; Defines the default timezone used by the date functions

Http://php.net/date.timezone

Date. timezone = PRC

3. restart php after modification to view phpinfo (); warning disappears.


The above introduces php Warning: phpinfo (): It is not safe to rely on the systems timezone settings. the solution includes some content, and I hope some friends who are interested in the PHP Tutorial will help me.

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.