<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="Arial">Hi,<br>
      <br>
      I am trying to get PHP Mapscript to run stably on a Debian 10
      machine. <br>
      The installation actually worked fine and everything is running,
      only there is an error after each automatic nightly restart of the
      Apache server. <br>
      After that PHP continues to run, but the Mapscript module does not
      work anymore.<br>
      <br>
      This is the error message from Apache after the restart at night:<br>
      <br>
      [Mon Jun 14 00:00:04.851967 2021] [mpm_prefork:notice] [pid 24101]
      AH00171: Graceful restart requested, doing restart<br>
      [Mon Jun 14 00:00:05.847274 2021] [mpm_prefork:notice] [pid 24101]
      AH00163: Apache/2.4.38 (Debian) configured -- resuming normal
      operations<br>
      [Mon Jun 14 00:00:05.847340 2021] [core:notice] [pid 24101]
      AH00094: Command line: '/usr/sbin/apache2'<br>
      [Mon Jun 14 00:00:06.934284 2021] [core:notice] [pid 24101]
      AH00052: child pid 29129 exit signal Segmentation fault (11)<br>
      <br>
      If I restart Apache manually after that everything runs normal
      again.<br>
      <br>
      <br>
      I did the following installation of Mapscript and Mapserver:<br>
      <br>
      1. Installation Apache Postgres GDAL:<br>
      apt-get -y install apache2 libapache2-mod-php
      postgresql-11-postgis-2.5 gdal-bin<br>
      postgresql-11-ogr-fdw && apt-get clean<br>
      <br>
      2. PHP components:<br>
      apt-get -y install php-pgsql php-gd php-curl php-mbstring
      php-sqlite3 php-zip phpsqlite3 php-bcmath php-xml &&
      apt-get clean<br>
      a2enmod cgi && systemctl restart apache2<br>
      <br>
      3. Mapserver 7.6x with PHP Mapscript - own compilation with cmake:<br>
      <br>
      sudo apt-get install libfreetype6-dev php-dev libproj-dev
      libfribidi-dev<br>
      libharfbuzz-dev libcairo-dev libgdal-dev libgpg-error-dev
      libcurl4-openssl-dev<br>
      libfcgi-dev<br>
      <br>
      wget <a class="moz-txt-link-freetext" href="http://download.osgeo.org/mapserver/mapserver-7.6.3.tar.gz">http://download.osgeo.org/mapserver/mapserver-7.6.3.tar.gz</a>
      && /<br>
      tar xvf mapserver-7.6.3.tar.gz && /<br>
      cd mapserver-7.6.3/<br>
      sudo apt-get install cmake<br>
      mkdir build<br>
      cd build<br>
      <br>
      cmake -DCMAKE_INSTALL_PREFIX=/opt \<br>
      -DCMAKE_PREFIX_PATH=/usr/local:/opt \<br>
      -DWITH_CLIENT_WFS=ON \<br>
      -DWITH_CLIENT_WMS=ON \<br>
      -DWITH_WCS=ON \<br>
      -DWITH_THREAD_SAFETY=ON \<br>
      -DWITH_PHP=ON \<br>
      -DWITH_KML=ON \<br>
      -DWITH_GEOS=ON \<br>
      -DWITH_GDAL=ON \<br>
      -DWITH_OGR=ON \<br>
      -DWITH_PROJ=ON \<br>
      -DWITH_CAIRO=ON \<br>
      -DWITH_POSTGIS=ON \<br>
      -DWITH_CURL=ON \<br>
      -DWITH_SOS=ON \<br>
      -DWITH_XMLMAPFILE=0 \<br>
      -DWITH_FCGI=ON \<br>
      -DWITH_LIBXML2=ON \<br>
      -DWITH_GIF=ON \<br>
      -DWITH_FRIBIDI=0 \<br>
      -DWITH_HARFBUZZ=0 \<br>
      -DWITH_PROTOBUFC=0 \<br>
      -DWITH_PYTHON=OFF \<br>
      -DWITH_SVGCAIRO=OFF \<br>
      ..<br>
      make<br>
      sudo make install<br>
      echo
      extension=php_mapscript.so>/etc/php/7.3/mods-available/mapscript.ini<br>
      <br>
      phpenmod mapscript<br>
      service apache2 restart<br>
      <br>
      after these installation steps I have a perfectly running PHP
      version 7.3.27-1~deb10u1 with Mapscript (MapServer version 7.6.3)
      but as said the Mapscript module error after every nightly restart
      of Apache.<br>
      If I restart Apache manually after that everything runs normal
      again.<br>
      I am now quite at a loss...<br>
      <br>
      Thanks for any advice, unfortunately I am not a Debian (Linux)
      expert.<br>
      <br>
      Sven<br>
      <br>
      <br>
      <br>
      <br>
      After this<br>
      <br>
      <br>
      <br>
    </font>
    <div class="moz-signature">Greetings Sven<br>
      <br>
      <br>
    </div>
  </body>
</html>