Opened 11 hours ago

Last modified 5 hours ago

#467 new defect

PHP: Unable to load dynamic library 'mapscript'

Reported by: a.labenne Owned by: Jeff McKenna
Priority: major Milestone: 5.2.0 release
Component: MS4W - Base Version: 5.0.0
Keywords: Cc:
Blocked By: Blocking:

Description

Hello,

We tried the experimental 5.2.0 release and we found a bug when testing the quickmap.php script. We have the following error :

Fatal error: Uncaught Error: Class "mapObj" not found in C:\ms4w\Apache\htdocs\quickmap.php on line 19

If we enable the error_log in PHP.ini there is the following error that show up :

[08-Jul-2025 08:04:26 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'mapscript' (tried: /ms4w/Apache/php/ext/mapscript (Le module spécifié est introuvable), /ms4w/Apache/php/ext/php_mapscript.dll (Le module spécifié est introuvable)) in Unknown on line 0
[08-Jul-2025 08:04:26 UTC] PHP Fatal error:  Uncaught Error: Class "mapObj" not found in C:\ms4w\Apache\htdocs\quickmap.php:19
Stack trace:
#0 {main}
  thrown in C:\ms4w\Apache\htdocs\quickmap.php on line 19

I verified and the php_mapscript.dll file exists in the searched location.

Do you have any clue for this kind of error ?

Regards,

Arnaud Labenne

Change History (2)

comment:1 by Jeff McKenna, 5 hours ago

Thanks for this report. I can't reproduce this with the experimental version yet, but what is the response when you try this command below?

cd ms4w
setenv.bat
php -dextension=C:/ms4w/Apache/php/ext/php_mapscript.dll -r "echo msGetVersion();"

It should return the MapServer version information such as:

MapServer version 8.6.0-dev (MS4W 5.2.0) PROJ version 9.7 GDAL version 3.12 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=SVGCAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF

comment:2 by Jeff McKenna, 5 hours ago

Also, be sure to run the /ms4w/tmp/VC_redist.x86.exe installer before testing the experimental 5.2.0

Version 0, edited 5 hours ago by Jeff McKenna (next)
Note: See TracTickets for help on using tickets.