[mapserver-users] PHP MapScript Installation

Jeff McKenna jmckenna at gatewaygeomatics.com
Sat Aug 27 05:58:19 PDT 2016


Hello Argyris,

I package PHPMapScript for Windows users (for the MS4W community), but I 
have long faced your same problem.  In fact, because of the status of 
cmake when trying to build all of the mapscripts, I am forced to 
maintain custom makefiles, so that PHP and all other mapscript types 
(Python, CSharp) can compile.  This doesn't help your question, at all, 
but, since I have long been in your exact shoes, I can tell you what I 
have found out (and hopefully others can respond as well):

  - I closely examined each "FindXX.cmake" file in the MapServer source, 
to try to understand how cmake tries to find these settings

  - for PHPmapscript, the magic lives at 
https://github.com/mapserver/mapserver/blob/branch-7-0/cmake/FindPHP5.cmake

  I believe these settings are needed, in your cmake call:

   -DWITH_PHP=1
   -DPHP5_INCLUDE_PATH="your/path"
   -DPHP5_EXECUTABLE="your/path"
   -DPHP5_EXTENSION_DIR="your/path"

Maybe since we are all at the MapServer code sprint now, this is a good 
time to tackle these mapscript cmake issues.  It has been a big headache 
for me, maintaining custom makefiles so that mapscripts can compile.

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/

On 2016-08-26 5:48 AM, Argyris Margaritis wrote:
> Hi everyone,
>
> I'm trying to follow the installation steps for the PHP version of
> MapScript, however I'm a bit confused as many of the guides date back to
> php3.
>
> Currently I was using the following docker image for my tests, which was
> working fine as it is:
>
> https://github.com/kartoza/docker-mapserver
> <https://github.com/kartoza/docker-mapserver>
>
> However, to enable PHP MapScript I think I've had to add the
> following to thesetup.sh
> <https://github.com/kartoza/docker-mapserver/blob/master/setup.sh> as a
> cmake option:
>
>     -DWITH_PHP=1
>
>
> This resulted in the following error during build:
>
>     CMake Error at mapscript/php/CMakeLists.txt:31 (install):
>       install TARGETS given no LIBRARY DESTINATION for module target
>       "php_mapscript".
>
>
> How should I pass the PHP5_EXTENSION_DIR to cmake?
>
> Thanks in advance,
> Argyris
>
>




More information about the mapserver-users mailing list