[MapServer-users] Compiling mapserver with php in user directory

Jan Hartmann j.l.h.hartmann at gmail.com
Wed Oct 18 09:39:23 PDT 2023


I compiled with:

  -DPHP_INCLUDE_DIR=$INSTALLBIN/include/php \
  -DPHP_EXTENSION_DIR=$INSTALLBIN/lib/php/extensions/no-debug-non-zts-20220829

and got lots of error messages about missing .h files (php.h, zend.h 
etc). I bulk copied them all to the directory in the build tree where 
the errors came from, and got a complete build, including 
"php_mapscriptng.so"

So CMAKE is still missing the php include directories. What is de 
correct DEFINE for that?

After I copied php_mapscriptng.so to the correct location and filling in 
php.ini, I got a warning when starting PHP :

Startup: Unable to load dynamic library 'php_mapscriptng.so' (tried: 
/virdir/installbin/lib/php/extensions/no-debug-non-zts-20220829/php_mapscriptng.so 
(libgeos.so.3.12.0: cannot open shared object file: No such file or 
directory)

But  it *is* in that location. Any idea?

On 17/10/2023 21:45, Jeff McKenna via MapServer-users wrote:
> Hi Jan,
>
> Unfortunately I have much experience tracking down CMake errors now, ha.
>
> Instead of the error log, scroll up and read the output from your 
> cmake command (as it does its checks and looks for libraries), I find 
> examining that output is crucial (and I personally find the actual 
> generated log file is filled of fake/"red-herrings"). Focus instead on 
> going line-by-line through that cmake output, as it makes its way down 
> to the final "configuring incomplete" message.  (for packaging, this 
> is what I do, line-by-line)
>
> For example, if you are trying to enable the GEOS library, I would go 
> line-by-line of the output and find where it was looking for GEOS 
> initially, and read the messages in that section, to confirm that 
> there are no issues when enabling GEOS.  This is crucial.
>
> It takes much time to do this for each library.
>
> In my case, for PHPNG support, my CMake command includes: 
> "-DWITH_PHPNG=1 -DPHP_EXTENSION_DIR=/usr/lib/php/20220829"
>
> In your case I am not sure, but, I would start by examining 
> line-by-line the CMake output before the words "Configuring 
> incomplete" (and totally ignoring the generated 'output' file).
>
> Maybe you can find the PHPNG section in your cmake command output, and 
> paste that here for the community to review.
>
> -jeff
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231018/10c097d8/attachment.htm>


More information about the MapServer-users mailing list