Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Firefoox not showing PHP Errors

  • 7 trả lời
  • 0 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi 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

Tất cả các câu trả lời (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.