The installation and configuration of zendoptimizer is very simple. it was not intended to write the zendoptimizer Configuration tutorial. however, to ensure the integrity of the PHP environment Configuration tutorial on Windows, zend optimizer installation and configuration are very simple, I didn't plan to write the zend optimizer Configuration tutorial, but I installed zend optimizer3.3.3 to ensure the integrity of the PHP environment Configuration tutorial on Windows, I accidentally discovered that zend optimizer3.3.3 currently does not support PHP5.3, so I would like to remind you to ensure that your PHP runtime environment is PHP5.2 when reading this zend optimizer installation and configuration tutorial.
For beginners of PHP, what is zend optimizer first?
Zend optimizer has two main functions: 1. improve PHP program performance; 2. run PHP files encrypted by zend.
Zend optimizer installation tutorial
First Download zend optimizer. I downloaded zend optimizer3.3.3 for windows. please click to download. Downloading zend optimizer is free of charge, but you need to register it first on the zend official website.
After downloading zend optimizer3.3.3, double-click the installation file to start zend optimizer installation. pay attention to the following points during the installation process:
1. First, you will be asked to select the zend optimizer installation directory. you can choose the installation directory as needed. my suggestion is to install it outside the website directory for security reasons.
2. during zend optimizer installation, you will be asked to select the WEB service platform used in your PHP environment. by default, there are IIS, Apache, and so on. I am using Apache2.x, please be sure to select this option, which involves subsequent operations.
3. then, the zend optimizer installer will let you choose php. the specific directory location of ini, because zend optimizer needs to find the PHP configuration file, as a backup, and add the corresponding zend optimizer configuration information here, the default is C: \ Windows, if your PHP version is PHP5.2, you do not need to change it by default. Aside, although zend optimizer does not support PHP5.3 at present, it will certainly be supported sooner or later. Therefore, if you install zend optimizer in the PHP5.3 environment in the future, you need to change the default php. the Directory of the ini configuration file is located. This is because PHP5.3 and PHP5.2 are installed differently. Click to view the PHP5 installation and configuration tutorial in FastCgi and ISAPI methods under Windows 7 IIS7.
4. finally, select the specific installation directory of the server based on the type of the WEB server you selected. Previously, I chose the Apache server, so you only need to specify the installation directory of the Apache server.
5. during zend optimizer installation, the Apache or IIS server is required to be stopped or started. you only need to click OK to automatically stop or start the Apache or IIS server.
6. if you uninstall zend optimizer in the future, the zend optimizer installer automatically restores the previously backed up php. ini file by default.
So far, zend optimizer3.3.3 is very simple even if the installation is complete.
The next step is to verify whether zend optimizer3.3.3 is successfully installed. you only need to create a new PHP file, input the phpinfo () function, access this file in the browser, and check that the output PHP configuration information includes the Zend Optimizer column and
1
|
Zend Engine v2.2.0, copyright (c) 1998-2009, Zend Technologies Ltd., with the Zend Optimizer v3.3.3, copyright (c) 1998-2007 Zend Technologies Ltd. |
The zend optimizer is successfully installed.
Zend optimizer Configuration tutorial
Zend optimizer configuration information is automatically written to the end of the PHP configuration file php. ini during installation. the default zend optimizer configuration information is as follows:
1 2
|
Zend_extension_manager.optimizer_ts = "D: \ PHPTools \ Zend \ ZendOptimizer-3.3.0 \ lib \ Optimizer-3.3.0" Zend_extension_ts = "D: \ PHPTools \ Zend \ ZendOptimizer-3.3.0 \ lib \ ZendExtensionManager. dll" |
Zend_extension_manager.optimizer_ts and zend_extension_ts specify the directory address of zend optimizer manager and zend optimizer extension file respectively.
Note:: The two configuration options of zend optimizer are different for different PHP5 versions. The zend optimizer configuration information for PHP5 Non-Thread Safe versions is as follows:
In addition to the two configuration options, zend optimizer has several configuration options.
1. zend_optimizer.enable_loader: indicates whether zend optimizer can execute the code encrypted by Zend Encoder. Zend optimizer is supported by default. If you want to cancel, you only need to add the zend optimizer configuration information in the previous php. ini file.
1
|
Zend_optimizer.enable_loader = 0 |
Yes. 0 indicates disabled, and 1 indicates enabled.
2. zend_optimizer.optimization_level: zend optimizer optimization process. There are 10 optimization processes in total. The maximum value is 1023. The maximum value defined by Zend (High mode) is 15, that is, the optimization process from 1 to 4 is enabled, this 15 is about to sum up the values of the four optimization processes. The 10 optimization processes are as follows:
1 2 3 4 5 6 7 8 9 10
|
Optimization Process 1 (PASS1) 1 Optimization Process 2 (PASS2) 2 Optimization process 3 (PASS3) 4 Optimization Process 4 (PASS4) 8 Optimization process 5 (PASS5) 16 Optimization process 6 (PASS6) 32 Optimization process 7 (PASS7) 64 Optimized process 8 (PASS8) 128 Optimization process 9 (PASS9) 256 Optimization procedure 10 (PASS10) 512 |
3. the other two zend optimizer configuration options: zend_optimizer.disable_licensing and zend_optimizer.licence_path, zend_optimizer.obfuscation_level_support, and zend guard.
After zend optimizer configuration, restart the WEB server. you can see in phpinfo that the zend optimizer column contains more information about Optimization Pass 1-4 enabled and Zend Loader enabled, this indicates that the zend optimizer configuration has been modified successfully.
So far, the installation of zend optimizer and the basic configuration of zend optimizer on windows have been completed. you can try to execute the zend-encrypted PHP program to experience the changes brought by zend optimizer, it is helpful for beginners to learn more about PHP.