x
Loading
 Loading
Hello, Guest | Login | Register

Optimizing PHP Install, Part Two

Learn how to install and configure the Alternative PHP Cache

The May “Tech Support” column (http://www.linux-mag.com/2006-05/tech_01.html, available after July 15) showed you how to utilize memcached, a high-performance, distributed memory object caching system, to alleviate database load and speed up your PHP applications. In this months column, let’s move down a little in the stack and look at a way that to serve your existing PHP code faster.
PHP is an interpreted language, which means the Zend Engine must parse your PHP source code into byte code every time the script is run. While interpretation offers you flexibility and convenience as compared to a compiled language, the process of producing byte code again and again is wasteful and time-consuming.
Enter the Alternative PHP Cache (APC), a free, open, and robust framework for caching and optimizing PHP intermediate code. A major part of the APC framework is a cache that allows PHP to generate the opcode the first time a script is run and then use the cached copy on subsequent executions. APC, which is licensed under the same license as PHP, is available for download at http://pecl.php.net/package/APC.
You have two options when installing APC. The first is to install it directly from PECL. That’s as easy as running pecl install APC as root. However, this can be problematic in some situations, and you may prefer to perform the installation manually. To do that, unpack the APC tarball and run the following commands:
$ phpize
$ ./configure ––enable-apc \
––enable-apc-mmap…

Please log in to view this content.

Not Yet a Member?

Register with LinuxMagazine.com and get free access to the entire archive, including:

  • Hands-on Content
  • White Papers
  • Community Features
  • And more.
Already a Member?
Log in!
Username

Password

Remember me

Forgotten your password?
Forgotten your username?
Read More
  1. Liberty Alliance Announces March 10 Santa Clara Identity Management Implementation Workshop
  2. Centrify DirectControl 4 Wins the 2008 Global Excellence Award for Best Identity Management Software
  3. SANRAD Achieves Record Sales in Q4 2007 for iSCSI Solutions Optimized for Server Virtualization and Disaster Recovery
  4. iJET Enhances Worldcue(R) Global Control Center with Employee Threat Exposure Dashboard
  5. Bloombase Technologies Accelerates Enterprise Information Security With Hifn Data Security Card
Follow Linux Magazine
Rackspace