Compile under Windows for PHP 5.2.12 and 5.2.13 eaccelerator.dll of attached download

  • 2020-03-31 20:42:13
  • OfStack

First, I will explain some of my parameters:
Operating system: Windows 7 Ultimate
Web Server: Apache 2.2.14
Don't be afraid of the old version, it still works even in Windows 7, of course you can use Visual Studio 2008)

What is eAccelerator?
Eaccelerator is a free, open source PHP accelerator that optimizes and dynamically caches content, improving the caching performance of PHP scripts, and making PHP scripts almost completely free of server overhead while compiled. It also optimizes scripts to speed up their execution.

1. First download the compiled PHP binary package. The address is as follows:
(link: http://cn.php.net/distributions/php-5.2.12-Win32.zip)

(link: http://cn.php.net/distributions/php-5.2.13-Win32.zip)

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

(link: http://cn2.php.net/get/php-5.2.13.tar.bz2/from/a/mirror)

3. Upgrade PHP:
The process is as simple as turning off Apache and replacing all the files unzipped from the zip package. For example, if your original PHP program file is in D:\ PHP, then unzip php-5.2.13-win32.zip (or php-5.2.12-win32.zip) to this path to overwrite the original file.

4. Start Apache, we will receive an error message, Apache can not start. Open the Apache log file (the file path is Apache \ logs \ error.log) and we will see the following prompt:


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.

EAccelerator is currently compiled for PHP 5.2.11, not for PHP 5.2.13. We should recompile a copy of eAccelerator.

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

6. Unzip the PHP source code downloaded in step 2 to a directory such as E:\ PHP. Then open your PHP program directory (where your php.exe resides), locate the php5ts.lib file in the dev subdirectory, and copy it to E:\ PHP.

7. Open E:\ PHP \ext, create a directory under here named eaccelerator, and then unzip the package downloaded in step 5 to this directory. The directory structure should look like this:
< img border = 0 SRC = "http://files.jb51.net/upload/201005/20100504004126933.png" border = 0 >

8. Open the win32 subdirectory, which should have a project file called eaccelerator.dsw, open it in the VS development environment (e.g., I used VS6.0), and open "components" >" To configure, select the Win32 Release PHP5 option and click close.

< img border = 0 SRC = "http://files.jb51.net/upload/201005/20100504004138570.png" border = 0 >
9. Press F7 (or select the edit button in the toolbar) to compile, wait a moment, compile successfully, you can see in the win32 directory generated a Release subdirectory, open the subdirectory, you will see that the eaccelerator.dll has been generated.
Copy this file to your PHP extension directory (D:\ PHP \ext), replace the original file, then start Apache, you will find that eAccelerator has been successfully loaded.
< img border = 0 SRC = "http://files.jb51.net/upload/201005/20100504004148719.png" border = 0 >

or


Related articles: