为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Firefoox not showing PHP Errors

  • 7 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 Paul

more options

Hi,

I am a long time Firefox users and promoter. Due to laptop theft I had to move to a new laptop WIN 11 and Firefox is v 117.0

When developing php pages the errors won't display. The same pages display the errors in Chrome (I know that's a bad word :)).

Is there a setting that I am missing in Firefox to display errors as it did on my old laptop??

Thanks,

John

Hi, I am a long time Firefox users and promoter. Due to laptop theft I had to move to a new laptop WIN 11 and Firefox is v 117.0 When developing php pages the errors won't display. The same pages display the errors in Chrome (I know that's a bad word :)). Is there a setting that I am missing in Firefox to display errors as it did on my old laptop?? Thanks, John

所有回复 (7)

more options

What kind of PHP errors are you referring to? die() responses, http_response_code() calls, a custom error page renderer, etc.?

And what does Firefox display instead?

more options

Firefox doesn't know about PHP code, the web server needs to process the PHP code and send the resulting HTML code to the Firefox browser.

You may need to add a php directive at the top of the pages to instruct the server to send the pages as text/html.

more options

Sorry about the typo in Firefox...result of too long of a day.

PHP can print errors to the page as text.

It simply lists the error created (if any) from the page based on the PHP settings to display errors.

As noted before Firefox on my old laptop WIN 10 and current versions of Firefox (It was on auto update) displayed as PHP instructs the html output.

This version simply has a blank white page.

Chrome does but not FireFox. I was assuming that it is a settings somewhere on FireFox...developer section??

What do you think?

Thanks to all

more options

Can you attach screenshots of what Chrome shows vs what Firefox shows?

Also, it might be helpful to press F12 (developer tools) before loading the error page to see what HTTP status code (#5 in attachment) and content (#6 in attachment) are being returned.

more options

Thanks again, here are screen shots for both Firefox and Chrome. They are named accordingly.

You can see the PHP generated error.

The F12 dev tools shows nothing that is actionable. Just in case it something obvious that I am doing wrong...I am sure it is a setting somewhere on this new laptop.

I attached that as well.

Thanks again for taking time to review this. I truly appreciate it.

more options

Thanks again to all, I have figured it out...it was a setting in PHP. Again due to the new install.

Thanks for your time.

more options

Hello,

I am glad to hear that your problem has been resolved. If you haven't already, please select the answer that solves the problem. This will help other users with similar problems find the solution.

Thank you for contacting Mozilla Support.