1. Settings for Date.timezone
php5 default Date.timezone is UTC, Date.timezone = PRC To resolve a time difference of eight hours.
Modify the php.ini file to find the;d Ate.timezone =, remove the preceding semicolon and add the time zone after "=".
For example: Asia/chongqing (Chongqing), Asia/shanghai (Shanghai), Asia/urumqi (Urumqi), Asia/macao (Macau), Asia/hong_kong (Hong Kong), Asia/taipei (Taipei), PRC
Cases
;d Ate.timezone =
Change to:
Date.timezone = Asia/shanghai
2. Settings for uploading file size limits
Usually in the php.ini can set the maximum upload file size, and sometimes upload files can only be less than 512k? A little bit more error, unable to find the upload page, "the page cannot be displayed, ...., the server could not be found or a DNS error occurred."
PHP Upload File size limit workaround:
First: Check the following line in the php.ini:
- upload_max_filesize = 8M
- post_max_size = 10M
- memory_limit = 20M
Change these values to what I said, see if there is a problem, and also confirm that the uploaded <form> does not resemble the following line <input type= "hidden" name= "max_file_size" value= "500000" > This also restricts the upload size.
Second: If Apache 2 needs to be modified
- /etc/httpd/conf.d/php.conf
In the Limitrequestbody 524288 will 524288 (=512x1024) to large, such as 5M (=5x1024x1024) so upload will not appear above problems, upload does not respond, upload the reality of the page can not be realistic will be resolved!
3. Notice of modifications to this type of configuration
Under XAMPP or WAMP, modifying the php.ini in wamp/bin/php may not take effect, because php.ini is placed under Apache/bin to modify the php.ini in it.
Changes to the server time zone and upload file size limits in php.ini