PHP Accelerator 1.3.2
Posted on: 07/30/2002 03:55 AM

Nick Lindridge has released PHP Accelerator 1.3.2:

"Every time a PHP script is accessed, the PHP engine must open the script file and read, parse, and compile the file contents into a compiled form. Only then can the compiled code be executed. With scripts often including other scripts, this work can become a significant part of the overall time to deliver a page. It can also impact I/O performance, and require much dynamic memory allocation that in itself can be time consuming.

The reality, however, is that most PHP scripts never change from one access to the next; indeed they may never change for weeks, months, or even years. The Accelerator works to eliminate the penalty of processing scripts that never change, and by caching the compiled scripts in shared memory, delivers significant performance gains as a result. Note that this is very different to caching script output. PHPA doesn't do this, scripts remain fully dynamic, and if they do change then PHPA caches a new version - they just run faster! "

New in 1.3.2:

The main change is that activation keys are removed. This version is also compatible with ionCube PHP Encoded files ( if the ionCube decoder is loaded. PHPA will not currently cache encoded files for security reasons, but unencoded files are cached as usual.

The are a few minor bug fixes.

The startup behaviour has changed slightly, and should avoid the need to flush the cache during startup scripts. See the changes section below.

New php.ini entries

; Sets the period in seconds before a process waiting to get a lock on the
; shm cache will log a warning to say that it's been trying for a while.

phpa.shm_lock_threshold0 = 10

; Sets the period in seconds before a process waiting to get a lock on the
; shm cache will decide to break the cache lock even if the process holding
; the lock is still alive. Do not change this unless advised to as it may
; cause PHPA to kill processes that are legitimately using the cache

phpa.shm_lock_threshold1 = 10

Cache Display Tool
Verbose mode now displays times and memory sizes in a more human readable format.

Support for ionCube Encoded Files
Files encoded with the ionCube Encoder are now supported. Note that if installing the decoder for encoded files, the decoder extension must be
installed *first*.


zend_extension = /usr/local/lib/
zend_extension = /usr/local/lib/

PHPA logs less uninteresting information to the error log to keep it cleaner.

All php.ini entries related to activation keys are no longer recognised and have no effect.

If the php.ini setting 'shm_release_at_exit' is set, (which is the default) then any existing shm cache at *startup* will be deleted, in addition to
at exit. The rationale for this is that if the cache should be deleted at exit, then it shouldn't exist at startup. If it does then it's probably because of an unclean shutdown. The new behaviour should ensure a clean start, and the use of 'phpa_cache_admin -D' before startup should
no longer be required.

There are a few minor fixes. The most significant of these are:

* global functions (i.e. any non-method) can now be defined inside a method

* a problem where include_once() or require_once() would sometimes process
a file already read with require() or include() is fixed.
Using require_once() or include_once() worked correctly, and is always
recommended as safe design practice over include/require unless there is
a reason to not use it. Performance of include_once() and require_once()
is immeasurably different to include() and require() but safer.


Printed from Linux Compatible (