Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6068877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:45:43+00:00 2026-05-23T09:45:43+00:00

When I simply echo something out of php file, I do not send any

  • 0

When I simply echo something out of php file, I do not send any headers intentionally, however – there are some default headers present anyway when I look at firebug response:

response headers:

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 23 Jun 2011 19:33:51 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.3.6-6~dotdeb.1
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip

I’m curious – are these default response headers set by the server(nginx) or by PHP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:45:43+00:00Added an answer on May 23, 2026 at 9:45 am

    I believe it is a combination of both… You can tell that “X-Powered-By: PHP/5.3.6-6~dotdeb.1” comes from PHP and “Server: nginx” comes from NGINX.

    You can alter the headers in PHP as follows:

    <?php
        header("HTTP/1.0 404 Not Found");
    ?>
    

    The gzip header most definitely comes from NGINX as it is compressing the output (html) to the browser. PHP can “add” to the headers by calling a function like the one above. Then the server combines it with the PHP headers and serves the request.

    It depends on your server whether or not the PHP headers take precedence over the server headers.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simply I need to write echo t${count} = $t${count} To a text file, including
I have a PHP file with one simple echo function: echo 'アクセスは撥ねりません。'; but when
Simply, are there any Java Developer specific Linux distros?
Let me be up front: I'm a PHP hack. There's probably some stupid mistakes
I have this simple php script <?php echo '<pre>'; // Outputs all the result
Imagine this simple form <form action=<?php echo $_SERVER['REQUEST_URI']; ?> method=post> <fieldset> <legend>Contact Me</legend> <label
Simply setting the SVN_EDITOR variable to mate does not get the job done. It
I use register_shutdown_function() to let PHP call a function at any time my script
I've recently started looking at the Google Maps API to try out something new
I am making a simple select from mySQL using PHP. I am doing something

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.