[mapserver-users] PHP mapscript installation in Mapserver 7.4
Jeff McKenna
jmckenna at gatewaygeomatics.com
Fri Jan 17 05:04:20 PST 2020
Hi Stefanos,
If you are trying to compile the new MapScript support through SWIG, for
PHP7, then you should use "–DWITH_PHPNG=ON", as described at
https://mapserver.org/installation/php.html#build-install-the-php-mapscript-module
Hope that helps.
Have a nice weekend,
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
On 2020-01-09 3:13 p.m., Stefanos Anastasiou wrote:
> Hello list,
>
> I am confused about the new php mapcript version that comes with the
> SWIG family. I compiled a MapServer 7.4.3 version on my Ubuntu 19.04
> server (with php version 7.2.24) successfully with php and python mapscript.
>
> ....
> -DWITH_PYTHON=ON \
> -DWITH_PHP=ON \
>
> mapserv -v shows:
>
> MapServer version 7.4.3 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=XMP SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG
> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> However in my phpinfo() I could not see the MapScript section so I had
> to go to the php.ini and add the extension like
> extension=php_mapscript.so. After that and restarting the server I see
> it there now.
>
> Is this the right approach now ?
>
>
> And one more question:
>
> I am also trying to compile the same version of MapServer in my local
> machine (with Linux MInt) with the same cmake options and php version
> 7.2.26. But the compilation fails with the following errors:
>
> In file included from /usr/include/php/20190902/Zend/zend.h:27:0,
> from /usr/include/php/20190902/main/php.h:34,
> from
> /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,
> from
> /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
> /usr/include/php/20190902/Zend/zend_types.h:665:0: note: this is the
> location of the previous definition
> #define Z_ISREF_P(zval_p) Z_ISREF(*(zval_p))
> ^
> In file included from
> /usr/local/src/mapserver/mapscript/php/php_mapscript.h:37:0,
> from
> /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
> /usr/local/src/mapserver/mapscript/php/php_mapscript_util.h:71:0:
> warning: "Z_ISREF" redefined
> #define Z_ISREF(z) Z_ISREF_P(&(z))
> ^
> In file included from /usr/include/php/20190902/Zend/zend.h:27:0,
> from /usr/include/php/20190902/main/php.h:34,
> from
> /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,
> from
> /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
> /usr/include/php/20190902/Zend/zend_types.h:664:0: note: this is the
> location of the previous definition
> #define Z_ISREF(zval) (Z_TYPE(zval) == IS_REFERENCE)
> ^
> In file included from
> /usr/local/src/mapserver/mapscript/php/php_mapscript.h:37:0,
> from
> /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:
> /usr/local/src/mapserver/mapscript/php/php_mapscript_util.h:84:27:
> error: unknown type name ‘zend_uint’
> static zend_always_inline zend_uint zval_refcount_p(zval* pz)
>
>
> Any help would be appreciated?
>
>
> Regards,
> Stefanos
>
>
> _
More information about the MapServer-users
mailing list