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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:30:45+00:00 2026-06-09T07:30:45+00:00

I have had this problem before on WAMP Server and PHP 5.3 , and

  • 0

I have had this problem before on WAMP Server and PHP 5.3, and now facing it on Linux with PHP 5.4.

Basically, APC enabled or disabled makes no difference in performance, despite what the stats in apc.php say.

Here is a sample test script, which includes more than 30 Doctrine PHP files, and times it:

$t = microtime(true);
include 'Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php';
printf('%.3f s', microtime(true)-$t);
  • Result on Windows (Zend Server CE, PHP 5.4) : 0.001 s
  • Result on Linux (PHP 5.4 & APC 3.1.11) : 0.106 s

Note: even if not displayed in the above script, I’m actually using a full path to the file, and not relying on the include_path.

The result I get on Linux is the same whether apc.enabled is 0 or 1, so it looks like the opcode caching is just not working.

However, apc.php says:

apc.php

Packages (from the remi repository, CentOS 6.3):

php-5.4.5-1.el6.remi.x86_64
php-pecl-apc-3.1.11-1.el6.remi.1.x86_64

APC configuration:

apc.enabled=1 
apc.shm_segments=1
apc.shm_size=64M
apc.num_files_hint=1024
apc.user_entries_hint=4096
apc.ttl=7200
apc.use_request_time=1
apc.user_ttl=7200
apc.gc_ttl=3600
apc.cache_by_default=1
apc.file_update_protection=2
apc.enable_cli=1
apc.max_file_size=1M
apc.stat=1
apc.stat_ctime=0
apc.canonicalize=0
apc.write_lock=1

Last thing, yes, PHP does report APC as enabled:

var_dump(extension_loaded('apc')); // (bool) true
  • 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-09T07:30:47+00:00Added an answer on June 9, 2026 at 7:30 am

    I forgot to mention an important part of the problem: the web server is running on a linux virtual machine under Windows 7, and is reading the files from a shared folder on the host.

    I noticed that what slows down APC, is having to stat the files on this shared folder.

    Copying the files to the virtual machine fixes the problem.

    I’m however surprised that apc.stat=0 does not fix the problem alone, I would have expected it to stat the files just once, and unconditionally read everything from the in-memory cache afterwards.

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

Sidebar

Related Questions

Ok I have this problem that I've never had before, it's really bugging me.
I've had this problem for a while now but I have to remedy it
I've never had this problem before, I'm at a total loss. I have a
I have NEVER had this problem before and i am completely stumped. the site
I have had this problem crop up a few times and I can't figure
I have had this problem w/ two seperate WYSWYG editors in my rails application
I'm very confused and am hoping someone might have had this problem and be
Has anyone had this problem? My projects tend to have some long XML files
I have a problem with this script. At first I had the <div> s
(I have a problem that I illustrated in this question but had no correct

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.