Thank you for your reaction.
Very strange behaviour indeed. When I run the Silverstripe app everything works fine.
However, opening PuTTy, going to the /public folder and executing php index.php, I get the output below.
Francis@FFserv:/var/services/web/market/public$ php index.php
PHP Notice: Undefined index: SERVER_PROTOCOL in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php on line 388
ERROR [Notice]: Undefined index: SERVER_PROTOCOL
IN
Line 388 in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php
Source
379: /**
380: * Output HTTP headers to the browser
381: */
382: protected function outputHeaders()
383: {
384: $headersSent = headers_sent($file, $line);
385: if (!$headersSent) {
386: $method = sprintf(
387: “%s %d %s”,
- 388: $_SERVER[‘SERVER_PROTOCOL’],
389: $this->getStatusCode(),
390: $this->getStatusDescription()
391: );
392: header($method ?? ‘’);
393: foreach ($this->getHeaders() as $header => $value) {
394: header("{$header}: {$value}", true, $this->getStatusCode() ?? 0);
Trace
Monolog\ErrorHandler->handleError(8, Undefined index: SERVER_PROTOCOL, /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php, 388, Array)
HTTPResponse.php:388
SilverStripe\Control\HTTPResponse->outputHeaders()
HTTPResponse.php:351
SilverStripe\Control\HTTPResponse->output()
index.php:25
[2022-12-12 21:29:15] error-log.NOTICE: E_NOTICE: Undefined index: SERVER_PROTOCOL {“code”:8,“message”:“Undefined index: SERVER_PROTOCOL”,“file”:"/volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php",“line”:388}
PHP Notice: Undefined index: SERVER_PROTOCOL in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php on line 388
ERROR [Warning]: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)
IN
Line 392 in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php
Source
383: {
384: $headersSent = headers_sent($file, $line);
385: if (!$headersSent) {
386: $method = sprintf(
387: “%s %d %s”,
388: $_SERVER[‘SERVER_PROTOCOL’],
389: $this->getStatusCode(),
390: $this->getStatusDescription()
391: );
- 392: header($method ?? ‘’);
393: foreach ($this->getHeaders() as $header => $value) {
394: header("{$header}: {$value}", true, $this->getStatusCode() ?? 0);
395: }
396: } elseif ($this->getStatusCode() >= 300) {
397: // It’s critical that these status codes are sent; we need to report a failure if not.
398: user_error(
Trace
header( 200 OK)
HTTPResponse.php:392
SilverStripe\Control\HTTPResponse->outputHeaders()
HTTPResponse.php:351
SilverStripe\Control\HTTPResponse->output()
index.php:25
[2022-12-12 21:29:15] error-log.WARNING: E_WARNING: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) {“code”:2,“message”:“Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)”,“file”:"/volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php",“line”:392}
PHP Warning: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php on line 392
ERROR [Warning]: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)
IN
Line 394 in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php
Source
385: if (!$headersSent) {
386: $method = sprintf(
387: “%s %d %s”,
388: $_SERVER[‘SERVER_PROTOCOL’],
389: $this->getStatusCode(),
390: $this->getStatusDescription()
391: );
392: header($method ?? ‘’);
393: foreach ($this->getHeaders() as $header => $value) {
- 394: header("{$header}: {$value}", true, $this->getStatusCode() ?? 0);
395: }
396: } elseif ($this->getStatusCode() >= 300) {
397: // It’s critical that these status codes are sent; we need to report a failure if not.
398: user_error(
399: sprintf(
400: “Couldn’t set response type to %d because of output on line %s of %s”,
Trace
header(content-type: text/html; charset=utf-8, 1, 200)
HTTPResponse.php:394
SilverStripe\Control\HTTPResponse->outputHeaders()
HTTPResponse.php:351
SilverStripe\Control\HTTPResponse->output()
index.php:25
[2022-12-12 21:29:15] error-log.WARNING: E_WARNING: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) {“code”:2,“message”:“Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)”,“file”:"/volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php",“line”:394}
PHP Warning: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php on line 394
ERROR [Warning]: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)
IN
Line 394 in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php
Source
385: if (!$headersSent) {
386: $method = sprintf(
387: “%s %d %s”,
388: $_SERVER[‘SERVER_PROTOCOL’],
389: $this->getStatusCode(),
390: $this->getStatusDescription()
391: );
392: header($method ?? ‘’);
393: foreach ($this->getHeaders() as $header => $value) {
- 394: header("{$header}: {$value}", true, $this->getStatusCode() ?? 0);
395: }
396: } elseif ($this->getStatusCode() >= 300) {
397: // It’s critical that these status codes are sent; we need to report a failure if not.
398: user_error(
399: sprintf(
400: “Couldn’t set response type to %d because of output on line %s of %s”,
Trace
header(vary: X-Forwarded-Protocol, 1, 200)
HTTPResponse.php:394
SilverStripe\Control\HTTPResponse->outputHeaders()
HTTPResponse.php:351
SilverStripe\Control\HTTPResponse->output()
index.php:25
[2022-12-12 21:29:15] error-log.WARNING: E_WARNING: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) {“code”:2,“message”:“Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)”,“file”:"/volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php",“line”:394}
PHP Warning: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php on line 394
ERROR [Warning]: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)
IN
Line 394 in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php
Source
385: if (!$headersSent) {
386: $method = sprintf(
387: “%s %d %s”,
388: $_SERVER[‘SERVER_PROTOCOL’],
389: $this->getStatusCode(),
390: $this->getStatusDescription()
391: );
392: header($method ?? ‘’);
393: foreach ($this->getHeaders() as $header => $value) {
- 394: header("{$header}: {$value}", true, $this->getStatusCode() ?? 0);
395: }
396: } elseif ($this->getStatusCode() >= 300) {
397: // It’s critical that these status codes are sent; we need to report a failure if not.
398: user_error(
399: sprintf(
400: “Couldn’t set response type to %d because of output on line %s of %s”,
Trace
header(cache-control: no-cache, no-store, must-revalidate, 1, 200)
HTTPResponse.php:394
SilverStripe\Control\HTTPResponse->outputHeaders()
HTTPResponse.php:351
SilverStripe\Control\HTTPResponse->output()
index.php:25
[2022-12-12 21:29:15] error-log.WARNING: E_WARNING: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) {“code”:2,“message”:“Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)”,“file”:"/volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php",“line”:394}
PHP Warning: Cannot modify header information - headers already sent by (output started at /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427) in /volume1/web/market/vendor/silverstripe/framework/src/Control/HTTPResponse.php on line 394
Home » Het Stratégem
<link rel="shortcut icon" href="themes/simple/images/favicon.ico" />