<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
I made a docker version of mapserver/php-mapscript myself, based on
Ubuntu 22.04. I installed all required libraries with apt, and
compiled mapserver and mapscript according to instructions. No
problem at all.<br>
<br>
At the end I got the following from phpinfo();<br>
<br>
<h2
style="font-size: 20px; color: rgb(34, 34, 34); font-family: sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: center; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><a
name="module_mapscript">mapscript</a></h2>
<table
style="border-collapse: collapse; border: 0px; width: 934px; box-shadow: rgb(204, 204, 204) 1px 2px 3px; margin: 1em auto; text-align: left; color: rgb(34, 34, 34); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
<tbody>
<tr>
<td class="e"
style="border: 1px solid rgb(102, 102, 102); font-size: 12px; vertical-align: baseline; padding: 4px 5px; background-color: rgb(204, 204, 255); width: 300px; font-weight: bold;">MapServer
Version</td>
<td class="v"
style="border: 1px solid rgb(102, 102, 102); font-size: 12px; vertical-align: baseline; padding: 4px 5px; background-color: rgb(221, 221, 221); max-width: 300px; overflow-x: auto; overflow-wrap: break-word;">MapServer
version 8.0.1 PROJ version 9.3 GDAL version 3.4 OUTPUT=PNG
OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=OGCAPI_SERVER SUPPORTS=GEOS INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
INPUT=FLATGEOBUF</td>
</tr>
</tbody>
</table>
<br class="Apple-interchange-newline">
But no mapscript function or object was regognized in my
PHP-scripts:<br>
<br>
PHP Fatal error: Uncaught Error: Class "mapObj" not found in
/virdir/www_root/test.php:2<br>
Stack trace:<br>
#0 {main}<br>
thrown in /virdir/www_root/test.php on line 2<br>
<br>
<br>
I am really desparate. Has anyone ever succeeded to get
php_mapscriptng.so to work? Or does anyone know of a working Docker
image for MapServer with PHP MapScript?<br>
<br>
Jan<br>
<br>
<div class="moz-cite-prefix">On 21/10/2023 05:40, Jan Hartmann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1b174510-f8bc-49ab-8d64-6c93415b54dd@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
I tried this with serveral versions of PHP and MapServer, but got
always the same result. Can anyone point me to a Docker image for
MapServer + PHP-MapScript?<br>
<br>
Jan<br>
<br>
<div class="moz-cite-prefix">On 19/10/2023 18:12, Jan Hartmann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:69ba4e0a-583b-43e2-bb90-1a0607b306bd@gmail.com">
<meta http-equiv="content-type"
content="text/html; charset=UTF-8">
Still not there. Everything has been installed, and phpinfo()
gives:<br>
<br>
<table
style="border-collapse: collapse; border: 0px; width: 934px; box-shadow: rgba(0, 0, 0, 0.2) 1px 2px 3px; margin: 1em auto; text-align: left; color: rgb(34, 34, 34); font-family: sans-serif; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
<tbody>
<tr>
<td class="e"
style="border: 1px solid rgb(102, 102, 102); font-size: 12px; vertical-align: baseline; padding: 4px 5px; background-color: rgb(204, 204, 255); width: 300px; font-weight: bold;">MapServer
Version</td>
<td class="v"
style="border: 1px solid rgb(102, 102, 102); font-size: 12px; vertical-align: baseline; padding: 4px 5px; background-color: rgb(221, 221, 221); max-width: 300px; overflow-x: auto; overflow-wrap: break-word;">MapServer
version 8.0.1 PROJ version 9.3 GDAL version 3.7
OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=OGCAPI_SERVER INPUT=JPEG INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF</td>
</tr>
</tbody>
</table>
<br class="Apple-interchange-newline">
But calling "$map = new mapObj('mapfile.map');" gives: <br>
<br>
<b
style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Fatal
error</b><span
style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">:
Uncaught Error: Class "mapObj" not found in
/mnt/virdir/www_root/test/test_mapscript.php:2 Stack trace: #0
{main} thrown in<span> </span></span><b
style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">/mnt/virdir/www_root/test/test_mapscript.php</b><span
style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"><span> </span>on
line<span> </span></span><b
style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">2<br>
<br>
</b>Any idea?<br>
<br>
Jan<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>