PHP 将错误日志存储在哪里?(PHP 5、Apache、FastCGI 和 cPanel)

编程入门 行业动态 更新时间:2024-10-24 22:23:29
本文介绍了PHP 将错误日志存储在哪里?(PHP 5、Apache、FastCGI 和 cPanel)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

I am on shared hosting and have cPanel, Apache, and PHP is run by FastCGI. Where does PHP store the error log?

Is there another way I can find the error log on a shared hosting environment instead of having to go through entire site structure to look for error_log files?

I have access to the php.ini file (I am using PHP version 5.2.16).

解决方案

PHP stores error logs in /var/log/apache2 if PHP is an apache2 module. Shared hosts are often storing log files in your root directory /log subfolder. But...if you have access to a php.ini file you can do this:

error_log = /var/log/php-scripts.log

According to rinogo's comment: If you're using cPanel, the master log file you're probably looking for is stored (by default) at

/usr/local/apache/logs/error_log

If all else fails you can check the location of the log file using

<?php phpinfo(); ?>

更多推荐

PHP 将错误日志存储在哪里?(PHP 5、Apache、FastCGI 和 cPanel)

本文发布于:2023-11-01 12:21:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549322.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   日志   PHP   cPanel   FastCGI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!