PHP 在 IIS7 上未报告任何错误

发布于 2024-08-08 18:00:52 字数 585 浏览 4 评论 0原文

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

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

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

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

并且我已经尝试了 的所有参数组合error_reporting() 在这里找到: http: //www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

任何人都可以指出我另一种显示错误的方法吗?

顺便说一句:我正在使用 codeigniter,并且我尝试了它提供的 error_logging 功能但无济于事......

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,

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...

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!)...

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: I am using codeigniter, and I've tried the error_logging functions it provides to no avail...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傾旎 2024-08-15 18:00:52

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

但为了快速修复,您可以打开 display_errors 。只需记住在将代码配置为在客户端服务器上运行后将其关闭并设置日志记录即可。

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

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.

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);
命比纸薄 2024-08-15 18:00:52

尝试一下

ini_set("display_errors", 1);

,这可能是关闭的。

try

ini_set("display_errors", 1);

It's possible this is turned off.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文