Mar 03 2006

Serve PHP Pages faster using Ioncube PHP Accelerator.

Tag:tepezcuintle @ 20:40

Greetings fellow penguincares reader.

I am going to show you a way to make your existing apache server a bit faster
if your site runs php code this will help your server run faster and make your users happier.

A little background for you:

I run penguincares from a residential dsl line and a simple
IBM netvista Pentium 500 with 300 megs of ram.

Penguincares is not a high end server just a lowly home server.
Still I want to be able to server pages fast and so
far it works fine but I want to tweak apache variables to
speed up the process of certain pages.

The most popular part of this site is my blog at

http://penguincares.no-ip.org:9090/mylinuxtips

the blog is run using WordPress and uses PHP .

I came across ioncube’s php accelerator so I will give it a try.

if you follow this instructions you will be able to install it on your own
site.

first check the version of php installed on your site

run php -v

[root@penguincares ioncube]# php -v
PHP 4.3.9 (cli) (built: Oct 14 2004 18:14:28)

so I have php 4.3.9

once you know the version of php installed on your server you
can go to

http://www.phpaccelerator.co.uk/download.php

and find the php version that matches your php configuration and also
your linux version.

Create a folder to download the tar file

mkdir ioncube

cd iconcube

wget http://www.phpaccelerator.co.uk/releases/linux_i686-glibc2.1.3/1.3.3r2_4.3.0/php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3.tgz

then tar -zxvf php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3.tgz

cd into the extracted files folder

[root@penguincares ioncubeupdate]# cd php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3

then read the install file and also the configuration file.

they will be posted below for your own reading.

The first thing I noticed after reading the instructions is to copy the *.so file to your /usr/local/lib
folder

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# cp php_accelerator_1.3.3r2.so /usr/local/lib

then locate your php.ini file to edit so you can let php know that you added a new zen extension.

you can locate your php.ini file by creating a file called .

test.php and add this code to that file

< ? phpinfo() ?>

once you have done that access that file

http://www.yourwebsite.com/test.php

it will let you know where that file is located.

to edit the file do

cp php.ini php.ini.backup

that way you can keep a backup of that file in case things go wrong.

then do

pico -w php.ini

and find this section.

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

scroll down pass the windows extensions and add the following

; PHP Accelerator extension
zend_extension=”/usr/local/lib/php_accelerator_1.3.3r2.so”
phpa.cache_dir = /tmp/ioncube

then save the file and then create a folder inside your temp directory

mkdir /tmp/ioncube

this will be the directory where apache will store all the cached pages.

then find out the name and group of the apache user usually you can find that by
looking at your httpd.conf file

my configuration is the following

User nobody
Group nobody

so do chown nobody:nobody /tmp/ioncube

you will be able to see that the group and owner permissions
for the ioncube folder belongs to user nobody and group nobody

drwxr-xr-x 2 nobody nobody 4096 Mar 3 14:59 ioncube

ATTENTION: SOMETIMES YOU MIGHT BE RUNNING APACHE AS USER APACHE GROUP APACHE
SO PAY ATTENTION TO THAT. AND CHANGE THE STEPS ABOVE TO MATCH YOUR CONFIGURATION.

once you have done that you will stop your apache server.

cd /etc/init.d

./httpd stop

./httpd start

check for any errors while the server is loading. Usually if you get
an error you will get a message telling you that you downloaded the
wrong version of the ioncube accelerator

then do

php -v

you will see

[root@penguincares tmp]# php -v
PHP 4.3.9 (cli) (built: Oct 14 2004 18:14:28)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with the ionCube PHP Accelerator v1.3.3r2, Copyright (c) 2001-2002, by Nick Lindridge
[root@penguincares tmp]#

sweet so far so good

then create another php file this one is called

testphpa.php

and add this code to this page.

< ?
var_dump($GLOBALS['_PHPA']);
?>

save the file and then access the file at http://www.yoursite.com/testphpa.php

and you will see this

array(3) { ["ENABLED"]=> bool(true) ["iVERSION"]=> int(10303) ["VERSION"]=> string(7) “1.3.3r2″ }

if you see the word ENABLED things are working fine.

