<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Bob, this is the documentation for the new SWIG version of PHP
MapScript:<br>
<br>
Migration Guide:
<a class="moz-txt-link-freetext" href="https://mapserver.org/mapscript/php/migration_guide.html#migrating-to-7-4-s-new-swig-api-and-php-7">https://mapserver.org/mapscript/php/migration_guide.html#migrating-to-7-4-s-new-swig-api-and-php-7</a><br>
API-Guide: <a class="moz-txt-link-freetext" href="https://mapserver.org/mapscript/mapscript-api/index.html">https://mapserver.org/mapscript/mapscript-api/index.html</a><br>
Examples: <a class="moz-txt-link-freetext" href="https://ms4w.com/trac/wiki/MigrationGuide5.x">https://ms4w.com/trac/wiki/MigrationGuide5.x</a><br>
<br>
It took me some time to discover the config file, required since
MapServer 8:<br>
<a class="moz-txt-link-freetext" href="https://mapserver.org/mapfile/config.html">https://mapserver.org/mapfile/config.html</a><br>
<br>
To migrate old scripts I use:<br>
<br>
<?php<br>
function ms_newMapObj($mapFile) {return new mapObj ($mapFile);}<br>
function ms_newLayerObj($oMap) {return new layerObj ($oMap);}<br>
function ms_newClassObj($oLayer) {return new ClassObj ($oLayer);}<br>
function ms_newStyleObj($oClass) {return new styleObj ($oClass);}<br>
function ms_newOwsRequestObj() {return new owsRequest ();}<br>
?><br>
<br>
and have to adapt some ->set functions, e.g. metadata<br>
<br>
Good luck,<br>
<br>
Jan<br>
<br>
<div class="moz-cite-prefix">On 01/12/2026 08:18, Bob Bruce via
MapServer-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1763859274.111521023.1796109488989.JavaMail.zimbra@shaw.ca">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div
style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000000">
<div>Thanks Jeff and Richard for your help.</div>
<div><br data-mce-bogus="1">
</div>
<div>Removing php 8.5 resolved my problem. I have successfully
build php_mapscriptng.so .</div>
<div><br data-mce-bogus="1">
</div>
<div>Are there any up to date working examples of PHP mapscript
working with the SWIG bindings? I'm having trouble
transitioning from old PHP mapscript into this new system.</div>
<div><br data-mce-bogus="1">
</div>
<div>thank you all for your help</div>
<div><br data-mce-bogus="1">
</div>
<div> Bob Bruce</div>
<div><br>
</div>
<hr id="zwchr" data-marker="__DIVIDER__">
<div data-marker="__HEADERS__"><b>From: </b>"Bob Bruce, (CON)"
<a class="moz-txt-link-rfc2396E" href="mailto:bob.bruce@shaw.ca"><bob.bruce@shaw.ca></a><br>
<b>To: </b>"Richard Greenwood"
<a class="moz-txt-link-rfc2396E" href="mailto:richard.greenwood@gmail.com"><richard.greenwood@gmail.com></a>, "Jeff McKenna"
<a class="moz-txt-link-rfc2396E" href="mailto:jmckenna@gatewaygeomatics.com"><jmckenna@gatewaygeomatics.com></a><br>
<b>Cc: </b>"MapServer Users List List"
<a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org"><mapserver-users@lists.osgeo.org></a><br>
<b>Sent: </b>Monday, November 30, 2026 5:05:36 PM<br>
<b>Subject: </b>Re: [MapServer-users] Errors Building
mapscript for mapserver-8.6.6<br>
</div>
<div><br>
</div>
<div data-marker="__QUOTED_TEXT__">
<div dir="auto">Thanks Richard. I will certainly pursue that
line as there was some confusion when we installed PHP on
the server. I was concerned about that big vulnerability
that hit the news about a month ago and installed php 8.5 at
first then reverted to the latest patched 8.4 afterwards.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks again,</div>
<div dir="auto"> Bob Bruce </div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<br>
<div align="left" dir="auto"
style="font-size:100%;color:#000000">
<div>-------- Original message --------</div>
<div>From: Richard Greenwood
<a class="moz-txt-link-rfc2396E" href="mailto:richard.greenwood@gmail.com"><richard.greenwood@gmail.com></a> </div>
<div>Date: 2026-11-30 4:47 p.m. (GMT-07:00) </div>
<div>To: Jeff McKenna <a class="moz-txt-link-rfc2396E" href="mailto:jmckenna@gatewaygeomatics.com"><jmckenna@gatewaygeomatics.com></a>
</div>
<div>Cc: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>, <a class="moz-txt-link-abbreviated" href="mailto:bob.bruce@shaw.ca">bob.bruce@shaw.ca</a>
</div>
<div>Subject: Re: [MapServer-users] Errors Building
mapscript for mapserver-8.6.6 </div>
<br>
</div>
<div dir="ltr">
<div>Bob, </div>
<br>
I know this isn't super helpful but I just built it on
Debian 13 w/o any error using your configuration (see
below). I think Jeff's comments are worth pursuing - make
sure your php installation is current and that you don't
have any old versions installed.<br>
<div>cmake .. \<br>
-DCMAKE_INSTALL_PREFIX=/usr/local \<br>
-DWITH_PHPNG=ON \<br>
-DWITH_PROJ=ON \<br>
-DWITH_GEOS=ON \<br>
-DWITH_CLIENT_WMS=ON \<br>
-DWITH_CLIENT_WFS=ON \<br>
-DWITH_CURL=ON \<br>
-DWITH_CAIRO=ON \<br>
-DWITH_PROTOBUFC=OFF<br>
</div>
<br>
<div>$ mapserv -v<br>
MapServer version 8.6.6 PROJ version 9.9 GDAL version 3.13
OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=OGCAPI_SERVER
SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF</div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div class="gmail_attr" dir="ltr">On Mon, Nov 30, 2026 at
2:33 PM Jeff McKenna via MapServer-users <<a
href="mailto:mapserver-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">mapserver-users@lists.osgeo.org</a>>
wrote:<br>
</div>
<blockquote
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-left:1ex"
class="gmail_quote">Hi Bob,<br>
<br>
I wonder if you have an older PHP installed on that
machine, as well as <br>
PHP 8.4.28, and during compile it is finding the headers
of that older <br>
PHP (I have run into that problem before too).<br>
<br>
I don't have Debian trixie locally to test, so my exact
syntax (and <br>
package names) might be wrong, but I might try something
like:<br>
<br>
#install<br>
sudo apt install php8.4-dev php8.4 php8.4-cli<br>
<br>
#verify that PHP 8.4 is found<br>
php-config --version<br>
which php-config<br>
php -v<br>
<br>
#remove old PHP version<br>
sudo a2dismod php5<br>
sudo apt-get purge php5*<br>
<br>
Maybe another Trixie guru has better commands than myself.<br>
<br>
-jeff<br>
<br>
<br>
<br>
<br>
-- <br>
Jeff McKenna<br>
GatewayGeo: Developers of MS4W, & offering MapServer
Consulting/Dev<br>
co-founder of FOSS4G<br>
<a rel="noreferrer nofollow noopener noreferrer"
href="http://gatewaygeo.com/" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://gatewaygeo.com/</a><br>
<br>
<br>
<br>
On 2026-11-30 4:39 p.m., Bob Bruce via MapServer-users
wrote:<br>
> Hi Richard,<br>
> thanks for getting back to me,
here is what I find <br>
> when I query the debian version:<br>
> <br>
> PRETTY_NAME="Debian GNU/Linux 13 (trixie)"<br>
> NAME="Debian GNU/Linux"<br>
> VERSION_ID="13"<br>
> VERSION="13 (trixie)"<br>
> VERSION_CODENAME=trixie<br>
> DEBIAN_VERSION_FULL=13.7<br>
> ID=debian<br>
> <br>
> Bob Bruce<br>
> <br>
>
------------------------------------------------------------------------<br>
> *From: *"Richard Greenwood" <<a
href="mailto:richard.greenwood@gmail.com"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">richard.greenwood@gmail.com</a>><br>
> *To: *"Bob Bruce" <<a
href="mailto:bob.bruce@shaw.ca" target="_blank"
rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">bob.bruce@shaw.ca</a>><br>
> *Cc: *"MapServer Users List List" <<a
href="mailto:mapserver-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">mapserver-users@lists.osgeo.org</a>><br>
> *Sent: *Monday, November 30, 2026 1:09:35 PM<br>
> *Subject: *Re: [MapServer-users] Errors Building
mapscript for <br>
> mapserver-8.6.6<br>
> <br>
> Which version of Debian?<br>
> <br>
> On Mon, Nov 30, 2026 at 1:06 PM Bob Bruce via
MapServer-users <br>
> <<a href="mailto:mapserver-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">mapserver-users@lists.osgeo.org</a>
<mailto:<a href="mailto:mapserver-" target="_blank"
rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">mapserver-</a>
<br>
> <a href="mailto:users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">users@lists.osgeo.org</a>>>
wrote:<br>
> <br>
> Hi Jeff -<br>
> <br>
> thanks for getting back to me. I have
checked and I'm running<br>
> SWIG 4.3.0. Here are the messages that I got when
I checked:<br>
> <br>
> SWIG Version 4.3.0<br>
> <br>
> Compiled with g++ [x86_64-pc-linux-gnu]<br>
> <br>
> Configured options: +pcre<br>
> <br>
> do you have any other idea as to why the make is
not working?<br>
> <br>
> I am starting work to update <a
rel="noreferrer nofollow noopener noreferrer"
href="http://themuralsofwinnipeg.com" target="_blank"
moz-do-not-send="true">themuralsofwinnipeg.com</a>
<http://<br>
> <a rel="noreferrer nofollow noopener noreferrer"
href="http://themuralsofwinnipeg.com" target="_blank"
moz-do-not-send="true">themuralsofwinnipeg.com</a>>
mapping interface to modern standards.<br>
> <br>
> Bob Bruce<br>
> _______________________________________________<br>
> MapServer-users mailing list<br>
> <a href="mailto:MapServer-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">MapServer-users@lists.osgeo.org</a>
<mailto:<a
href="mailto:MapServer-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">MapServer-users@lists.osgeo.org</a>><br>
> <a rel="noreferrer nofollow noopener noreferrer"
href="https://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
<https://<br>
> <a rel="noreferrer nofollow noopener noreferrer"
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank" moz-do-not-send="true">lists.osgeo.org/mailman/listinfo/mapserver-users</a>><br>
> <br>
> <br>
> <br>
> -- <br>
> Richard W. Greenwood<br>
> <br>
> <br>
> _______________________________________________<br>
> MapServer-users mailing list<br>
> <a href="mailto:MapServer-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">MapServer-users@lists.osgeo.org</a><br>
> <a rel="noreferrer nofollow noopener noreferrer"
href="https://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org"
target="_blank" rel="nofollow noopener noreferrer"
moz-do-not-send="true" class="moz-txt-link-freetext">MapServer-users@lists.osgeo.org</a><br>
<a rel="noreferrer nofollow noopener noreferrer"
href="https://lists.osgeo.org/mailman/listinfo/mapserver-users"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote>
</div>
<div><br clear="all">
</div>
<br>
<span class="gmail_signature_prefix">-- </span><br>
<div class="gmail_signature" dir="ltr">
<div dir="ltr">Richard W. Greenwood<br>
</div>
</div>
<br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
MapServer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
</body>
</html>