The following error occurs when installing the Prosper202 program: Warning: date ().

Source: Internet
Author: User
Tags local time php file what php prosper202
Today, when we help the customer install the Prosper202 program, we use the WDCP panel that the customer is used to, and then deploy Prosper202 to set up the database file. It will be easier to open the installation wizard later, but after the installation is complete, there are many error script prompts on the logon interface.

 

 

I was lucky to have no problem with the homepage. I only need to log on to the homepage, but it still does not work after login. It seems that the problem needs to be solved.

 

1. Error message

 

The code is as follows: Copy code

Warning: date (): 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/Chongqing 'for 'cst/8.0/no DST' instead in

 

This is probably the error message.

 

2. Solve the problem

 

According to the error message, you only need to set the problem in the 202-cronjobs/index. php file, which should be caused by strict time functions. Here we authorize the function.

 

The code is as follows: Copy code

Date_default_timezone_set ('prc ');
Date ('Y-m-d H: I: s ');

 

Add the above two lines of code to the 202-cronjobs/index. Php file. This will solve the problem.

 

In summary, from PHP 5.1.0, if the timezone setting is incorrect for functions such as date (), the E_NOTICE or E_WARNING information is generated every time the time function is called. In PHP 5.1.0, date. the timezone option is disabled by default. No matter what PHP command is used, the Greenwich Mean Time is used. If this option is not set in PHP 5.3, an error occurs forcibly, we only need to use the above method to force the local time to solve the problem.

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.