為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

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.