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 8095343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:05:46+00:00 2026-06-05T21:05:46+00:00

I have a PHP application that I have been having some problems with, some

  • 0

I have a PHP application that I have been having some problems with, some pages take a very long time to load.

After a couple of hours I have figured out the problem, but I have no idea how to fix it.

The problem seems to be with the header Connection: keep-alive. I used a Firefox plugin called “Tamper Data” which allows you to “tamper” with the headers and stuff. Once I used that tool to change the connection header to Connection: close the delay on some pages stopped.

How, in PHP, can I make sure that the Connection: close header is used?

I tried putting header("Connection: close"); at the top of a PHP file, and reloaded the page. It still sends the Connection: keep-alive header, not the one I am trying to send.

How can I achieve what I am trying to do?

EDIT: I have just realized that on this subdomain the content-length header is not sent at all for most pages. It is only sent right after a form submission followed by a redirect.

EDIT 2:

This is the page: http://volunteer.essentialtransit.com/job/13/just-a-test-at-eta/

Click the “Apply now” link and fill out some random txt, you don’t need to attach a file. Notice when you are redirected back to the “job” detail page that it will take a very long time to load.

  • 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-06-05T21:05:48+00:00Added an answer on June 5, 2026 at 9:05 pm

    So, I determined what the problem was, and found a work-around to this issue.

    The script that processed the form just processed the input and redirected to another page, but it actually didn’t output anything. On most pages on the site the content-length header is either not sent, or is set at the correct value. But for some reason when posting to a page, and then redirecting without the processing script outputting anything to the browser, the content-length was being set at 0.

    I tried setting the content-length myself, but didn’t have much luck, as it didn’t seem to make a difference.

    So, all I did was make the processing script have some output. So now when the form is submitted the processing script outputs a page with a redirect script (and a ‘click to continue’ message just in case) that leads to the correct page. So while this adds a very brief delay between the form submission and the correct page being seen it causes the content-length to be set correctly and the problem is solved.

    While this is not an ideal solution it is manageable and makes the script work.

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

Sidebar

Related Questions

I have a php application that is installed on several servers and all of
I have a PHP application that sends email using the pear Mail function. Unfortunately
I have a PHP application that is built around the MVC architecture without any
I have a php web application that uses big cookies to store a lot
We have a PHP/MYSQL application that collects user input, including special characters like ø,ü,ñ,
I have written a PHP application that uses Objects heavily. Added, deleting, updating etc..
I have a PHP based application that I need to work on both a
I am writing a PHP application that will have the ability to edit settings
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've
We have an in-house PHP web application that is a financial analysis tool for

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.