Compile the EAccelerator.dll (download) _php instance for PHP 5.2.12 and 5.2.13 under Windows

Source: Internet
Author: User
Tags apache log file bz2 php script php source code win32 apache log visual studio

Let me first explain some of my parameters:
Operating system: Windows 7 Ultimate
Web Server:apache 2.2.14
Visual studio:6.0 (Don't worry about its version of old, even if it's Win7, you can do it with Visual Studio 2008)

What is Eaccelerator?
Eaccelerator is a free and open source PHP accelerator, optimized and dynamic content caching, improve performance of PHP script cache performance, so that PHP script in the state of compilation, the server's overhead almost completely eliminated. It also optimizes the script to accelerate its execution efficiency.

1. First download the compiled PHP binary package. (will be used later) the address is as follows:
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 source code of PHP again, later compile eaccelerator will use. 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 simple, first off Apache, and then the compressed package of all the files extracted from the original file can be replaced. For example, your original PHP program file is located in D:\php, please extract php-5.2.13-win32.zip (or php-5.2.12-win32.zip) to the path to overwrite the original file.

4. Start Apache, we will receive an error message, Apache can not start. Open the Apache log file (this file path is Apache\logs\error.log) and we'll see a hint like this:

Copy Code code as follows:

PHP Warning: [Eaccelerator] This is "Eaccelerator" is 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 recompile a copy of the eaccelerator.

5. Download a copy of Eaccelerator source code. The address is as follows:
Http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.zip

6. Download the 2nd step to the PHP source code into a directory, such as E:\php. Then open your PHP directory (that is, your Php.exe directory), locate the Php5ts.lib file in the dev subdirectory, and copy it to the E:\php location.

7. Open E:\php\ext, create a directory below to name Eaccelerator, and then extract the compressed package downloaded from step 5th to this directory. The directory structure at this point should be this:

8. Open the Win32 subdirectory, which should have a project file called EACCELERATOR.DSW, open it with the VS development environment (for example, I use VS6.0), open "component" > "Configuration", select the Win32 release PHP5 option, and click Off. "


9. Press the F7 key (or select the Edit button in the toolbar) to start compiling, wait a moment, the compilation is successful, you can see in the Win32 directory generated a release subdirectory, open this subdirectory, you will see that the EAccelerator.dll file has been generated.
Copy this file into your PHP extension directory (such as D:\php\ext), replace the original file, and then start Apache, and you will find that Eaccelerator has been successfully loaded.

Or

Swipe here to download the compiled DLL file

The article comes 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.