forked from eaccelerator/eaccelerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.win32
46 lines (34 loc) · 2.7 KB
/
README.win32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Building eAccelerator on windows
================================
Requirements
------------
* eAccelerator sources
Download the latest eAccelerator sources from sourceforge.net ( http://sourceforge.net/projects/eaccelerator ).
* You need Visual Studio or compatible compiler (Windows Libraries)
* You need to download the full source code of php 5 and the archive with the precompiled php 5 binary (or build php 5 you're self from source)
Download the PHP sources and binaries for the version of PHP you wish to use eAccelerator with. The downloads can be obtained from http://www.php.net/downloads.php. The sources are compressed in two formats .tar.gz and .tar.bz2. If you use WinZip, download the .tar.gz format. Winrar is capable of extracting .tar.bz2 formats.
Note: The reason why you need the binary package is because it is not necessary to compile PHP sources; you only need the .lib file that is included in the binary distribution and PHP sources.
Instructions
------------
1) Unzip the php source to a directory, we will use c:\php for this example.
2) Unzip the eAccelerator source in the ext\ subdirectory of the php source.
You should have something like c:\php, c:\php\ext and c:\php\ext\eaccelerator
3) Unpack binary PHP in any other directory, and search for the .lib file. php5ts.lib is located in the dev\ subdirectory of the root folder.
Copy the .lib file to the PHP sources root directory that you unpacked the source files to earlier. For our example, this is in c:\php. This file will be used for linking
4) Start Visual Studio and open the eAccelerator workspace:
File > Open Workspace ...
The workspace is located in the win32 subdirectory of the eAccelerator source (c:\php\ext\eaccelerator\win32\eaccelerator.dsw)
6) Go to Build > Set active configuration ... and select the target you want to build. Included Visual Studio profiles are:
Debug PHP5
Release PHP5
Select the profile according the PHP version you will compile.
Debug PHP5 and Release PHP5 are used for PHP5. For our example, we will compile with Release PHP5.
7) Go to Build > Build eAccelerator.dll to build the eaccelerator extension.
The .dll file will be created in sub-directories according to profile selection. Our example will place the compiled .dll file in c:\php\ext\eaccelerator\win32\Release
eLoader
------------
If you want to build the eLoader dll you need to set eLoader as the active project:
Project > Set Active Project > 2 eLoader
Everything is the same as for eAccelerator. If have already done the steps above you have to start at step 6 but set eLoader instead of eAccelerator.
WARNING: If you have build the eAccelerator project you have to do a Clean first else you'll get linker errors.
Build > Clean