PHP mapscript installation in Mapserver 7.4
Stefanos Anastasiou <[email protected]> Thu, 9 Jan 2020 19:13:09 +0000 (UTC)
| Newsgroups | gmane.comp.gis.mapserver.user |
|---|---|
| Message-ID | <[email protected]> |
--===============5294112888578052173== Content-Type: multipart/alternative; boundary="----=_Part_15090536_38319122.1578597189159" ------=_Part_15090536_38319122.1578597189159 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_15090536_38319122.1578597189159 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"><div><div dir=3D"ltr" data-setdir=3D"false" = style=3D"color: rgb(0, 0, 0); font-family: "Helvetica Neue", Helv= etica, Arial, sans-serif;">Hello list,</div><div dir=3D"ltr" data-setdir=3D= "false" style=3D"color: rgb(0, 0, 0); font-family: "Helvetica Neue&quo= t;, Helvetica, Arial, sans-serif;"><br></div><div dir=3D"ltr" data-setdir= =3D"false" style=3D"color: rgb(0, 0, 0); font-family: "Helvetica Neue&= quot;, Helvetica, Arial, sans-serif;"> I am confused about the = new php mapcript version that comes with the SWIG family. I compiled a MapS= erver 7.4.3 version on my Ubuntu 19.04 server (with php version 7.2.24) suc= cessfully with php and python mapscript.</div><div dir=3D"ltr" data-setdir= =3D"false" style=3D"color: rgb(0, 0, 0); font-family: "Helvetica Neue&= quot;, Helvetica, Arial, sans-serif;"><br></div><div dir=3D"ltr" data-setdi= r=3D"false" style=3D"color: rgb(0, 0, 0); font-family: "Helvetica Neue= ", Helvetica, Arial, sans-serif;"> .... </div><div dir=3D"lt= r" data-setdir=3D"false" style=3D"color: rgb(0, 0, 0); font-family: "H= elvetica Neue", Helvetica, Arial, sans-serif;"><div> &nbs= p; -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-setdir=3D"false"><div><div= >MapServer version 7.4.3 OUTPUT=3DPNG OUTPUT=3DJPEG SUPPORTS=3DPROJ SUPPORT= S=3DAGG SUPPORTS=3DFREETYPE SUPPORTS=3DXMP SUPPORTS=3DWMS_SERVER SUPPORTS= =3DWMS_CLIENT SUPPORTS=3DWFS_SERVER SUPPORTS=3DWFS_CLIENT SUPPORTS=3DWCS_SE= RVER SUPPORTS=3DFASTCGI SUPPORTS=3DGEOS INPUT=3DJPEG INPUT=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 had to go to the ph= p.ini and add the extension like</div><div dir=3D"ltr" data-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 di= r=3D"ltr" data-setdir=3D"false">Is this the right approach now ?</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">And one more quest= ion: </div><div dir=3D"ltr" data-setdir=3D"false"><br></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 the same cmake opt= ions and php version 7.2.26. But the compilation fails with the following e= rrors: </div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir= =3D"ltr" data-setdir=3D"false"><div><div>In file included from /usr/include= /php/20190902/Zend/zend.h:27:0,</div><div>  = ; from /usr/include/php/20190902/main/php.h:34,<= /div><div> fro= m /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,</div><div>&nbs= p; from /usr/local/s= rc/mapserver/mapscript/php/mapscript_error.c:32:</div><div>/usr/include/php= /20190902/Zend/zend_types.h:665:0: note: this is the location of the previo= us definition</div><div> #define Z_ISREF_P(zval_p) Z_ISREF= (*(zval_p))</div><div> ^</div><div>In file included from /usr/local/sr= c/mapserver/mapscript/php/php_mapscript.h:37:0,</div><div> &nb= sp; from /usr/local/src/mapserver/= mapscript/php/mapscript_error.c:32:</div><div>/usr/local/src/mapserver/maps= cript/php/php_mapscript_util.h:71:0: warning: "Z_ISREF" redefined</div><div= > #define Z_ISREF(z) Z_ISREF_= P(&(z))</div><div> ^</div><div>In file included from /usr/include/= php/20190902/Zend/zend.h:27:0,</div><div> = from /usr/include/php/20190902/main/php.h:34,</= div><div> from= /usr/local/src/mapserver/mapscript/php/php_mapscript.h:35,</div><div> = ; from /usr/local/sr= c/mapserver/mapscript/php/mapscript_error.c:32:</div><div>/usr/include/php/= 20190902/Zend/zend_types.h:664:0: note: this is the location of the previou= s definition</div><div> #define Z_ISREF(zval) (Z_TYPE(zva= l) =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> = ; from /usr/local/sr= c/mapserver/mapscript/php/mapscript_error.c:32:</div><div>/usr/local/src/ma= pserver/mapscript/php/php_mapscript_util.h:84:27: error: unknown type name = =E2=80=98zend_uint=E2=80=99</div><div> static zend_always_inline zend_= uint zval_refcount_p(zval* pz)</div><div><br></div></div><br></div><div dir= =3D"ltr" data-setdir=3D"false">Any help would be appreciated?</div><div dir= =3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"fa= lse"><br></div><div dir=3D"ltr" data-setdir=3D"false">Regards,</div><div di= r=3D"ltr" data-setdir=3D"false">Stefanos</div></div></div><br></div></div><= /body></html> ------=_Part_15090536_38319122.1578597189159-- --===============5294112888578052173== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbWFwc2VydmVy LXVzZXJzIG1haWxpbmcgbGlzdAptYXBzZXJ2ZXItdXNlcnNAbGlzdHMub3NnZW8ub3JnCmh0dHBz Oi8vbGlzdHMub3NnZW8ub3JnL21haWxtYW4vbGlzdGluZm8vbWFwc2VydmVyLXVzZXJz --===============5294112888578052173==--