[mapserver-users] php map script build/map server build

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri May 21 16:40:18 PDT 2021


Hi Jason,

I'll try to respond, comments inline below:

On 2021-05-21 6:12 p.m., Jason Snyder via mapserver-users wrote:
> To Whom it May Concern,
> 
> I am encountering several issues with building mapserver and also the 
> mapscript php utility.
> 
> 1). When attempting to build mapserver I keep getting the error message:
> 
> CheckFunctionExists.c:(.text+0x10): undefined reference to `strrstr'
> 
> How do I resolve this issue?  I noticed that string.h is being called by 
> the utilities that use strrstr but why am I getting this weird error 
> message?  I tried to search for this error but cannot find any solid 
> solutions to resolve this issue?  Any ideas?

When do you get that error?  I assume this is during your 'cmake' 
command, if so I think there are some checks for strrstr and it should 
move on past that, and still generate a cmake log.

Or is that error from the 'make' command instead?

> 
> 
> 2) I am also trying to build the php mapscript but I do not see any make 
> files or such for configuring the php mapscript.  There is also 
> no readme for building this in centos 7 or centos 8.  How do I build php 
> mapscript on centos 7 or centos 8?
> 

Likely no readme or docs exist for CentOS, because no one has 
contributed that (or someone like me, who used to build on CentOS, has 
moved onto Ubuntu).  So, contributions are welcomed, as you travel down 
this path (contribute at 
https://github.com/MapServer/MapServer-documentation )

But, make sure that you specify "-DWITH_PHPNG=1" in your cmake command, 
and that you have SWIG installed on that system (preferably SWIG >= 4).

After you 'make' and then 'make install',  you should follow the steps 
for PHP 7 at : 
https://mapserver.org/MIGRATION_GUIDE.html#mapserver-7-2-to-7-4-migration

(regarding installing PHP7 on CentOS, you might also be required to 
install something like 'php-devel', but that's only a guess)

Also, please be sure to build from a stable release archive, such as 
MapServer 7.6.3


Well I hope those notes give you a little help.  Maybe others can jump 
in here as well to help.

Wishing you a nice long weekend (it's a long weekend in Canada).  Gotta 
think positive sometimes, even in the worst of times :)

-jeff

-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/










More information about the mapserver-users mailing list