Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

web developer here: Firefox doesn't give me feedback on error that is useful

  • 3 ответа
  • 0 имеют эту проблему
  • 8 просмотров
  • Последний ответ от cor-el

more options

I'm a web developer, writing PHP on a Windows server. When there is a server-side error, Firefox doesn't give me any useful information, it just says "There's a problem..." (see picture) Well, yes, I know, I'm the one who did it, but I need to know exactly what the problem is.

NOTE: error handling and detailed error pages are turned ON - this is not a server issue.

FF behaves this way in both normal and private windows.

Chrome/Edge/Chromium show me the full error message, Firefox does not, as you can see in the images. I prefer Firefox's developer tools to Chrome's, but this destroys my productivity as I have to stop, switch browsers, copy/paste the URL, go back...and so on. I'd rather not switch back to Chrome if I don't have to.

Is there a setting in Firefox that will let me see the server's information?

I'm a web developer, writing PHP on a Windows server. When there is a server-side error, Firefox doesn't give me any useful information, it just says "There's a problem..." (see picture) Well, yes, I know, I'm the one who did it, but I need to know exactly what the problem is. NOTE: error handling and detailed error pages are turned ON - this is ''not'' a server issue. FF behaves this way in both normal and private windows. Chrome/Edge/Chromium show me the full error message, Firefox does not, as you can see in the images. I prefer Firefox's developer tools to Chrome's, but this destroys my productivity as I have to stop, switch browsers, copy/paste the URL, go back...and so on. I'd rather not switch back to Chrome if I don't have to. Is there a setting in Firefox that will let me see the server's information?
Приложенные скриншоты

Все ответы (3)

more options

Firefox doesn't process PHP data, you need to use a local server that process the PHP data and sends HTML content to the browser.

You need to add a php directive at the top of the pages to instruct the server to send the pages as text/html and not as application/x-httpd-php.

Полезно?

more options

This is the first time I've posed this question and gotten a valid answer, thank you.

Question: is there a setting or workaround to change this behavior? Adding the header directive didn't change the results, it still hits the browser as x-php.

I downloaded an extension to let me change the Accept request header, but that didn't help.

Полезно?

more options

You need to have server software running locally that processes the PHP code and that sends the resulting file as text/html instead of application/x-httpd-php.

In the past we proposed adding a PHP directive like one of these.

<?php header('Content-Type: text/html; charset=utf-8'); ?>
<?php header('Content-Type: text/html; charset=utf-8'); header('Vary: Accept'); ?>

Полезно?

Задать вопрос

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.