Compile eAccelerator. dll (download included) _ php instance for PHP5.2.12 and 5.2.13 in Windows

Source: Internet
Author: User
Tags apache log file apache log
PHP5.2.12 and 5.2.13 have been released recently to fix multiple bugs. Therefore, it is necessary to upgrade to this version. First, describe some of my parameters:
Operating System: Windows 7 Ultimate
Web Server: Apache 2.2.14
Visual Studio: 6.0 (do not abandon the old version, even in Win7 it can still be used, of course you can use Visual Studio 2008)

What is eAccelerator?
Eaccelerator is a free and open source php accelerator. It optimizes and dynamically caches content, improves the cache performance of php scripts, and enables PHP scripts to be compiled, the server overhead is almost completely eliminated. It also optimizes scripts to accelerate execution efficiency.

1. First download the compiled PHP Binary Package. (Will be used later) Address:
Http://cn.php.net/distributions/php-5.2.12-Win32.zip

Http://cn.php.net/distributions/php-5.2.13-Win32.zip

2. Download the PHP source code and use it later when compiling the eAccelerator. The address is as follows:
Http://cn2.php.net/get/php-5.2.12.tar.bz2/from/a/mirror

Http://cn2.php.net/get/php-5.2.13.tar.bz2/from/a/mirror

3. Upgrade PHP:
This process is very simple. First shut down Apache, and then replace all the files extracted from the compressed package with the original files. For example, if your original PHP program file is in D: \ PHP, decompress php-5.2.13-win32.zip( php-5.2.12-win32.zip) to this path to overwrite the original file.

4. When Apache is started, we will receive an error message indicating that Apache cannot be started. Open the Apache log File (path of this file is apache \ logs \ error. log), and we will see the following prompt:

The Code is as follows:


PHP Warning: [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.11.
Rebuild it for your PHP version (5.2.13) or download precompiled binaries.


This means that the current eAccelerator is compiled for PHP 5.2.11 and does not apply to 5.2.13. We should re-compile an eAccelerator.

5. Download an eAccelerator source code. The address is as follows:
Http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.zip

6. decompress the PHP source code downloaded in step 2nd to a directory, such as E: \ php. Then open your php program directory (also refer to the php.exe directory), find the php5ts. lib file in the dev subdirectory, and copy it to the E: \ php Directory.

7. Open E: \ php \ ext, create a directory named eaccelerator under it, and decompress the compressed package downloaded in step 5th to this directory. The directory structure should be as follows:

8. open the win32 subdirectory, which should contain an eAccelerator. the dsw project file is opened in the VS development environment (for example, VS6.0 is used), the "component"> "configuration" is opened, and the Win32 Release PHP5 option is selected, click Close ".


9. press the F7 key (or select the edit button in the toolbar) to start compilation. Wait a moment and the compilation is successful. You can see a Release subdirectory under the win32 Directory and open it, you will see that the eAccelerator has been generated. dll file.
Copy this file to your PHP extension directory (such as D: \ php \ ext), replace the original file, and start Apache. Then, you will find that the eAccelerator has been loaded successfully.

Or

Click here to download the compiled dll file

Article from:. yinzhili

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: info-contact@alibabacloud.com 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.