the installation of ioncube should be complete

remember to delete test.php and testphpa.php files so you don’t disclose server information

then access some php enabled pages on your site and you will see that the pages will load normally
but once you access those pages again they will display faster since the php files have been
cached and are serverd faster since php does not have to compile the code again.

check the /tmp/ioncube folder and you will see some files there.

-r——– 1 nobody nobody 15915 Feb 7 2005 phpa_770_3843626
-r——– 1 nobody nobody 2096 Feb 28 2005 phpa_770_3843627
-r——– 1 nobody nobody 3212 Dec 17 2004 phpa_770_3941634
-r——– 1 nobody nobody 3212 Dec 17 2004 phpa_770_3941658
-r——– 1 nobody nobody 2676 Dec 17 2004 phpa_770_4121538
-r——– 1 nobody nobody 1250 Dec 17 2004 phpa_770_4121539
-r——– 1 nobody nobody 9102 Dec 17 2004 phpa_770_4121540
-r——– 1 nobody nobody 188859 Dec 17 2004 phpa_770_4121541
-r——– 1 nobody nobody 3096 Dec 17 2004 phpa_770_4121543
-r——– 1 nobody nobody 379 Dec 17 2004 phpa_770_4121544
-r——– 1 nobody nobody 3960 Dec 17 2004 phpa_770_4121545
-r——– 1 nobody nobody 160561 Dec 17 2004 phpa_770_4121546
-r——– 1 nobody nobody 613 Mar 3 14:34 phpa_770_4498076
-r——– 1 nobody nobody 0 Mar 3 14:39 .pruned

for some reason the dates on those files are from months and years way long ago
and i believe that is how ioncube creates those files so I am not going to
worry about that unless I see problems with the server.

You can safely delete those files if you want if you have too many but ioncube extension should
delete old files once they have reached a certain time. Probably you don’t have to
delete them manually but if you have any issues you can create a cron job that will
clear the files inside the /tmp/ioncube folder

you can delete those files using

rm -rf phpa_* and that will clear those files from the /tmp/ioncube folder

new ones will be created any time any php content is accessed on your server.

############# HOW TO CONTROL AND VIEW CACHED INFORMATION #####################

go back to the source directory of the ioncube folder
and you will see there is a file

-rwxr-xr-x 1 tepezcui users 23148 Jan 14 2003 phpa_cache_admin

do

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# mv phpa_cache_admin phpaadmin

basically renames the file to phpaadmin

then mv phpaadmin /usr/bin

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# mv phpaadmin /usr/bin

then chmod 700 /usr/bin/phpaadmin ( prevent anyone but root to access that file )

then do

phpaadmin –help

you will see all the available options

try phpaadmin -v -f

on my server I see this

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# phpaadmin -v -f
11h22m18s:12h:/home/residentevil4/web/mywebmail/config/config.php:37.4KB:770:1488903:2004-12-17 20.11.18:2006-03-03 14.41.16:f
11h28m48s:12h:/home/residentevil4/web/mylinuxtips/wp-admin/menu.php:22.0KB:770:1603600:2005-02-06 20.15.06:2006-03-03 14.59.01:f
11h28m48s:12h:/home/residentevil4/web/mylinuxtips/wp-admin/admin-header.php:7.9KB:770:1603605:2005-04-20 15.19.07:2006-03-03 14.59.01:f
11h28m48s:12h:/home/residentevil4/web/mylinuxtips/wp-admin/admin.php:13.2KB:770:1603616:2005-05-09 07.06.45:2006-03-03 14.59.01:f
11h28m48s:12h:/home/residentevil4/web/mylinuxtips/wp-admin/admin-functions.php:233.7KB:770:1603617:2005-05-09 14.26.53:2006-03-03 14.59.01:f
11h28m48s:12h:/home/residentevil4/web/mylinuxtips/wp-admin/admin-footer.php:2.1KB:770:1603642:2005-04-20 15.19.07:2006-03-03 14.59.01:f

basically the command above is -v for verbose and -f for this

