找出error_log中的路径 [英] Find out the error_log's path

查看:239
本文介绍了找出error_log中的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有

我有这个 domain.com ponted到 /home/username/public_html/domain.com

i have this domain.com ponted to /home/username/public_html/domain.com

我添加这行到的.htaccess

I added this lines to the .htaccess

ErrorDocument 500 /oohps.php
ErrorDocument 404 /where.php

因此​​,我可以表现出一定的风格模板

So i can show some styled template

问题是,试图存取权限不存在的页面时,我得到和aditional的内部服务器错误所以这个文件不会被打开,

The problem is that when trying to acces a non existing page, i get and aditional internal server error so this files are not opened,

我要检查日志,但我canot发现错误日志中的路径( /home/username/public_html/domain.com ),

I wanted to check for the logs but i canot find the error log in that path (/home/username/public_html/domain.com) ,

发现之一: /无功/日志/的httpd

但由于有很多的错误没有参与这个页面,我没有看到任何涉及我不认为它正确的文件夹,

but i don't think its the right folder because there are many errors not involved with this page and i didn't see any involved,

是否有一个PHP函数,将输出错误日志文件路径

Is there a php function that would output the errors log file path?

推荐答案

这是内部服务器错误又常常是与阿帕奇和/ var /日志/的httpd /就是Apache的错误日志文件,所以我觉得你是在正确的文件。

An internal server error has often something to do with Apache and /var/log/httpd/ is the error log file of apache, so I think you are in the right file.

错误路径在php.ini设置。为了获取路径使用 ini_get()

The error path is set in php.ini. To get the path use ini_get():

<?php
  $errorPath = ini_get('error_log');
?>

这篇关于找出error_log中的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