【发布时间】:2010-11-19 01:23:25
【问题描述】:
对于我的开发环境,我最近从 IIS 上的 php 5.2 w/ ISAPI 迁移到 IIS 上的 PHP 5.3 w/ fastCGI,当我遇到错误(例如函数名称不正确)时,我习惯于 PHP 报告致命错误等等...到浏览器。我间歇性地收到 HTTP 500,而不是收到错误消息。如果使用 firefox 浏览,则不会发生这种情况。
这似乎与 IE 缓存内容类型或类似的 HTTP 代码有关。我的理由是,如果我消除了有问题的代码块并刷新页面(在 IE 中),然后将有问题的代码放回,我会看到错误消息。
有人知道我应该看什么吗?
display_errors 设置为 On....
试图在 cmets 中添加代码,但它很难看,所以我在附加:
示例代码:
索引.php
<?php
php_infowrong();
?>
如果我输入我得到的网站的 URL:
在 Firefox 上,我收到:PHP 致命错误:在第 2 行的 D:\Web\pathtowebsite\index.php 中调用未定义函数 php_infowrong()
在 Internet Explorer 上我收到:HTTP 500 Internal Server Error
如果我将 index.php 更改为
<?php
phpinfo();
?>
然后 IE 和 Firefox 都会给出正确的 php_info 页面。
如果我将 index.php 改回原来的错误形式并刷新页面,那么 IE 将显示:PHP Fatal error: Call to undefined function php_infowrong() in D:\Web\pathtowebsite\index.php
【问题讨论】:
-
示例代码:index.php 如果我输入网站的 URL,我得到: 在 Firefox 上,我收到:PHP 致命错误:在第 2 行的 D:\Web\pathtowebsite\index.php 中调用未定义函数 php_infowrong() 在 Internet Explorer 上我收到: HTTP 500 内部服务器错误如果我将 index.php 更改为 那么 IE 和 Firefox 都会给出正确的 php_info 页面。 >继续下一条评论
-
如果我将 index.php 改回原来的错误形式并刷新页面,那么 IE 将显示:PHP Fatal error: Call to undefined function php_infowrong() in D:\Web\php53.imperialcable .com\public\index.php 在第 2 行
-
已编辑,因为 cmets 难以阅读
标签: php internet-explorer http fastcgi