1

One of my server has $_SERVER['HTTP_CONNECTION'] is set to close need to set it to keep-alive in my phpinfo() any idea where to change that?

Apache config has

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 100

Am I doing something wrong?

BlackBird
  • 11
  • 1
  • 4

2 Answers2

1

$_SERVER['HTTP_CONNECTION'] is the value of the HTTP Connection header sent as part of the request by the client. It is not a server setting. You cannot change it and you cannot force the client to send another value in that header. It's up to the client.

deceze
  • 510,633
  • 85
  • 743
  • 889
  • 1
    On another server of mine its set to $_SERVER['HTTP_CONNECTION'] = "keep-alive" in my phpinfo – BlackBird Jun 28 '12 at 10:45
  • What does that mean? It's still a value sent by the client. You're probably just seeing the same value as output by `$_SERVER`. – deceze Jun 28 '12 at 10:50
  • 2
    When i do phpinfo() on two different servers. Apache Environmental variable HTTP_CONNECTION for one of the server is close and one of the server is keep-alive. How does that vary? – BlackBird Jun 28 '12 at 10:51
  • Not sure. Inspect your traffic in detail, who is sending what header. See http://en.wikipedia.org/wiki/HTTP_persistent_connection – deceze Jun 28 '12 at 10:54
0

Contents of the Connection: header from the current request, if there is one.

Biju B Adoor
  • 528
  • 4
  • 6