[MapServer-users] Swig Mapscript Still Fails to Build with PHP 8

b g mapserverlearn at outlook.com
Tue Oct 4 12:33:22 PDT 2022


Hello Jeff,

In response to my last message I had an update. As it turns out, I mistakenly overwrote some code in my php.ini file that was referencing the 7.6.4 MapServer file in the "extension_dir =" setting. It is now set to the current version and everything is working now. Thank you so much again for all your help!

- bg

________________________________
From: MapServer-users <mapserver-users-bounces at lists.osgeo.org> on behalf of b g <mapserverlearn at outlook.com>
Sent: Wednesday, September 28, 2022 3:34 PM
To: mapserver-users at lists.osgeo.org <mapserver-users at lists.osgeo.org>
Subject: [MapServer-users] Swig Mapscript Still Fails to Build with PHP 8

Jeff,

I think I figured out what I was missing earlier regarding the build. Those lines you provided me for the Swig setup provided a successful build for cmake to compile.

As of right now, I have:


mapserv -v

MapServer version 8.0.0


php -v

PHP 8.0.23


With a warning

PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried: /usr/local/lib/php/pecl/20190902/php_mapscriptng.so (dlopen(/usr/local/lib/php/pecl/20190902/php_mapscriptng.so, 9): image not found), /usr/local/lib/php/pecl/20190902/php_mapscriptng.so.so (dlopen(/usr/local/lib/php/pecl/20190902/php_mapscriptng.so.so, 9): image not found)) in Unknown on line 0

and


swig -version

SWIG Version 4.1.0

However, I think I'm still missing something (possibly related to the PHP warning above). The page is unable load due to -- I'm guessing the Swig Mapscript library being unable to be referenced. I looked in the README files provided within the MapServer directory and within the README.rst it says:
"The main MapScript SWIG interface file is ``mapscript/mapscript.i``.  This
file includes specific class interface files from ``mapscript/swiginc`` and
language specific code from the language directories."

So I added that in an include statement at the top of the PHP index file but it still doesn't work. Is the mapscript.i file what is supposed to replace the mapscript.php file? I know you are on the Windows side of things so hopefully if you don't know the answer to this question then maybe someone else will.

And thank you for the link to the wiki page. I have a very detailed guide (that I have been polishing as I go along) that I will add to that page for other mac users.

Thanks,

bg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221004/72f50860/attachment.htm>


More information about the MapServer-users mailing list