Changeset 556 for trunk/zoo-project


Ignore:
Timestamp:
Feb 9, 2015, 11:16:06 AM (6 years ago)
Author:
knut
Message:

Added null pointer checks in service_internal_php.c. In WIN32 version, fixed problem loading PHP scripts by disabling FastCGI wrappers in service_internal_php.c.

Location:
trunk/zoo-project/zoo-kernel
Files:
2 edited

Legend:

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

    r509 r556  
    2323 */
    2424
     25#ifdef WIN32
     26  #define NO_FCGI_DEFINES
     27#endif
     28 
    2529#include "service_internal_php.h"
    2630
     
    3741map* php_map_from_HasTable(HashTable* t);
    3842
    39 int zoo_php_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){
     43int zoo_php_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){   
    4044  maps* m=*main_conf;
    4145  maps* inputs=*real_inputs;
     
    6367
    6468  php_embed_init(0,NULL,&tsrm_ls);
    65  
     69   
    6670  zend_try {
     71
    6772    php_execute_script(&iscript TSRMLS_CC);
    6873
     
    118123  tres=array_init(mapArray);
    119124  while(tmp!=NULL){
    120     map* sMap=getMapArray(tmp,"size",0);
    121     if(strncmp(tmp->name,"value",5)==0 && sMap!=NULL){
     125    map* sMap=getMapArray(tmp,"size",0);   
     126        if(strncmp(tmp->name,"value",5)==0 && sMap!=NULL && tmp->value != NULL){
    122127      tres=add_assoc_stringl(mapArray,tmp->name,tmp->value,atoi(sMap->value),1);
    123     }else
     128        }
     129        else if (tmp->value != NULL) {
    124130      tres=add_assoc_string(mapArray,tmp->name,tmp->value,1);
     131        }
    125132    tmp=tmp->next;
    126133  }
     
    170177      cursor->name=strdup(key);
    171178    }
    172     fprintf(stderr,"key : %s\n",key);
     179#ifdef DEBUG   
     180    fprintf(stderr,"key : %s\n",key);
     181#endif 
    173182    HashTable* t=HASH_OF(*ppzval);
    174183#ifdef DEBUG
     
    246255  return final_res;
    247256}
     257
     258
     259
     260
     261
     262
     263
     264
     265
     266
     267
     268
     269
     270
  • trunk/zoo-project/zoo-kernel/service_internal_php.h

    r509 r556  
    2626#define ZOO_SERVICE_INTERNAL_PHP_H 1
    2727
    28 #pragma once 
     28#pragma once
    2929
    3030#include "service.h"
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