PHP opcode caching

Hi I have managed to install the latest webmin / virtualmin on my new VPS. Ive read about opcode caching programs.

Ideally I would like to cache one copy of a php file even if its called from many different virtual servers to keep memory requirements low.

I tried to install it from the shell but when I call apc.php it just says “No cache info available. APC does not appear to be running.”

So I dont know where I went wrong. Is there a way to easily install it from within webmin / virtualmin?

And why doesnt it come pre-installed? Who wouldnt want the opcode to be cached?


Hello. Op code caching does not work in the way you want. Unless you can mic APC’s abilities with memcache APC alone will NOT work for sharing across multiple servers.

Now if you install apc it doesnt magically work for all features. For storing temporary data the script you use must make use of the API provided by APC.

APC must be inabled via the php ini. On debian you should have a file named /etc/php5/conf.d/apc.ini with “”

Not sure about other distros.

Hope this helps :slight_smile:

Hi pcfreak,

Well I did add it to the php.ini file just like it said in this article:

But it still didnt enable it for even that virtual server. I restarted the box too.

There must be some way to cache the scripts so they dont have to be parsed each and every time someone requests a page right?

What do you guys use to do this?

Thanks again.