Windows zend optimizer installation and configuration tutorial

Source: Internet
Author: User
Tags download zend

The installation and configuration of zend optimizer are very simple. I didn't plan to write the zend optimizer configuration tutorial. However, to ensure the integrity of the PHP environment configuration tutorial on Windows, I installed zend optimizer3.3.3 with my heart. I accidentally found that zend optimizer3.3.3 currently does not support PHP5.3, therefore, please ensure that your PHP runtime environment is PHP5.2 before 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 the 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.

Next, verify that zend optimizer3.3.3 is successfully installed. You only need to create a new PHP file and enter the phpinfo () function to access this file in the browser, the output PHP configuration information contains 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: PHPToolsendendOptimizer-3.3.0libOptimizer-3.3.0"
Zend_extension_ts = "D: PHPToolsendendOptimizer-3.3.0libendExtensionManager.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. In PHP5 Non-Thread Safe versions, zend optimizer configuration information is as follows: 1 zend_extension = <full_path_to_ZendOptimizer.dll>

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, add 1 zend_optimizer.enable_loader = 0 to the zend optimizer configuration information in php. ini.

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:
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.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.