"Fossies" - the Fresh Open Source Software Archive

Member "Apache-Compile-HOWTO/phpext.html" (9 Feb 2003, 8051 Bytes) of package /linux/www/old/Apache-Compile-HOWTO.html.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

7. PHP extensions

There are many different extensions available for php, which can be added in your php.ini

7.1. APC (Alternative PHP-cache)

7.1.1. What is APC

 

APC is the Alternative PHP Cache. It was conceived of to provide a free, open, and robust framework for compiling and caching php scripts. APC was conceived of to provide a way of boosting the performance of PHP on heavily loaded sites by providing a way for scripts to be cached in a compiled state, so that the overhead of parsing and compiling can be almost completely eliminated. There are commercial products which provide this functionality, but they are neither open-source nor free. Our goal was to level the playing field by providing an implementation that allows greater flexibility and is universally accessible. We also wanted the cache to provide visibility into it's own workings and those of PHP, so time was invested in providing internal diagnostic tools which allow for cache diagnostics and maintenance. Thus arrived APC. Since we were committed to developing a product which can easily grow with new version of PHP, we implemented it as a zend extension, allowing it to either be compiled into PHP or added post facto as a drop in module. As with PHP, it is available completely free for commercial and non-commercial use, under the same terms as PHP itself. APC has been tested under PHP 4.0.3, 4.0.3pl1 and 4.0.4. It currently compiles under Linux and FreeBSD. Patches for ports to other OSs/ PHP versions are welcome.

 
--www.apc.communityconnect.com/ 

The author made some performance-Tests with apc and it was real surprise. A PHP-Webpage with MySQL-queries in a loop (total 10 queries) was more than 50% faster

Contra APC: If you have other users on the system coding php they maybe are not comfortable with APC, because the changes are all ignored unless you reset the cache or restart Apache. The other way, namely that APC checks the php-script for a newer version before every run costs speed.

7.1.3. Building and installing

cd /usr/local

tar -xvzf apc-cvs.tar.gz

cd apc

./configure --enable-apc --with-php-config=/usr/local/bin/php-config

make
make install

cp modules/php_apc.so /usr/local/lib/php/extensions

echo 'zend_extension="/usr/local/lib/php/extensions/php_apc.so"' \
>> /usr/local/lib/php.ini
echo “apc.mode = shm” >> \
apc.mode = shm

Restart your Apache-Webserver. Try it out, create a php-file with the following content:

7.2. Zend-Optimizer (Do _NOT_ combine with APC-Cache!)

7.2.2. Download the binary

Origin-Site: https://www.zend.com/store/free_download.php?pid=13

TipRegister at zend.com
 

You have to register yourself at zend.com to get access to the download-page