Php没有报告IIS7上的任何错误 [英] Php not reporting any errors on IIS7

查看:159
本文介绍了Php没有报告IIS7上的任何错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用我们的XAMPP设置作为测试服务器开发PHP应用程序。

I am developing a PHP application using our XAMPP setup as a test server.

一旦应用程序准备部署,我必须将其上传到客户端的服务器,

Once the app is ready to deploy, I have to upload it to the client's server,

问题是客户端的服务器正在运行IIS 7,每次出现PHP错误时它只显示一个空白页...

The problem is the client's server is running IIS 7, and every time there is a PHP error it just displays a blank page...

现在,我的应用已经设置了 error_reporting(E_ALL),并且我无权访问php.ini文件(不要问为什么!)...

Now, my app has error_reporting(E_ALL) already set, and I do not have access to the php.ini file (don't ask why!)...

我已经尝试了 error_reporting()的每个参数组合: http://www.php.net/manual/ en / errorfunc.configuration.php#ini.error-reporting

and I have tried every combination of parameters for error_reporting() found here: http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

有人能指出我想要出现错误的另一种方式吗?

Can anyone point me towards another way of getting the errors to show up at all?

btw:我正在使用codeigniter,我尝试了它提供的error_logging函数无济于事......

btw: I am using codeigniter, and I've tried the error_logging functions it provides to no avail...

推荐答案

在生产服务器上关闭它可能会很好。你可以随时打开错误登录,如果他们允许你访问日志文件。

It's probably good to have it turned off on a production server. You can always turn error logging on, if they'll give you access to the log file.

但是为了快速修复,你可以打开display_errors。只需记住在关闭配置为在客户端服务器上运行的代码时关闭它并设置日志记录。

But for a quick fix, you can just turn display_errors on. Just remember to turn it off and set up logging when you're done getting the code configured to run on the client's server.

<?PHP
ini_set('display_errors',true);

这篇关于Php没有报告IIS7上的任何错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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