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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:39:10+00:00 2026-05-29T16:39:10+00:00

Im having a problem where we run an upgrade for our web application. After

  • 0

Im having a problem where we run an upgrade for our web application.

After the upgrade script completes and access the web app via the browser, we get file not found errors on require_once() because we shifted some files around and PHP still has the old directory structure cached.

If we have the default 120 seconds for the realpath_cache_ttl to expire, then everything resolves itself, but this is not acceptable for obvious reasons.

So I tried using clearstatcache with limited success. I created a separate file (clearstatcache.php) that only calls this function (this is a one line file), and placed a call to it in our install script via curl:

<?php
clearstatcache(true);

This does not seem to work, however if I call this file via the browser it immediately begins to work.

I’m running PHP version 5.3

I started looking at the request header differences between my browser and curl, and the only thing I can see that might matter is the PHPSESSID cookie.

So my question is, does the current PHPSESSID matter (I don’t think it should). Am I doing something wrong with my curl script? I am using

curl -L http://localhost/clearstatcache.php

EDIT: Upon further research, I’ve decided this probably has something to do with multiple apache processes running. clearstatcache will only clear the cache of the current apache process – when the browser is making a request a different apache process serves the request, and this process still has the old cache.

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

    Given that the cache is part of the Apache child process thanks to mod_php, your solution here is probably going to be restarting the Apache server.

    If you were using FastCGI (under Apache or another web server), the solution would probably be restarting whatever process manager you were using.

    This step should probably become part of your standard rollout plan. Keep in mind that there may be other caches that you might also need to clear.

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

Sidebar

Related Questions

I'm having a problem trying to run my sql script into oracle using sqlplus.
I'm having a problem installing Spree in a Rails app. when I run gem
I am having a problem in ScrollView. When i run my application on X10i
I'm having a problem converting my program from VS2005 to VS2008. When I run
I'm having a problem, where I wish to run several command line functions from
We are having problem with the server migration. We have one application that are
We've having trouble deploying a web service that works in our development environment, but
I am having problem with random number generation in c#. If I RUN this
when i try to run the code am having problem in the output. when
I seem to be having a weird problem. In our services layer, we are

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.