Compiling a eAccelerator.dll (with download) _php instance for PHP 5.2.12 and 5.2.13 under Windows

Source: Internet
Author: User
Tags apache log file apache log
First explain some of my parameters:
Operating system: Windows 7 Ultimate
Web Server:apache 2.2.14
Visual studio:6.0 (Don't mind the old version, even if it's still available under Win7, of course, you can use Visual Studio 2008.)

What is Eaccelerator?
Eaccelerator is a free open source PHP accelerator, optimized and dynamic content caching, improving the performance of PHP script cache performance, so that PHP script in the state of compilation, the cost of the server almost completely eliminated. It also has the effect of optimizing the script to speed up 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 and use it later when compiling 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 simple, first turn off Apache, and then replace all the extracted files in the compressed package with the original files. For example, if your original PHP program file is located in D:\php, then extract Php-5.2.13-win32.zip (or php-5.2.12-win32.zip) to this path to overwrite the original file.

4. Launch Apache, we will receive an error message, Apache cannot start. Open the Apache log file (this file path is Apache\logs\error.log) and we will see a message like this:
Copy the Code code as follows:
PHP Warning: [Eaccelerator] This build of "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 the Eaccelerator source code. The address is as follows:
Http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.zip

6. Extract the PHP source from the 2nd step to a directory, such as E:\php. Then open your PHP program directory (that is, your Php.exe directory), find the dev subdirectory in the php5ts.lib file, copy it to E:\php this location.

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

8. Open the Win32 subdirectory, where there should be a project file called EACCELERATOR.DSW, open it with the VS development environment (e.g. I use VS6.0), open Components > configuration, select Win32 Release PHP5 option, click Close ".


9. Press the F7 key (or select the Edit button in the toolbar) to start compiling, wait a moment, compile successfully, 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 launch Apache, and you will find that the Eaccelerator has been successfully loaded.

Or

Click here to download the compiled DLL file

Article from:. Yinzhili

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