-f | –file-info
Dump cache entries.
Dumped fields are:
time to cache entry expiry
time to live setting
source filename
filesize of phpa_* cache file
source script file device number
source script file inode number
source script modification time (seconds since 0 hours UTC, Jan1, 1970)
source script cache time (seconds since 0 hours UTC, Jan1, 1970)

phpaadmin -v -m

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# phpaadmin -v -m
shm size 8.0MB bytes
mempool size 8.0MB
mempool bytes allocated 7.7MB
mempool max bytes allocated 7.9MB
mempool bytes free 124.0KB
mempool overhead 120.9KB
cache enabled

you can see the memory cache allocated for caching of files right now is set up at 8 megs
you can increase it but it is up to you to figure out what are the best settings to use.

you can do that by editing the options for the extension on the php.ini.

[root@penguincares tmp]# phpaadmin -v -p
cache in use by 18 procs (max 18)
0 active requests (max 2)

the above command tells you the processes .

As you can see you can play with the flags and get lots of useful information about the ioncube
accelerator.

How to tweak settings on php.ini.

check the CONFIGURATION file to see all the settings you can modify on your php.ini file to
control the behavior of the ioncube accelerator.

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# more CONFIGURATION
******************************************************************************

Configuration Notes for The PHP Accelerator 1.3.3r2

******************************************************************************

PHP.INI ENTRIES
—————

PHPA has recommended defaults for all ini entries except for the path to the
library extension.

The path to the extension should be specified as:

zend_extension = /path/to/php_accelerator_1.3.3r2.so

where /path/to is the directory underwhich you installed the accelerator.
A typical location might be /usr/local/lib

All other entries are optional and the entries shown below can be set
to configure PHPA as necessary. You may wish to familiaise yourself with
them and change the default settings for some once you have PHPA up
and running.

** THINGS TO NOTE

You must stop and restart Apache for them to take effect.
The values for ini entries can be given with or without double quote
delimiters unless spaces are required in the value. Only double quotes
can be used to delimit strings. e.g. both

phpa.phpa = on
phpa.phpa = “on”

are valid, whereas

phpa.phpa = ‘on’

is *not* valid.

Entries that can be enabled or disabled can be set by using the words on or
off, or 1 or 0. e.g. phpa = on or phpa = off

General
——-

; Enable or disable the Accelerator entirely. Defaults to “on”.

phpa = on

; Enable or disable the builtin Accelerator code optimiser. Defaults to “on”.
; You should always leave this enabled as it reduces code size and speeds
; things a little

phpa.tweaks = on

; Enable a workaround for a bug in PHP that can cause PHP to incorrectly
; report that a script has run out of memory. Defaults to 0, i.e. disabled.
; Set to “on” or 1 to enable.
; NOTE: This is only relevant is PHP was built with –enable-memory-limit

phpa.enable_php_memory_bug_workaround = 0

File Cache
———-

; Sets the file cache directory. Must be an absolute path.
; Defaults to /tmp. Avoid using ram based or NFS file systems for the
; cache directory. Unless the shm cache is disabled, the cache files are
; only used when a new or changed file is cached, or if
; there is no cache entry in shared memory. Some RAM based file systems are
; buggy and can report problems with memory mapped files. If you see errors
; to do with cache files and are using a ram based file system, switch to
; a disc file system.

phpa.cache_dir = /tmp

; Sets the cache file permissions. This is an octal value. Defaults to 400.

phpa.file_perms = 400

; Specifies a list of file patterns to ignore as a comma separated list of
; complete or partial file paths.
; A file is ignored if the end of its path matches an item in the list
; e.g.

phpa.ignore_files = “/index.php,/a/help.php”

; Specifies a list of partial file paths to ignore. Files below any of the
; path components are ignored.
; e.g.

phpa.ignore_dirs = “/data/WWW/site1/,/cache/”

; Specify the period between scans of the file cache looking for files to
; remove (prune). Pruning is triggered by a page request, and performed after
; the page request has completed. Pruning operates on the cache directory that
; was set for the request, and a request that uses a given cache directory is
; required in order for that directory to be scanned. The period should be a
; number followed by the letter s,m,h or d, for seconds, minutes, hours or
; days.
; The default is 1h, for 1 hour. Setting the time to 0 disables cache pruning.

