I didn't find any compiled php_mapscript for any current PHP as well, so I tried to compile it myself. Took me long time and a lot of failures but I did it.
Don't know if you need this any more since your post is more than one year old but I have php_mapscript.dll built against php-5.6.27-win32-vc11-ts-x86 and Mapserver-7.0-vc11-x86 (stable branch package for 7-0 from gisinternals) now.
The short story to get the php_mapscript.dll is:
Build php as descriped in documentation on php website.
I have my php-sdk at C:\dev\work\php-dev
.
Download gisinternals sdk and extract everything to C:\gisinteralssdk
.
Unpack everything into the same directory to get directories bin
, doc
, gdal
, include
, lib
, mapserver
, regex-0.23
, release-1700
and SWIG-1.3.39
inside C:\gisinteralssdk\
.
I have cloned the mapserver repository on github and applied the changes, needed for me to successfully compile php-mapscript to https://github.com/AlexanderGabriel/mapserver.
At this point, you dan decide to merge the changes of branch branch-7-0-fixphpmapscriptwin32buildwithcmake
to the mapserver-sources to be on official repository or just clone the repository with
git clone https://github.com/AlexanderGabriel/mapserver/ C:\gisinteralssdk\mapserver
.
I just opened a pull-request and hope they include it to future releases.
These commands will do the rest:
cd C:\gisinteralssdk\mapserver
mkdir build
cd build
cmake .. -G "NMake Makefiles" -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -Wno-dev -DCMAKE_PREFIX_PATH=C:\gisinteralssdk;C:\gisinteralssdk\bin;C:\gisinteralssdk\lib;C:\gisinteralssdk\include -DREGEX_DIR=C:\gisinteralssdk\regex-0.12 -DWITH_SOS=1 -DWITH_KML=1 -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_THREAD_SAFETY=1 -DWITH_FCGI=1 -DWITH_CAIRO=1 -DCAIRO_LIBRARY=C:\gisinteralssdk\lib\cairo.lib -DWITH_SVGCAIRO=1 -DSVGCAIRO_LIBRARY=C:\gisinteralssdk\lib\libsvg-cairo.lib -DSVG_LIBRARY=1 -DSVG_LIBRARY=C:\gisinteralssdk\lib\libsvg.lib -DWITH_POSTGIS=0
Test if it works with nmake
. Then enable php:
cmake .. -DWITH_PHP=1 -DPHP5_INCLUDES=C:\dev\work\php-dev\phpdev\vc11\x86\php-5.6.27-src -DPHP5_EXTENSION_DIR=C:\gisinteralssdk
And finally build PHP-MapScript with nmake
.
Don't know, if you are familar with CMake. Choose your needed Options.
PostGIS works if you install PostGIS on your system and add the path to the \bin-directory to you systems oder users PATH variable before starting CMake the first time.
From this point, it's easier to change any library to a different version or change CMake-options to enable a needed feature. It took me several days to compile mapscript the first time (didn't know if i can do this at all) but then i started to reduce work to this few steps.
In my Opinion, it totally crazy and unnecessary to compile all the dependencies from scratch. Different Build-Systems, a lot to read, do and test. If you want, you can have my notes about that but i will not do it that way once again ;)
The PHP build process is really straightforward. Exactly as described on https://wiki.php.net/internals/windows/stepbystepbuild.
Because i'm not that experienced in this Windows-Build-Stuff, i'm not sure, if everything i changed is good. So please test, test, test, before using that in production.
Hope, this helps you to build your PHP-Mapscript.
Any feedback is welcome.
PS: I could compile php-mapscript 'on Windows' with the new "Linux Subsystem"-Feature of Windows 10 in a few minutes.
There are even packages in the repositories so you can install with apt-get.
You can install an Apache there and start it.
It will listen on 'localhost' of your Windows-Machine.
Crazy but it works and you can access Mapfiles on C or any other drive from there. So if you only want to use Windows for developement, this maybe an option. But not for production yet.
UPDATE 2017-01-04:
Mapserver project merged my pull-request on github. Version 7.0.3 contains all patches but no updated documentation. In the current, branch, there is already a new documentation in README.WIN32 for both, Mapserver and PHP/MapScript so you can use the documentation there to build Mapserver with PHP/MapScript on Windows