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

  • Home
  • SEARCH
  • 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 981941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:37:17+00:00 2026-05-16T04:37:17+00:00

One page on my web site is a PHP script that uses exec() to

  • 0

One page on my web site is a PHP script that uses exec() to launch a separate PHP script which generates a PDF document.

The PDF may take 30 seconds to generate. When I hit the refresh button during this process, I am finding inconsistent behavior. On both my Mac and Windows local dev machines, refreshing the page will hang Apache. On my production Linux server, I don’t seem to experience the problem.

Why is this? I don’t care that my dev machines hang, I just want to be sure that it won’t ever happen in production.

  • 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-16T04:37:18+00:00Added an answer on May 16, 2026 at 4:37 am

    Do you run exec() every time the page is rendered, or do you have some logic to check whether the previous php script has finished?

    You may be generating a new PDF every time you refresh the page.
    If this takes a while, it might be hanging Apache because all the threads in its thread-pool are waiting for the exec’ed scripts to finish, if they’re not detached properly.

    If that is the case, it could certainly hang Apache on your production server.

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

Sidebar

Related Questions

I have a one page site that has PHP code in it. Once the
My website that sells products one page is called dvd.aspx which, using a sproc,
I have a one page web application, which means alot of javascript. External scripts
On my site, I have a PHP script which takes multiple source files (HTML,CSS,
I'm making a website that tend to handle all the request in one page
i am porting over a website from asp. i have one page that i
I am currently building an making my new website. It uses one page and
I have one master page which applies to all pages in this website. On
I'm working with a closed community site (PHP-based) of about 100 users, and one
i am developing a web tracker for my site, and one of the ways

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.