phpa.cache_file_prune_period = 1h

; Specify the age after which a cache file will be removed at the next scan
; of its cache directory. The age is determined by looking at the access time
; of the file. Files are accessed when they are created and when read.
; Cache files are read if there is no corresponding shared memory cache entry.
; The default period is 1d, for 1 day. If the web server is restarted
; regularly, e.g. every 24 hours, then this value should be set to be longer
; than the restart interval such that the cache files can be read and used to
; populate the new shm cache after the server restart, rather than the script
; files having to be read again. If a site keeps creating new script files,
; such that large numbers of cache files are created, then ttl period should
; be reduced.

phpa.cache_file_ttl = 1d

SHM Cache
———

; Sets the shared memory cache size in megabytes.
; Integer values only. Defaults to 8MB. You may want to change this after
; PHPA has been running for a while. Use ‘phpa_cache_admin -mv’ to see what
; the memory usage is like, and adjust if necessary based on the maximum
; memory ever used. 2MB more than the maximum used is suggested.

phpa.shm_size = 8

; Sets the shared memory key. Maybe be specified in hex notation as below
; or as an integer.
; Defaults to 0xc0deb00

phpa.shm_key = 0xc0deb00

; Sets the shared memory permissions. This is an octal value. Defaults to 666.
; The cache generally only needs to be accessed by the owner, and you may
; want to set this to 600

phpa.shm_perms = 666

; Specify the name or id of the user and group to own the shared memory cache.
; For apache these default to the user and group specified in the apache
; configuration file, and this is what is required.
; ** These had to be set before release 1.3.2 revision 2, but from revision 2
; onwards they are determined automatically, so should uusually not be set.
; Only set them if there are warnings in the error log about not being
; able to set the user and group id for the shared memory cache.
; The end result must be that the user and group are the same as the
; web server.

phpa.shm_user =
phpa.shm_group =

; Sets whether the shared memory and semaphores should be released
; automatically when the web server shutsdown and removed if existing
; before startup. Defaults to on.

phpa.shm_release_at_exit = on

; Sets the interval between checks of the shared memory cache for
; rebalancing. Note that PHPA will ALWAYS recache a file if it’s changed.
; This is the period between scanning the cache and maybe remove old entries
; A purely numeric interval is in seconds, otherwise append one of ’s’, ‘m’,
; ‘h’, ‘d’ to specify a period in seconds, minutes, hours or days.
; e.g 10m is ten minutes, 3h is three hours.
; Defaults to 5 minutes

phpa.shm_stats_check_period = 5m

