当前位置:首页 > 技术问答
问题描述
PHP开启错误输出后,PHP报错提示如下
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 131072 bytes) in xxxx.php on line xxx
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1099 bytes) in
问题分析
这个是由于可用内存已耗尽,所以终端报出了Allowed memory size of 134217728 bytes exhausted错误,因为PHP默认内存限制是128M,所以需要修改php.ini文件的memory_limit设置。
问题描述
PHP调试的时候出现了警告:It is not safe to rely on the system解决方法,其实就是时区设置不正确造成的,本文提供了3种方法来解决这个问题。
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 Warning: strtotime(): 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 Warning: date_default_timezone_get(): 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 <b>/home/ftp/n/nimaboke/include/lib/function.base.php问题分析