1
PHP/MapScript Mapserver Module
2
==============================
4
--------------------------------------------------------------------
5
IMPORTANT - READ THIS FIRST:
7
The Win32 build process is not very friendly for unexperienced users.
8
So it is strongly recommended that you use one of the precompiled
9
versions of php_mapscript.dll available on DM Solutions Group's web site:
10
http://www2.dmsolutions.ca/mapserver/dl/
12
If for some reason you still decide to compile Win32 binaries yourself,
13
then don't do it unless you really know what you're doing... and
14
hopefully the rest of this file contains some hints that may help
16
--------------------------------------------------------------------
18
This file contains informations specific to building the PHP/MapScript
19
extension on Windows using MSVC++ 6.0.
21
See also the file README for more general information about the
22
PHP/MapScript extension.
24
--------------------------
26
Step 1: Build the PHP.LIB import library
30
Before you can build the 'php3_mapscript.dll' extension, you need the
31
PHP.LIB import library. To build PHP.LIB, you will have to download the
32
php_3.0.14.tar.gz source code, and follow the instructions in the
33
README.WIN32 file in there to build php.exe with MSVC++ 6.0.
35
- Extract php_3.0.14.tar.gz to your HD
36
- Read the php_3.0.14\README.WIN32 file.
37
- Open php_3.0.14\win32\php3.dsw using MSVC++ 6.0
38
- Start building php.exe, this will also create PHP.LIB
40
*** PHP4.0.4 (and more recent versions) ***
41
The PHP 4.0.4 win32 binaries (php-4.0.4-Win32.zip) distributed on
42
http://www.php.net/ include the necessary php4ts.lib import library,
43
so it is not necessary to build the PHP4 source in this case:
44
- Extract php-4.0.4.tar.gz (this will create a php-4.0.4 source tree)
45
- Extract php-4.0.4-Win32.zip and configure PHP4 on your server as per
46
the instructions in the file install.txt included in the zip file.
47
- mkdir php-4.0.4\lib (i.e. 'mkdir lib' in the root of the source tree)
48
- Copy php4ts.lib (from php-4.0.4-Win32.zip) to php-4.0.4\lib
49
- Continue with the rest of the instructions below.
51
Step 2: Build PHP3_MAPSCRIPT.DLL/PHP_MAPSCRIPT.DLL
54
Review the mapscript\php3\makefile.vc and make any modifications required
55
for your configuration. Make sure PHP_SOURCE_DIR points to where you
56
installed the PHP source tree in step 1 above.
58
Then to compile PHP3_MAPSCRIPT.DLL/PHP_MAPSCRIPT.DLL:
60
- Open a DOS prompt window
61
- Run the VCVARS32.BAT script to initialize the VC++ environment
62
variables. VCVARS32.BAT is automatically generated by the MSVC++
63
install procedure and should be located in the BIN sub-directory of
64
your MSVC++ installation.
65
- Then start the build with:
68
This will create the "PHP3_MAPSCRIPT.DLL" for PHP3, or "PHP_MAPSCRIPT.DLL"
72
Step 3: Install PHP3_MAPSCRIPT.DLL/PHP_MAPSCRIPT.DLL
75
PHP3_MAPSCRIPT.DLL is a regular PHP module, you should copy it to the same
76
directory as the other PHP3_*.DLL modules that came with PHP.
78
Then the module can be loaded in one of 2 ways:
80
- Adding a "extension=php3_mapscript.dll" line to the PHP3.INI file will
81
load it automatically for every PHP page.
83
- The other possibility is to load the module only when needed using the
85
dl("php3_mapscript.dll"); // for the PHP3 module
87
dl("php_mapscript.dll"); // for the PHP4 module
89
You can test that the module is properly loaded by executing the
90
phpinfo() command in a PHP page... the "MapScript" extension should be
91
included in the list of extensions in the phpinfo() report.
94
--------------------------
95
$Id: README.WIN32 541 2001-06-21 18:19:43Z dan $
96
--------------------------