php mapsrc
Stefanos Anastasiou <[email protected]> Thu, 9 Jan 2020 19:10:52 +0000 (UTC)
| Newsgroups | gmane.comp.gis.mapserver.user |
|---|---|
| Message-ID | <[email protected]> |
--===============2430630045993240220== Content-Type: multipart/alternative; boundary="----=_Part_15056626_1329852308.1578597052172" ------=_Part_15056626_1329852308.1578597052172 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello list, =C2=A0 =C2=A0I am confused about the new php mapcript version that comes wi= th 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 mapscrip= t. =C2=A0....=C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -DWITH_PYTHON=3DO= N \=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -DWITH_PHP=3DON \ mapserv -v shows:=C2=A0 MapServer version 7.4.3 OUTPUT=3DPNG OUTPUT=3DJPEG SUPPORTS=3DPROJ SUPPORTS= =3DAGG SUPPORTS=3DFREETYPE SUPPORTS=3DXMP SUPPORTS=3DWMS_SERVER SUPPORTS=3D= WMS_CLIENT SUPPORTS=3DWFS_SERVER SUPPORTS=3DWFS_CLIENT SUPPORTS=3DWCS_SERVE= R SUPPORTS=3DFASTCGI SUPPORTS=3DGEOS INPUT=3DJPEG INPUT=3DPOSTGIS INPUT=3DO= GR INPUT=3DGDAL INPUT=3DSHAPEFILE However in my phpinfo() I could not see the MapScript section so I had to g= o to the php.ini and add the extension likeextension=3Dphp_mapscript.so. Af= ter that and restarting the server I see it there now. Is this the right approach now ? And one more question:=C2=A0 I am also trying to compile the same version of MapServer in my local machi= ne (with Linux MInt) with the same cmake options and php version 7.2.26. Bu= t the compilation fails with the following errors:=C2=A0 In file included from /usr/include/php/20190902/Zend/zend.h:27:0,=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from /usr/include/php/2= 0190902/main/php.h:34,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0from /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from /usr/loc= al/src/mapserver/mapscript/php/mapscript_error.c:32:/usr/include/php/201909= 02/Zend/zend_types.h:665:0: note: this is the location of the previous defi= nition=C2=A0#define Z_ISREF_P(zval_p)=C2=A0 =C2=A0Z_ISREF(*(zval_p))=C2=A0^= In file included from /usr/local/src/mapserver/mapscript/php/php_mapscript.= h:37:0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from /= usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:/usr/local/src/m= apserver/mapscript/php/php_mapscript_util.h:71:0: warning: "Z_ISREF" redefi= ned=C2=A0#define Z_ISREF(z)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Z_ISRE= F_P(&(z))=C2=A0^In file included from /usr/include/php/20190902/Zend/zend.h= :27:0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from /u= sr/include/php/20190902/main/php.h:34,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0from /usr/local/src/mapserver/mapscript/php/php_= mapscript.h:35,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0from /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:/usr/in= clude/php/20190902/Zend/zend_types.h:664:0: note: this is the location of t= he previous definition=C2=A0#define Z_ISREF(zval)=C2=A0 =C2=A0 (Z_TYPE(zval= ) =3D=3D IS_REFERENCE)=C2=A0^In file included from /usr/local/src/mapserver= /mapscript/php/php_mapscript.h:37:0,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0from /usr/local/src/mapserver/mapscript/php/mapscri= pt_error.c:32:/usr/local/src/mapserver/mapscript/php/php_mapscript_util.h:8= 4:27: error: unknown type name =E2=80=98zend_uint=E2=80=99=C2=A0static zend= _always_inline zend_uint zval_refcount_p(zval* pz) Any help would be appreciated? Regards,Stefanos ------=_Part_15056626_1329852308.1578597052172 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <html><head></head><body><div class=3D"yahoo-style-wrap" style=3D"font-fami= ly:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir= =3D"ltr" data-setdir=3D"false">Hello list,</div><div dir=3D"ltr" data-setdi= r=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false"> I= am confused about the new php mapcript version that comes with the SWIG fa= mily. 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.</div><div d= ir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"= false"> .... </div><div dir=3D"ltr" data-setdir=3D"false"><div><d= iv> -DWITH_PYTHON=3DON \</div><div= > -DWITH_PHP=3DON \</div><div><br>= </div><div dir=3D"ltr" data-setdir=3D"false">mapserv -v shows: </div><= div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdi= r=3D"false"><div><div>MapServer version 7.4.3 OUTPUT=3DPNG OUTPUT=3DJPEG SU= PPORTS=3DPROJ SUPPORTS=3DAGG SUPPORTS=3DFREETYPE SUPPORTS=3DXMP SUPPORTS=3D= WMS_SERVER SUPPORTS=3DWMS_CLIENT SUPPORTS=3DWFS_SERVER SUPPORTS=3DWFS_CLIEN= T SUPPORTS=3DWCS_SERVER SUPPORTS=3DFASTCGI SUPPORTS=3DGEOS INPUT=3DJPEG INP= UT=3DPOSTGIS INPUT=3DOGR INPUT=3DGDAL INPUT=3DSHAPEFILE</div><div><br></div= ></div>However in my phpinfo() I could not see the MapScript section so I h= ad to go to the php.ini and add the extension like</div><div dir=3D"ltr" da= ta-setdir=3D"false">extension=3Dphp_mapscript.so. After that and restarting= the server I see it there now.</div><div dir=3D"ltr" data-setdir=3D"false"= ><br></div><div dir=3D"ltr" data-setdir=3D"false">Is this the right approac= h now ?</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"l= tr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">= And one more question: </div><div dir=3D"ltr" data-setdir=3D"false"><b= r></div><div dir=3D"ltr" data-setdir=3D"false">I am also trying to compile = the same version of MapServer in my local machine (with Linux MInt) with th= e same cmake options and php version 7.2.26. But the compilation fails with= the following errors: </div><div dir=3D"ltr" data-setdir=3D"false"><b= r></div><div dir=3D"ltr" data-setdir=3D"false"><div><div>In file included f= rom /usr/include/php/20190902/Zend/zend.h:27:0,</div><div> &nb= sp; from /usr/include/php/20190902= /main/php.h:34,</div><div> = from /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35= ,</div><div> f= rom /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:</div><div>= /usr/include/php/20190902/Zend/zend_types.h:665:0: note: this is the locati= on of the previous definition</div><div> #define Z_ISREF_P(zval_p)&nbs= p; Z_ISREF(*(zval_p))</div><div> ^</div><div>In file included fr= om /usr/local/src/mapserver/mapscript/php/php_mapscript.h:37:0,</div><div>&= nbsp; from /usr/loca= l/src/mapserver/mapscript/php/mapscript_error.c:32:</div><div>/usr/local/sr= c/mapserver/mapscript/php/php_mapscript_util.h:71:0: warning: "Z_ISREF" red= efined</div><div> #define Z_ISREF(z) = Z_ISREF_P(&(z))</div><div> ^</div><div>In file included fr= om /usr/include/php/20190902/Zend/zend.h:27:0,</div><div> &nbs= p; from /usr/include/php/20190902/= main/php.h:34,</div><div> &= nbsp; from /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,= </div><div> fr= om /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:</div><div>/= usr/include/php/20190902/Zend/zend_types.h:664:0: note: this is the locatio= n of the previous definition</div><div> #define Z_ISREF(zval) &n= bsp; (Z_TYPE(zval) =3D=3D IS_REFERENCE)</div><div> ^</div><div>In file= included from /usr/local/src/mapserver/mapscript/php/php_mapscript.h:37:0,= </div><div> fr= om /usr/local/src/mapserver/mapscript/php/mapscript_error.c:32:</div><div>/= usr/local/src/mapserver/mapscript/php/php_mapscript_util.h:84:27: error: un= known type name =E2=80=98zend_uint=E2=80=99</div><div> static zend_alw= ays_inline zend_uint zval_refcount_p(zval* pz)</div><div><br></div></div><b= r></div><div dir=3D"ltr" data-setdir=3D"false">Any help would be appreciate= d?</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" d= ata-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">Regar= ds,</div><div dir=3D"ltr" data-setdir=3D"false">Stefanos</div><div dir=3D"l= tr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">= <br></div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr"= data-setdir=3D"false"><br></div><div><br></div><div><br></div><div><br></d= iv><div><br></div><div><br></div></div><br></div></div></body></html> ------=_Part_15056626_1329852308.1578597052172-- --===============2430630045993240220== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbWFwc2VydmVy LXVzZXJzIG1haWxpbmcgbGlzdAptYXBzZXJ2ZXItdXNlcnNAbGlzdHMub3NnZW8ub3JnCmh0dHBz Oi8vbGlzdHMub3NnZW8ub3JnL21haWxtYW4vbGlzdGluZm8vbWFwc2VydmVyLXVzZXJz --===============2430630045993240220==--