APC Hosting: Compare Hosting
Oops! No Hosting Plans Match Your Search
You've selected a combination of features that none of the web hosts we profile offer. We suggest you remove your last filter or reset & start again.
Ask Our Experts
Need help with your hosting? Tell us exactly what you are looking for and we’ll do our very best to help. Please allow one working day for a response.
Please fill in all fields.
Thanks! Your request has been sent. We'll reply within 24 hours.
Recommended Host for APC
What is APC Hosting?
The Alternative PHP Hypertext Preprocessor Cache (APC) is an extension of the PHP Hypertext Preprocessor (PHP) programming language. Its purpose is to improve the caching and optimizing capabilities of PHP software applications. As a free, open source framework, it can enhance the speed and performance of your website
In computing terms, a cache stores data for easy retrieval in the future. It helps Internet browsers, such as Firefox and Chrome, more quickly serve requested Web pages to viewers. For instance, your favorite shopping site may be cached by your browser to decrease the bandwidth used in showing it to you. APC matches the dynamic nature of PHP code, and reduces the burden on your server in retrieving cached data. It accomplishes this by cutting down the number of repeat executions the PHP script must perform.
Looking for Speed? Check APC on PHP
Any time you are building a site and are looking at options for speed, you’re going to try and get every edge you can get. Server technology and bandwidth have a point of limiting returns and you are faced with building the page with the right coding and technology to attain the web experience you are looking for.
If you’re using PHP, then APC is one of those options. APC has been used quite a bit by Facebook, the popular social media site. As Facebook is filed with rich features, it has explored quite a bit of the leading accelerating code strategies. A number of contributors have led to a mature codebase as a result of Facebook’s drive on APC adoption.
At one time, APC was to be included into the PHP core, but has been occluded by the push to Optimizer Plus, a competing technology in the world of PHP. Despite the delay, it is still widely used by developers from throughout the world of programming and is one of the most widely used PHP opcode caching solutions in use today.
PHP is often used for Web pages with frequently updated content. PHP is a dynamic scripting language and on a page that uses it, every time there is a request for a page, the server must first parse the code in the PHP script in order to generate the resulting HTML code seen by a visitor's web-browser. This way, each visitor is presented with a fresh copy of each page as the PHP script pulls data from a database and any relevant changes in the database can automatically generate the HTML code that is presented to the next visitor. So if your site features content from a database, and that database's information is constantly updating, the PHP ensures viewers will always see the most current data. The problem occurs when the necessary re-running of PHP scripts taxes the server and creates a lag.
So APC consolidates the execution and stores the operation code, or opcode. Specifically, the parsing and compiling steps are skipped, and the APC simply executes the stored opcode when the PHP script is requested. A problem might exist however where there is a need to re-run PHP scripts for data that might not have changed in the first place, which is redundant and wasteful. The operation can be taxing on the server, consume resources and create slow or lagging behavior. When a developer implements APC in their PHP code, they can cut down on repeat PHP script executions. This means some parsing operations can be skipped as well as parsing and compiling steps.
APC can be configured to capture and store the opcode so that it can be easily called up and executed when the script calls for it again. The result – acceleration and a better user experience without these needless delays. The page rendering is more efficient, faster and uses less resources.
Generally, it is simpler to implement APC on private server plans than on shared hosting plans. This is likely due to the space and security concerns of hosting multiple sites on one shared server.
However, if you'd like to install APC in a Virtual Private Server (VPS) environment, a number of hosting providers will be glad to support the framework. Once you have the APC, be aware that some tweaking may be required to meet the needs of your site.
APC Hosting Frequently Asked Questions
What exactly is APC?
APC, or Alternative PHP Cache, is a framework that caches PHP bytecode compiler output in shared memory. In doing so, APC helps reduce disk load and speeds up applications with a big code base.
What are the implications for hosting?
As a rule of thumb, APC is used on dedicated servers or VPS hosting. Implementation on shared plans can be difficult or impossible due to a number of reasons (namely resource utilization). In case you plan on using APC on VPS, you may also need to consult your host.
Why can’t I use it on shared plans?
In theory, APC can be used on some shared plans as well, but the process may involve a lot of configuring and is for advanced users only. However, many hosts offering shared plans won’t let you use APC due to hardware limitations – as you could easily use up more memory than you’re supposed to. APC operates on the server level, so you usually need a VPS or dedicated hosting plan.
There are other types of caching out there. What’s different about APC?
First of all, APC is the most widely used PHP caching solution. This means it has a big user base and gets a lot of attention. Alternatives include Memcached, which is a generic caching platform rather than a PHP cache solution. APC is designed solely for PHP and, therefore, offers good performance for sites with a lot of frequently accessed PHP scripts.
What sorts of sites in APC good for?
Obviously, APC is designed for PHP, so you need a site with loads of PHP. In addition, it is best suited to high-traffic sites, with a lot of requests, a lot of frequently updated content and other sites that may need to run and rerun a lot of PHP scripts.
How do I install APC on a VPS or dedicated server?
You need root access and the ability to install PECL modules. The process differs depending on your platform, but you need to know how to install PECL extensions. If you’re on Windows, you also need a DLL and a temp path. In other words, you need to do a bit of research before trying to install APC.
Can I install APC on a Linux-based cloud server?
Yes, you can install APC on Linux cloud servers. You need to have a VPS with root privileges and a standard LAMP stack installed on the server. The process is similar to a standard installation using PECL, but you will also need to make a few tweaks. For example, you will need to allocate the right amount of RAM to APC (which depends on your hosting package).
How exactly does APC work? How will it speed up my site?
Without APC, PHP scripts are parsed, compiled, and executed prior to output. With APC enabled, the server can skips parsing and compiling when the necessary data is cached. It goes straight from the PHP script to execution, using the cache instead. This means the server does not have to parse the code in order to generate HTML displayed on your site.
Wasn’t APC supposed to be integrated into PHP? What happened?
Yes, it was originally planned that APC would be included into the PHP core with the release of PHP 6. However, the focus has shifted to alternative solutions such as Zend Opcache and Optimizer Plus. The last APC release was published in September 2012.
Is APC development still active?
APC development has stalled and it’s unclear whether any new releases are coming. That said, APC is still relatively popular and used by several big companies and services, including Facebook.
Is APC free to use? What license is it published under? Does it support PHP 5.x?
Yes, APC is free and open-source. It was published under the PHP license. APC supports all PHP versions up to PHP 5.4, but only in the last beta release, not the last stable release.
I think I’ll go with something that can handle PHP 5.5 and later. What are my options?
In case you need an actively maintained PHP accelerator compatible with PHP 5.5 and later, you will have to choose XCache, use Zend Opcache (integrated with PHP 5.5), or Windows Cache Extension for PHP (release VC11 NTS or later). All three are actively maintained and updated.
How does APC compare to these actively maintained PHP accelerators? What will I be missing out on?
Apart from support for PHP 5.5 and subsequent PHP releases, APC still has a good feature set. Unlike Zend Opcache, it supports object and session cache, as well as the file cache. Windows Cache trumps it by offering resolve file path cache, but lags behind in terms of optimization.
Why is APC still widely used despite the fact that it is practically defunct?
Ease of use and familiarity with APC are probably the main reasons for its widespread use. However, as more and more sites are created in new and unsupported PHP releases, APC will eventually start to fade away.
Will APC support add to my hosting bill?
No. If you were planning on using VPS or dedicated hosting, APC will have no effect on the price of hosting your site. However, if you feel you need APC, but use shared hosting, chances are you will have to upgrade to VPS, cloud or dedicated hosting.