Last month’s “Tech Support” column showed you how to install and configure the Alternative PHP Cache to speed up your PHP applications without changing any code. This month, let’s go one level deeper in the stack and tune your PHP installation itself.
While pre-packaged binaries are convenient, high-traffic sites typically need a roll-your-own PHP and Apache to fine-tune features and yield extra performance. Start with the latest version of PHP. The 5.1x branch has finally brought PHP 5 performance up to an acceptable level, and includes many advances over PHP 4. After downloading and unpacking the latest version of PHP 5 (5.1.4 as the magazine went to press), set your CFLAGS, an environment variable for compiler flags that are passed to gcc. The correct compiler flags depend on what kind of machine you have, what kind of CPU you have, how much cache…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: