[mapserver-users] PHP mapscript installation in Mapserver 7.4
Stefanos Anastasiou
emperor_stef at yahoo.gr
Thu Jan 9 11:13:09 PST 2020
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 likeextension=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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200109/0aee23fb/attachment.htm>
More information about the MapServer-users
mailing list