; Sets the time-to-live period for shared memory cache entries.
; Specify a period as a number followed by ’s’, ‘m’, ‘h’, ‘d’ to denote
; seconds, minutes, hours, or days. E.g. 12h, 7d etc.
; Any shared memory cache entries that haven’t been accessed within this period
; will be flushed from the cache the next time cache stats are checked, (as
; determined by the setting of phpa.shm_stats_check_period).
; The period defaults to 12 hours and is probably suitable for most cases.
; Sites where the cache is undersized or where files often become stale
; (e.g. because files are replaced with new versions [as opposed
; to being overwritten] might want to reduce this.
; Sites where files may not be accessed for longer than 12 hours
; could increase the value.

phpa.shm_ttl = 12h

; Specifies a list of file patterns to be excluded from the shared memory
; cache. The list should be a comma separated list of complete or partial
; file paths. A file is ignored if the end of its path matches an item in the
; list. e.g.

phpa.shm_ignore_files = “/index.php,/a/help.php”

; Specifies a list of partial file paths to be excluded from the shared memory
; cache. Files below any of the path components will not be cached in shared
; memory.
; e.g.

phpa.shm_ignore_dirs = “/data/WWW/site1/,/nocache/”

; Sets the maximum number of Apache instances that may use the shared memory
; cache. The default value is 512. Setting to one more than
; the MaxClients apache parameter is optimal. Any processes created after the
; limit is reached will still benefit from acceleration gained from using the
; file cache.

phpa.shm_max_processes = 512

; 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

PER-REQUEST CONFIGURATION
————————-

The following directives can be added to Apache configuration files
within or blocks to control the Accelerator on a
per-request basis. means either on or off. Do not include the <>
characters

# Enable or disable the code optimiser
php_value phpa.tweaks

# Enable or disable the accelerator
php_value phpa

# Set the file cache directory
# Overrides the php.ini setting for this request
php_value phpa.cache_dir

# Set the TTL (Time To Live) period for shared memory cached entries
# Overrides the php.ini setting for this request
php_value phpa.shm_ttl

# Set the ignored files
php_value phpa.ignore_files

# Set the ignored directories
php_value phpa.ignore_dirs

# Set the file patterns for files that will not be cached in shared memory
php_value phpa.shm_ignore_files

# Set the directories below which files will not be cached in shared memory
php_value phpa.shm_ignore_dirs

Examples:

# Use /tmp/site1_phpa_cache for cache files of site1
# Set shared memory cache entries to have a 6 hour ttl
#


php_value phpa.cache_dir /tmp/site1_phpa_cache
php_value phpa.shm_ttl 6h

# Use /tmp/site2_phpa_cache for cache files of site2
# Set shared memory cache entries to have a 2 day ttl
#


php_value phpa.cache_dir /tmp/site2_phpa_cache
php_value phpa.shm_ttl 2d

# Disable phpa for any requests within http://site2/xdir/
#


php_value phpa off

STANDALONE COMMAND LINE CONFIGURATION
————————————-

Acceleration of standalone PHP scripts, e.g. using php for cgi-bin scripts,
is no longer supported. Support for standalone scripts may be provided in
a future version.

########### install file included on the tar file ###############

[root@penguincares php_accelerator-1.3.3r2_php-4.3.0_linux_i686-glibc2.1.3]# more INSTALL
******************************************************************************

Installation Notes for Release 1.3.3r2

******************************************************************************

QUICK INSTALL
————-

1. Add the following line to your php.ini file, e.g. near the extensions
section. Set the correct path to where you installed the accelerator
library. /usr/local/lib is a typical directory to use.

; PHP Accelerator extension
zend_extension=”/path/to/php_accelerator_1.3.3r2.so”

Note that the Accelerator is not a module, and you must use the
‘zend_extension’ keyword in the php.ini file and not ‘extension’.

2. The dbg.so debugger module is not compatible with PHPA, so check
your php.ini and disable the debugger if you use it on your system.

3. Restart your web server.

4. If PHPA is installed it creates and sets a key in the $GLOBALS array
called _PHPA. Create and execute a script such as the following to dump
the $_PHPA global.

< ?
var_dump($GLOBALS['_PHPA']);
?>

If PHPA is installed then there should be output, and if enabled, you
should see output similar to the following:

array(3) { ["ENABLED"]=> bool(true) ["iVERSION"]=> int(10303) ["VERSION"]=> string(5) “1.3.3r2″

If PHPA was installed but not enabled then the value of the ENABLED
key would be false. Check the apache error log for indications of
the problem.

If there is no output then PHPA is probably not installed correctly, and
so was not loaded by PHP. Run a script calling phpinfo() to check this.
If installed you should see text similar to the following:

This program makes use of the Zend scripting language engine:
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
with the ionCube PHP Accelerator v1.3.3r2, Copyright (c) 2001-2002, by Nick Lindridge

If this text is not present then PHPA wasn’t installed. This could be
because the wrong php.ini file was edited (check the filename from the
phpinfo() output), because the path name was wrong, or because file
permissions prevented PHP from loading it, etc. The apache error log
may contain an error message that helps in diagnosis.

5. If you haven’t succeeded to successfully install PHPA, please email
support@phpa.co.uk for help in diagnosing the installation or
configuration problem.

6. Read the CONFIGURATION notes about configuration options, and set any
additional entries in the php.ini file or apache configuration files
having first had PHPA running. In particular you may wish to resize the
cache.

INSTALLING WITH THE IONCUBE LOADER
———————————-

The ionCube PHP Accelerator may be installed with the ionCube Loader,
although the current version of PHPA will not cache encoded files.

If installing both, the loader must be installed first.

e.g.

zend_extension = /usr/local/lib/ioncube_loader_1.0.4r2.so
zend_extension = /usr/local/lib/php_accelerator_1.3.3r2.so

MORE DETAILED INFORMATION
————————-

Having untarred the release you should have this INSTALL file,
release notes, configuration information, and the accelerator
library ‘php_accelerator_1.3.3r2.so’.

You can install the library wherever you wish.

Editing the php.ini file
————————

If you’re unsure where the php.ini file is, or which one your server is using,
run a script that calls phpinfo() and the output should include the location
of your php.ini file.

At runtime
———-

When running, the Accelerator creates files beginning with ‘phpa_’ in
the file cache directory, which by default is /tmp. One file is created
per source file that has been read unless the accelerator is disabled
for a particular file. You can delete these at any time and they will be
recreated for each source file subsequently accessed. The Accelerator
performs automatic ‘garbage collection’, and deletes any cache files that
it hasn’t seen accessed for more than a specified period.

If you are timing your scripts, you may observe that the time taken to load
a given script will decrease during the first few page accesses. This is
while the accelerator caches the files on disc and in shared memory.

After the first few page loads then performance should settle.

Performance Notes
—————–

Normally the Accelerator will never degrade your system performance, however
two situations in particular may affect performance - very frequently changed
pages and an undersized cache.

If your application very frequently generates or modified pages,
then each time these are hit they will be optimised and recached, and this
overhead may degrade performance a little.

The Accelerator allows files to be excluded from the shared memory cache, or
even ignored by the Accelerator entirely, and taking advantage of this feature
for any frequently changing files is recommended to maximise performance.
However this is not an issue for most sites.

Setting the shared memory cache size
————————————

This defaults to 8MB, but can be set to any value in 1MB increments up to the
limit for a single shared memory segment (32MB is common). Entries in
the shm cache will be removed automatically if they haven’t been accessed
in a while (similar to the garbage collection of cache files), and also
if there is no space available when a new script needs to be stored. If the
cache is too small, then this second case may occur often.

After a while run ‘phpa_cache_admin -mv’ to see what the memory usage is
like. You must run this as root or as the same owner as the webserver
processes, and PHPA must be running at the time.

You should see output similar to the following:

shm size 8.0MB bytes
mempool size 8.0MB
mempool bytes allocated 947.4KB
mempool max bytes allocated 961.8KB
mempool bytes free 7.0MB
mempool overhead 42.2KB
cache enabled

This is saying that the shared memory is 8MB, that 947KBytes is allocated now,
and that the maximum ever allocated was nearly 962KBytes. From this
information you might decide to reduce or increase the size of the cache.
If the maximum ever allocated is nearly the same as the cache size then
you should probably increase the size. 2MB more than the maximum used should
be a comfortable setting, but remember that any new scripts may further
increase the memory usage.

Getting Support
—————

If you haven’t already, please join the PHPA forum to keep up to date with new
releases. You can do this from http://www.php-accelerator.co.uk/forum.php

This is an announcements only forum, and very low volume,
carrying just information that existing or potential PHPA users should be
aware of.

A web forum is also available at http://phpa.phorum.org.

Official support may be obtained by emailing support@phpa.co.uk

Bug reporting
————-

If you suspect a problem or system incompatibility with the Accelerator,
please report details to bugs@php-accelerator.co.uk (or bugs@phpa.co.uk)
with as much information as possible relating to the problem.

Please try to reproduce the problem, and a test case is always the most
ideal.

Error Logging
————-

Any errors will appear in the Apache error_log file, and it’s recommended to
check this to ensure that the Accelerator is starting and activating
successfully, and also in the event that any unexpected behaviour occurs.

If Apache crashes for any reason then in rare cases it’s possible that
the Accelerator may be in a state that prevent Apache from serving pages.

In this case the shared memory cache must be removed and the server
restarted. When phpa.shm_release_at_exit is set, which is the default, then
restarting the server also reset the shm cache and so a problem is unlikely.

If you’re completely stuck, follow the procedure
at http://www.php-accelerator.co.uk/server_hang.php