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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:12:15+00:00 2026-05-28T16:12:15+00:00

I have a bug which makes my website freeze in PHP. It occurs on

  • 0

I have a bug which makes my website freeze in PHP. It occurs on an input page, where the user fills some form, then the data is updated on the database, and then the user gets header redirected to another page.

What happens is that the whole website “branch” (subfolder, e.g. www.example.com/my_site, but not www.example.com/another_site) freezes, but no other Chrome accessed web location. After a while, I can navigate on that site again, I presume after the Chrome operation timed out.

However, this only seems to happen on Chrome, and on my Mac. I tested another Safari on that Mac, Chrome on a Windows, and both worked well. I must admit this testing wasn’t extensive, but I only have 1 Mac to test with. This little venn-like testing crossed browser and machine, which I think are the key factors.

Here is the code of the bugging page. If I comment out the header redirection, I get no dreezing. If I comment out the page update code, I get no freezing. I don’t see what causes the freeze here, really. Machine? OS? Header redirection? $_POST operation? try/catch handling? Combination? I have no idea.

EDIT: I now see a correlation between the amount of data passed through $_POST from the form to the page. If the data is relatively small, everything works correctly. However, when I get bigger data (i.e. HTML markup through a WYSIWYG editor field), the freeze occurs. How is Chrome affected by that? Maybe the redirect occurs before it can process it all? Even with ginormous amounts of data, it still works fine on Mac/Safari and Windows/Chrome.

<?php

require_once("script/initialize.php");

try
{
    if (isset($_POST["submit"]))
    {
        $page = page::from_post();

        try
        {
            $page->validate();

            $page->require_edit();

            $page->update_by_id();
            $page->set_tags_from_post();
            $page->set_categories_from_post();
            $page->set_workgroups_from_post();

            //header("Location: page_view.php?id=".$page->id);
        }
        catch (InputException $inex)
        {
            $smarty->assign("error", $inex->getMessage());
        }
    }
    else
    {
        $page = page::from_id(intval($_GET["id"]));

        $page->require_edit();
    }

    $smarty->assign("ressource", $page);
    $smarty->display_self();
}
catch (Exception $ex)
{
    $smarty->display_exception($ex);
}

?>
  • 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-28T16:12:17+00:00Added an answer on May 28, 2026 at 4:12 pm

    I had the exact same issue on a Mac in Firefox. When uploading small files <100kB it worked fine 90% of the time, but with larger files (e.g. photos from a digital camera) Firefox seemed to be waiting for a response from the server. When this was happening I couldn’t connect to the same domain from another Firefox window, but opening any other page worked fine.
    The server was working fine – I checked that on a different computer while the Mac didn’t have connection.
    3-5 minutes later it “woke up” and was working fine.

    Then I found out that there wasn’t an exit(); after the redirect header in the upload script. I inserted it, and now I haven’t seen any of these issues.

    Just want to confirm that a missing exit(); after a header("location: [URL]"); can cause browser(s) on a Mac to hang.

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

Sidebar

Related Questions

I have a very strange bug, which I believe is caused by some code
I have a bug in my PHP code that processes a form submission in
I have a interest in a reported bug which Microsoft have made available a
I have a strange bug. I launch a PHP Unit test Suite. At the
On my website I want the user to have the ability to login/logout from
I have a bug on my site which only appears in MSN Explorer. The
This must be a Delphi bug... I have a unit which is the basis
I have a bug I'm struggling to track down. I believe what's happening is
We have a bug in our application that does not occur every time and
We have this bug that only appears 30% of the time for the Release

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.