eAccelerator PHP5
|
|
|
|
| Articles Reviews PHP | |
| Written by Phil Harrison | |
| Monday, 16 October 2006 | |
|
{mos_sb_discuss:37}
In addition to being
a PHP optimizer and caching engine, you can use eAccelerator to encode your PHP scripts, so you can
redistribute the encoded version to clients that have eAccelerator installed,
without fear of source code
snooping.
As with other
PHP encoding solutions, when files are encoded using eAccelerator, they are
nearly impossible to decrypt
using standard tools. They can, however, be reverse-engineered using debuggers
and disassemblers on
the PHP engine itself, but usually such an effort is not warranted by the
possible reward.
Installing
eAccelerator
Like APC,
eAccelerator can be installed as a DSO, using the following process. First,
download a copy of the source code,
available at http://eaccelerator.net/.
Unfortunately,
at this time eAccelerator is not compatible with the CGI binary version of PHP.
If you Extract the tarball
that you downloaded, and then go into the newly created directory: tar -xvzf
eaccelerator-0.9.3.tar.gz
cd
eaccelerator-0.9.3
Run your copy of
phpize in this directory (again, change paths accordingly):
/usr/local/bin/phpize
Then, configure the
source, and build the binaries:
./configure \
--enable-eaccelerator=shared \
--with-php-config=/usr/local/bin/php-config
make
After the build
completes, install the DSOs, as root:
make install
Next, you need to
provide a place for eAccelerator to put temporary files. Create an eaccelerator directory in the
/tmp folder: mkdir
/tmp/eaccelerator
chmod 0777
/tmp/eaccelerator
Finally, add the
following to php.ini, and then restart Apache:
extension="eaccelerator.so"
Configuring
eAccelerator
Like APC, the default options will probably suffice in most situations, but if not, you have access to the following php.ini directives:
Removing
eAccelerator is as simple as deleting or commenting-out the appropriate
extension line in php.ini, like so:
;extension="accelerator.so"
To permanently
remove eAccelerator from the system, delete the eaccelerator.so file from the
PHP extensions directory.
For more
information on eAccelerator, visit http://eaccelerator.net. Powered by jReviews |
|
| Last Updated ( Sunday, 08 July 2007 ) | |
| < Prev | Next > |
|---|









