Ignore:
Timestamp:
Oct 12, 2016, 3:47:26 PM (8 years ago)
Author:
knut
Message:

Implemented support for PHP 7: The Zend API for PHP 7/PHPNG is substantially different from older versions. Therefore, an alternative implementation of zoo_php_support is provided in the new source file service_internal_php7.c. Presently the Zoo kernel can be built with support for either PHP 7 or older versions, see the makefiles (for Windows) nmake.opt and makefile.vc. Other makefiles have not been updated.

Fixed problem with ambiguous symbol in service_conf.y. Fixed problem with conversion of line endings yielding extra bytes in _getStatusFile on Windows platforms. Removed call to free() stack memory in zoo_service_loader.c. Fixed issue with size of structs in service.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/zoo_service_loader.c

    r784 r788  
    2222 * THE SOFTWARE.
    2323 */
    24 
     24 
    2525extern "C" int yylex ();
    2626extern "C" int crlex ();
     
    104104extern char **environ;
    105105#endif
     106
    106107
    107108#ifdef WIN32
     
    668669      *eres =
    669670        zoo_php_support (&m, request_inputs, s1, &request_input_real_format,
    670                          &request_output_real_format);
     671                         &request_output_real_format);         
    671672    }
    672673  else
     
    890891runRequest (map ** inputs)
    891892{
    892 
     893 
    893894#ifndef USE_GDB
    894895#ifndef WIN32
     
    940941#endif
    941942#endif
     943
    942944  if (conf_read (conf_file, m) == 2)
    943945    {
     
    16211623    return 0;
    16221624  }
    1623  
    16241625  s1 = NULL;
    16251626  s1 = (service *) malloc (SERVICE_SIZE);
     
    19951996  dumpMap (request_inputs);
    19961997#endif
    1997 
    19981998  int ei = 1;
    19991999  char *s =
     
    20462046  }
    20472047#endif
     2048
    20482049  char *fbkp, *fbkpid, *fbkpres, *fbkp1, *flog;
    20492050  FILE *f0, *f1;
     
    20682069        return -1;
    20692070      }
    2070 
    20712071      loadServiceAndRun (&m, s1, request_inputs, &request_input_real_format,
    20722072                         &request_output_real_format, &eres);
     
    21242124            (char *)
    21252125            malloc ((strlen (r_inputs->value) +
    2126                      strlen (usid->value) + 7) * sizeof (char));
     2126                     strlen (usid->value) + 7) * sizeof (char));                   
    21272127          sprintf (fbkpres, "%s/%s.res", r_inputs->value, usid->value);
    21282128          bmap = (maps *) malloc (MAPS_SIZE);
     
    22582258  dumpMaps (request_output_real_format);
    22592259#endif
     2260
    22602261  if (eres != -1)
    22612262    outputResponse (s1, request_input_real_format,
     
    22632264                    cpid, m, eres);
    22642265  fflush (stdout);
    2265  
     2266
    22662267  /**
    22672268   * Ensure that if error occurs when freeing memory, no signal will return
     
    22772278  signal (SIGABRT, donothing);
    22782279#endif
    2279  
     2280
    22802281  if (((int) getpid ()) != cpid || cgiSid != NULL)
    22812282    {
     
    22882289      if(dumpBackFinalFile(m,fbkp,fbkp1)<0)
    22892290        return -1;
    2290 
    22912291      unlink (fbkpid);
    22922292      switch(eres){
     
    23002300        setMapInMaps(m,"lenv","fstate",wpsStatus[0]);
    23012301        break;
    2302       }
     2302      }     
    23032303#ifndef RELY_ON_DB
    23042304      dumpMapsToFile(bmap,fbkpres,1);
     
    23132313      unhandleStatus (m);
    23142314      free(fbkpid);
    2315       free(fbkpres);
    2316       free (flog);
     2315      free(fbkpres); 
     2316      free (flog);           
    23172317      free (fbkp1);
    2318       free (tmps1);
     2318      // free (tmps1); // tmps1 is stack memory and should not be freed
    23192319      if(cgiSid!=NULL)
    23202320        free(cgiSid);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png