Apache/PHP tuning
It's never wrong to tune your apache for more performance. Especially if it is for free. For this operation you will need SSH root access. Follow these steps:
![]() | Download IonCube accelerator from here. Choose the appropriate distribution for your platform. Don't worry if the suggested PHP version doesn't match exactly the one on your server. Simply choose one coming close. |
![]() | Extract the downloaded archive ( tar -zxf archive.tgz). The usual location for that is /usr/bin or /usr/local/bin |
![]() | cd into the folder and spot the php_accelerator.so file. This is the the file to be included in your php.ini, so remember the path. |
![]() | In php.ini spot the line where the zend module is included. |
![]() | Include the following line BELOW the latter mentioned. (If you cannot find the line that includes the Zend module put it near to the extensions). |
- ; modify the the path reflecting to location of the php_accelerator_.so file
- ;
- zend_extension:="path/to/php_accelerator.so"
Now have a look in the file named CONFIGURATION attached. Depending on your processor type there might be several additions to make. For example for a Intel Linux the additional lines might look like these (nevertheless stick to the CONFIGURATION file):
- phpa = on
- phpa.tweaks = on
- phpa.enable_php_memory_bug_workaround = 1
- phpa.cache_dir = /tmp
- phpa.file_perms = 400
- phpa.ignore_files = ""
- phpa.cache_file_prune_period = 1h
- phpa.cache_file_ttl = 1d
- ; the cache size. You might want to increase it
- phpa.shm_size = 8
- ; this is important: insert here the appropriate name
- ; otherwise the accelerator won'tbe able to create its files
- phpa.shm_user =
- phpa.shm_group =
- phpa.shm_key = 0xc0deb00
- phpa.shm_perms = 666
- ;phpa.shm_ignore_dirs = "/data/WWW/site1/,/nocache/"
Now save the modified php.ini (if you are using VI press ZZ), restart your Apache and you should be set.
Now you should check your Apache error.log to make sure you did install the right distro. If you see no errors everything is ok.
Check if the accelerator created some files in the directory specified above (in this example /tmp)
You can check as well by the included admin tool named phpa_cache_admin. (with -mv )
Troubleshooting
If the admin tool says something like
Acquired cache semaphores but couldn't access shared memory
Running 'phpa_cache_admin -D' may be required
it means that the cache size you chose is too big. So decrease the cache size.

