# Why does SERVER\_SIGNATURE header error not show up in any log on my system?

**URL:** <https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878>\
**Category:** Mezzio\
**Created:** [January 3, 2019, 10:48pm UTC](https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878 "2019-01-03T22:48:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennis-fedco](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/dennis-fedco/32/174_2.png) [@dennis-fedco](https://discourse.laminas.dev/u/dennis-fedco)\
**Post date:** [January 3, 2019, 10:48pm UTC](https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878/1 "2019-01-03T22:48:30Z")

</div>

The header error with `zendframework/zend-diactoros:2.0.2` when `SERVER_SIGNATURE` header is set is shown to me via triggering the `error` template of Zend Expressive. However, `error` template is generic and does not tell me what the actual error is, other than it is an HTTP 500 error.

The descriptive detailed error itself is not showing up…

- Not in my Apache log
- Not inside browser screen
- Not in Mozilla Developer tools when looking at Request/Response headers/body
- Not inside the error log set up inside my `samsonasik/ErrorHeroModule`
- Not via Whoops

It’s a ghosted error …

Somehow Expressive eats this error completely and only indicates it by throwing the generic 500 `error` template on my system. Is there a way to set up Expressive to show this error more descriptively somewhere ?

In my `pipeline.php` I have this:

```php
    $app->pipe(ErrorHandler::class);
    $app->pipe(ErrorHeroModule\Middleware\Expressive::class);

```

and I have Whoops factories defined in my `development.local.php`

Am I possibly missing anything? Should I check any particular configuration?

---

<div class="post-metadata">

**Author:** ![guidofaecke](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/guidofaecke/32/427_2.png) [@guidofaecke](https://discourse.laminas.dev/u/guidofaecke)\
**Post date:** [January 3, 2019, 11:18pm UTC](https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878/2 "2019-01-03T23:18:37Z")

</div>

You are not running by chance a “generic” PHP 7.2 (Debian) docker image?  
If yes, looks like I have the exact same problem. It just dies without any explanation…

If not, is there any interaction with SERVER\_SIGNATURE in your code or is it just enabled within apache?

---

<div class="post-metadata">

**Author:** ![xtreamwayz](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/xtreamwayz/32/27_2.png) [@xtreamwayz](https://discourse.laminas.dev/u/xtreamwayz)\
**Post date:** [January 4, 2019, 8:07am UTC](https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878/3 "2019-01-04T08:07:52Z")

</div>

This is probably related to a bug in version 2.0.2 and 2.1.0. A fix is available here: [https://github.com/zendframework/zend-diactoros/pull/349](https://github.com/zendframework/zend-diactoros/pull/349)

However we are waiting for someone to be able to merge to hotfix ☹

In the meantime you can use this `"zendframework/zend-diactoros": "^2.0 !=2.0.2 !=2.1.0"` in `composer.json` so it will skip the affected version and install patched versions when available.

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [January 4, 2019, 9:10am UTC](https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878/4 "2019-01-04T09:10:18Z")

</div>

> [@xtreamwayz](#):
>
> This is probably related to a bug in version 2.0.2 and 2.1.0. A fix is available here:

This does not solve the problem which @dennis-fedco means: no error reporting!  
I think the problem of error reporting should also be reported and fixed – additionally. (Btw. the description of the problem is contained internally in an exception, but is not output.)

---

<div class="post-metadata">

**Author:** ![xtreamwayz](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/xtreamwayz/32/27_2.png) [@xtreamwayz](https://discourse.laminas.dev/u/xtreamwayz)\
**Post date:** [January 4, 2019, 5:08pm UTC](https://discourse.laminas.dev/t/why-does-server-signature-header-error-not-show-up-in-any-log-on-my-system/878/5 "2019-01-04T17:08:01Z")

</div>

AFAIK this is a chicken egg story. You cannot have proper error reporting because in zend-expressive the exceptions are caught after the error handler middleware is started. The exception happens before that where the needed services are not yet operational. This has been discussed a few times on Slack. The only way to catch this is if you have functional tests for this or wrap the whole application in a second error handler.

In my opinion it should throw an exception and halt the system at that point, or at least in debug mode. It would have saved me a few hours debugging this a few days ago.
