Light Speed PHP


These tips and tools are standard recommendations for any PostNuke site. Do pay attention to the platform requirements listed with some of the applications, as many are not currently compatible with Windows XP.

Note

Many of the options covered next are of a highly technical nature. Optimization changes can have very minimal effect on smaller PostNuke sites. The speed-up suggestions are intended for server managers who have a specific task in mind for PostNuke and who know they will have load issues. Please apply any optimization changes with caution.


First, if you browse to the PostNuke administration page and scroll to the bottom of the first General section, there is an option called Activate Compression?. If you change that setting to Yes and submit the form, you turn on PHP's GZIP compression with PostNuke. This is a minimal improvement, but one that is noticeable, especially on text-laden sites. It is also browser specific, in that the few older browsers that cannot handle the compression do not receive it. GZIP compression can also be turned on through an edit to your php.ini file. Look for the following line and be certain it's not commented out.

 output_handler = ob_gzhandler 

The PHP4 engine was rewritten and improved greatly by the development team at Zend (www.zend.com). The Zend company offers a number of applications and utilities you might be interested in. First, the Zend Optimizer is an add-on to PHP that includes the Zend Encoder to improve runtime performance up to 40%. Most sites only see roughly 10% improvement with this product, but the good part is Zend Optimizer is free and runs on both Linux and Windows XP. Zend products also come packaged in very convenient installers.

Zend Accelerator is an add-on to PHP that caches a PHP script after it is compiled, so repeated requests for a script do not require parsing and compilation each time. Previously named the Zend Cache, Zend Accelerator is a commercial product and is now part of the Zend Performance Suite. Benchmark tests of various caching options often show they can cut a site's load time to a small fraction of the time it takes without any caching. Alone, Accelerator can often show a real-world load time improvement as high as 50%; the entire suite adds an additional 10% or more, along with features that improve load handling in other ways. Zend Accelerator and Performance Suite are both available only for Linux, Unix, and FreeBSD.

Even if the Zend Accelerator price is not an issue, you should take a serious look at Turck MMCache (turck-mmcache.sourceforge.net). With features very similar to Zend Accelerator and Performance Suite, MMCache has been shown to outperform both products in many benchmark tests. Turck MMCache is also free, compatible with Zend Optimizer, and runs on both Linux and Windows XP.

APC (http://pecl.php.net/package/APC/) is another free caching option whose 2.0 version has shown performance quite close to the two heavyweights listed previously. The earlier 1.1 version (apc.communityconnect.com) has much reduced performance but a few additional features. Both are open source and only for Linux and FreeBSD.

The ionCube PHP Accelerator (www.php-accelerator.co.uk) is comparable with the other caching add-ons. It is another free alternative, and though it is currently only available for Linux, Unix, and BSD, both Windows and OS X versions are planned for the future.

In addition to the encoding and caching improvements listed previously, using the FastCGI (www.fastcgi.com) extension to Common Gateway Interface (CGI) can also greatly improve PHP performance. It is compatible with both Apache and Internet Information Services (IIS) and runs on both Linux and Windows XP. Zend has even developed the WinEnabler product based on FastCGI specifically for Windows and IIS.



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net