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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:13:31+00:00 2026-05-25T03:13:31+00:00

When running PHP with Apache I know that the php core and all libraries

  • 0

When running PHP with Apache I know that the php core and all libraries are loaded for each request. However, with PHP CGI, FastCGI, or using PHP-FPM the php process persists for generally 500-1000 requests before it’s restarted.

During that time, how does it handle loaded PHP classes or libraries?

Lets say I have a file that loads a massive library, will it load (then dump) the large library every request or keep it loaded for each new request I pass it?

By “loaded” I mean the classes are included (and parsed) but no objects are created.

How does APC play into this?

  • 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-25T03:13:32+00:00Added an answer on May 25, 2026 at 3:13 am

    For FCGI (PHP-FPM is FCGI as well), only the php binary and it’s binary libraries stay in memory. The PHP user-code does not.

    During that time, how does it handle loaded PHP classes or libraries?

    Kicks them off, get’s them new on a new request. You can easily test that by setting global variables, they are gone at the beginning of the new request.

    So the answer to your (bold) question is Let’s straight-forward answer: Yes, it get’s loaded and dumped per each request, no or! 🙂

    APC does the same. I need to research a link, there is a webserver written in PHP so it can keep everything in memory. Give’s you the real speed, however your applications code must properly deal with the changed request logic then.

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

Sidebar

Related Questions

I have an existing site in php running on Apache using the mod_rewrite plug-in.
So I've got a PHP-based site that's running on Apache. The URL's of the
I'm running PHP 5.2.8 on Apache 2.2.11 on Windows XP SP 3. In php.ini,
Is there a way to set php running under apache to create folders with
On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts
I have a request handler running in apache/mod_php which occasionally expands beyond the maximum
PHP 4.4 and PHP 5.2.3 under Apache 2.2.4 on ubuntu. I am running Moodle
I am running Ubuntu8.041. Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch configured Can't get file uploading
We have a custom PHP/MySQL CMS running on Linux/Apache thats rolled out to multiple
We're running CentOS 6 and PHP 5.3.8 (as an apache module) which should have

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.