| 6 | | * You need Visual Studio 6 C++ (VS.Net could work but hasn't been tested) |
|---|
| 7 | | * You need to download the full source code of php 4/5 |
|---|
| 8 | | * You need to download the zip file with the precompiled php 4/5 binary (or build php 4/5 you're self from source) |
|---|
| | 6 | * eAccelerator sources |
|---|
| | 7 | Download the latest eAccelerator sources from sourceforge.net ( http://sourceforge.net/projects/eaccelerator ). |
|---|
| | 8 | * You need Visual Studio or compatible compiler (Windows Libraries) |
|---|
| | 9 | * You need to download the full source code of php 4/5 and the archive with the precompiled php 4/5 binary (or build php 4/5 you're self from source) |
|---|
| | 10 | 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. |
|---|
| | 11 | |
|---|
| | 12 | 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. |
|---|
| 13 | | 1) Unzip the php source to a directory |
|---|
| 14 | | 2) Unzip the eAccelerator source in the ext\ subdirectory of the php source |
|---|
| 15 | | 3) Start Visual Studio and open the eAccelerator workspace: |
|---|
| | 17 | 1) Unzip the php source to a directory, we will use c:\php for this example. |
|---|
| | 18 | |
|---|
| | 19 | 2) Unzip the eAccelerator source in the ext\ subdirectory of the php source. |
|---|
| | 20 | You should have something like c:\php, c:\php\ext and c:\php\ext\eaccelerator |
|---|
| | 21 | |
|---|
| | 22 | 3) Unpack binary PHP in any other directory, and search for the .lib file. If you are using PHP4, search for php4ts.lib. If you are using PHP5 search for php5ts.lib. For PHP5, php5ts.lib is located in the dev\ subdirectory of the root folder. |
|---|
| | 23 | 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 |
|---|
| | 24 | |
|---|
| | 25 | 4) Start Visual Studio and open the eAccelerator workspace: |
|---|
| 17 | | The workspace is located in the win32 subdirectory of the eAccelerator source (X:\path\to\php-x.y.z\ext\eaccelerator\win32\eaccelerator.dsw) |
|---|
| 18 | | 4) Unpack the zip file with the precompiled php version. |
|---|
| 19 | | 5) Add the path to the phpXts.lib file (where X is the php version) |
|---|
| 20 | | * Tools > Options ... |
|---|
| 21 | | * Go to the Directories tab |
|---|
| 22 | | * Select Library files in the Show directories for: select box |
|---|
| 23 | | * Click on the first symbol next to the Directories label to add the path |
|---|
| 24 | | * Click on ... after the new entry and select the dev subdirectory of the directory with the precompiled php |
|---|
| 25 | | 6) Go to Build > Set active configuration ... and select the target you want to build: |
|---|
| 26 | | Select 'eAccelerator - Win32 Release' for php 4 and 'eAccelerator - Win32 Release PHP5' for php5 |
|---|
| | 27 | The workspace is located in the win32 subdirectory of the eAccelerator source (c:\php\ext\eaccelerator\win32\eaccelerator.dsw) |
|---|
| | 28 | |
|---|
| | 29 | 6) Go to Build > Set active configuration ... and select the target you want to build. Included Visual Studio profiles are: |
|---|
| | 30 | Debug |
|---|
| | 31 | Debug PHP5 |
|---|
| | 32 | Release |
|---|
| | 33 | Release PHP5 |
|---|
| | 34 | Select the profile according the PHP version you will compile. |
|---|
| | 35 | Debug and Release are used for PHP4. Debug PHP5 and Release PHP5 are used for PHP5. For our example, we will compile with Release PHP5. |
|---|
| | 36 | |
|---|