|
Answer
by: Stuart Pierce, Aplus.Net Knowledge Base Support.
Zend
Optimizer is free software applied on files encoded by the Zend Encoder
and Zend SafeGuard Suite. Its goal is to enhance the running speed of
your PHP applications.
The
Zend Optimizer is not installed by default on our Unix-based shared
hosting servers. In order to take advantage of this PHP accelerator you
will need to upload the appropriate Zend Optimizer extension file to
your FTP space. You will also have to use a custom php.ini
file in order to enable the Zend Optimizer. Below you can find detailed
instructions for each of these steps:
I.
UPLOADING THE ZEND OPTIMIZER EXTENSION FILE TO YOUR FTP SPACE:
The
Zend Optimizer extension file is available for free download at https://zend.com/store/free_download.php?pid=13.
Our Unix-based shared hosting servers run on a FreeBSD
platform. To find out the exact version of FreeBSD on your server you
will need to access the following file:
http://yourdomain.com/cgi-bin/serverinfo.cgi.
Note:
Please replace yourdomain.com with your actual hosted domain name.
Once
you have downloaded the Zend Optimizer package, you will need to locate
the exact directory containing the extension file (ZendOptimizer.so)
which corresponds to the version of PHP running on your server.
In
order to find out the exact PHP version, you have to create a text file
named test.php
and upload it to your /html folder. The test.php
file must contain a single line with the following PHP code: <?phpinfo()?>
You
have to access your test.php file by pointing your browser to
"http://yourdomain.com/test.php". The result page will display the
current version and settings of your PHP.
Now
upload the ZendOptimizer.so file from your local
computer to your FTP web space. For example, you can create a /zend
directory in your home directory and upload the file
there. In any case, it is important that you know the exact location
you have uploaded the file to.
II.
ENABLING THE ZEND OPTIMIZER USING A CUSTOM PHP.INI
FILE:
If
you already have a php.ini file uploaded to your
FTP space, you need to add just two lines after the
eAccelerator’s section. Here is an excerpt from a php.ini
file:
[eaccelerator]
;extension="eaccelerator.so"
;eaccelerator.cache_dir="/tmp"
;eaccelerator.shm_size="4"
;eaccelerator.shm_only="1"
zend_optimizer.optimization_level=15
zend_extension=/home/partition/yourFTPusername/zend/ZendOptimizer.so
This
configuration will disable eAccelerator (which by default is enabled)
and enable Zend Optimizer. To enable/disable any of the two, put a
comment “;” at the beginning of
each line corresponding to the particular software.
Important:
It is not recommended to enable Zend Optimizer, if your PHP files are
not encoded with Zend Encoder.
Note:
If you do not know the exact server partition of your FTP space, please
read here.
Here
is how you can use the Aplus.Net Control Panel to create/edit a
custom PHP.INI file:
- Start
by logging into the Aplus.Net Control Panel at http://cp.aplus.net
using your Registration Number and Customer Password.
- Select
Web Hosting from the top navigation bar.
- Next,
select Hosted Domains and click on Manage
Hosted Domains.
- Now,
select the hosted domain name that you’d like to manage.
- Click
the PHP Configuration icon.
- Click
the Create php.ini button.
Note:
If you are already using a custom php.ini file, you can skip step
6.
- Click the Advanced
Edit button. This will open the php.ini file in Edit mode.
- When you are ready modifying the file, click Save Settings.
|