【发布时间】:2014-07-12 10:56:11
【问题描述】:
error_log 文件有一些问题。每天它生成 1 GB 的数据文件。每天早上我需要通过 FTP 登录删除这个文件。由于内存很大,有时我无法访问我的网站。它说内部服务器错误。
如何解决这个 error_log 文件问题。
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/listing_list_item.php on line 20
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/listing_list_item.php on line 20
[12-Jul-2014 10:52:10 UTC] PHP Notice: Undefined offset: 0 in /home/inseedo/public_html/include/template/listing_list_item.php on line 37
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/listing_list_item.php on line 20
[12-Jul-2014 10:52:10 UTC] PHP Notice: Undefined offset: 0 in /home/inseedo/public_html/include/template/listing_list_item.php on line 37
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/listing_list_item.php on line 20
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/listing_list_item.php on line 20
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/listing_list_item.php on line 20
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/site_panel_listings.php on line 92
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/site_panel_listings.php on line 92
[12-Jul-2014 10:52:10 UTC] PHP Notice: Use of undefined constant location_name_zip - assumed 'location_name_zip' in /home/inseedo/public_html/include/template/site_panel_listings.php on line 92
【问题讨论】:
-
修复原因。您可以在 Stack Overflow 上搜索每条错误消息,例如 “PHP Notice: Use of undefined constant”,一定会找到解决方案。
-
不,我有一个更好的主意:将错误日志发送给开发人员并告诉他修复它。
-
看起来大部分消息是由 3 行错误引起的。他应该不会花时间来修复它们。
-
我在该文件夹和
display_error = 0;中创建了一个php.ini文本文件。现在,我没有 error_log 文件。这是防止这个问题的好主意吗? -
@Beginner - 最好解决他的问题