|
version 1.1.1.2, 2012/05/29 12:34:42
|
version 1.1.1.3, 2013/07/22 01:32:01
|
|
Line 2
|
Line 2
|
| +----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| | PHP Version 5 | |
| PHP Version 5 | |
| +----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| | Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2013 The PHP Group | |
| +----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| | This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| | that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
|
Line 463 zend_module_entry soap_module_entry = {
|
Line 463 zend_module_entry soap_module_entry = {
|
| ZEND_GET_MODULE(soap) |
ZEND_GET_MODULE(soap) |
| #endif |
#endif |
| |
|
| ZEND_INI_MH(OnUpdateCacheEnabled) |
|
| { |
|
| if (OnUpdateBool(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) { |
|
| return FAILURE; |
|
| } |
|
| if (SOAP_GLOBAL(cache_enabled)) { |
|
| SOAP_GLOBAL(cache) = SOAP_GLOBAL(cache_mode); |
|
| } else { |
|
| SOAP_GLOBAL(cache) = 0; |
|
| } |
|
| return SUCCESS; |
|
| } |
|
| |
|
| ZEND_INI_MH(OnUpdateCacheMode) |
ZEND_INI_MH(OnUpdateCacheMode) |
| { |
{ |
| char *p; |
char *p; |
|
Line 489 ZEND_INI_MH(OnUpdateCacheMode)
|
Line 476 ZEND_INI_MH(OnUpdateCacheMode)
|
| |
|
| *p = (char)atoi(new_value); |
*p = (char)atoi(new_value); |
| |
|
| if (SOAP_GLOBAL(cache_enabled)) { | return SUCCESS; |
| SOAP_GLOBAL(cache) = SOAP_GLOBAL(cache_mode); | } |
| } else { | |
| SOAP_GLOBAL(cache) = 0; | static PHP_INI_MH(OnUpdateCacheDir) |
| | { |
| | /* Only do the open_basedir check at runtime */ |
| | if (stage == PHP_INI_STAGE_RUNTIME || stage == PHP_INI_STAGE_HTACCESS) { |
| | char *p; |
| | |
| | if (memchr(new_value, '\0', new_value_length) != NULL) { |
| | return FAILURE; |
| | } |
| | |
| | /* we do not use zend_memrchr() since path can contain ; itself */ |
| | if ((p = strchr(new_value, ';'))) { |
| | char *p2; |
| | p++; |
| | if ((p2 = strchr(p, ';'))) { |
| | p = p2 + 1; |
| | } |
| | } else { |
| | p = new_value; |
| | } |
| | |
| | if (PG(open_basedir) && *p && php_check_open_basedir(p TSRMLS_CC)) { |
| | return FAILURE; |
| | } |
| } |
} |
| |
|
| |
OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC); |
| return SUCCESS; |
return SUCCESS; |
| } |
} |
| |
|
| PHP_INI_BEGIN() |
PHP_INI_BEGIN() |
| STD_PHP_INI_ENTRY("soap.wsdl_cache_enabled", "1", PHP_INI_ALL, OnUpdateCacheEnabled, | STD_PHP_INI_ENTRY("soap.wsdl_cache_enabled", "1", PHP_INI_ALL, OnUpdateBool, |
| cache_enabled, zend_soap_globals, soap_globals) |
cache_enabled, zend_soap_globals, soap_globals) |
| STD_PHP_INI_ENTRY("soap.wsdl_cache_dir", "/tmp", PHP_INI_ALL, OnUpdateString, | STD_PHP_INI_ENTRY("soap.wsdl_cache_dir", "/tmp", PHP_INI_ALL, OnUpdateCacheDir, |
| cache_dir, zend_soap_globals, soap_globals) |
cache_dir, zend_soap_globals, soap_globals) |
| STD_PHP_INI_ENTRY("soap.wsdl_cache_ttl", "86400", PHP_INI_ALL, OnUpdateLong, |
STD_PHP_INI_ENTRY("soap.wsdl_cache_ttl", "86400", PHP_INI_ALL, OnUpdateLong, |
| cache_ttl, zend_soap_globals, soap_globals) |
cache_ttl, zend_soap_globals, soap_globals) |
|
Line 1102 PHP_METHOD(SoapServer, SoapServer)
|
Line 1114 PHP_METHOD(SoapServer, SoapServer)
|
| memset(service, 0, sizeof(soapService)); |
memset(service, 0, sizeof(soapService)); |
| service->send_errors = 1; |
service->send_errors = 1; |
| |
|
| cache_wsdl = SOAP_GLOBAL(cache); | cache_wsdl = SOAP_GLOBAL(cache_enabled) ? SOAP_GLOBAL(cache_mode) : 0; |
| |
|
| if (options != NULL) { |
if (options != NULL) { |
| HashTable *ht = Z_ARRVAL_P(options); |
HashTable *ht = Z_ARRVAL_P(options); |
|
Line 1657 PHP_METHOD(SoapServer, handle)
|
Line 1669 PHP_METHOD(SoapServer, handle)
|
| } |
} |
| } |
} |
| #endif |
#endif |
| /* If new session or something wierd happned */ | /* If new session or something weird happned */ |
| if (soap_obj == NULL) { |
if (soap_obj == NULL) { |
| zval *tmp_soap; |
zval *tmp_soap; |
| |
|
|
Line 2318 PHP_METHOD(SoapClient, SoapClient)
|
Line 2330 PHP_METHOD(SoapClient, SoapClient)
|
| php_error_docref(NULL TSRMLS_CC, E_ERROR, "$wsdl must be string or null"); |
php_error_docref(NULL TSRMLS_CC, E_ERROR, "$wsdl must be string or null"); |
| } |
} |
| |
|
| cache_wsdl = SOAP_GLOBAL(cache); | cache_wsdl = SOAP_GLOBAL(cache_enabled) ? SOAP_GLOBAL(cache_mode) : 0; |
| |
|
| if (options != NULL) { |
if (options != NULL) { |
| HashTable *ht = Z_ARRVAL_P(options); |
HashTable *ht = Z_ARRVAL_P(options); |
|
Line 3897 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
Line 3909 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
| |
|
| if (version == SOAP_1_1) { |
if (version == SOAP_1_1) { |
| if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp) == SUCCESS) { |
if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp) == SUCCESS) { |
| int new_len; | size_t new_len; |
| xmlNodePtr node = xmlNewNode(NULL, BAD_CAST("faultcode")); |
xmlNodePtr node = xmlNewNode(NULL, BAD_CAST("faultcode")); |
| char *str = php_escape_html_entities((unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), &new_len, 0, 0, NULL TSRMLS_CC); |
char *str = php_escape_html_entities((unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), &new_len, 0, 0, NULL TSRMLS_CC); |
| xmlAddChild(param, node); |
xmlAddChild(param, node); |
|
Line 3907 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
Line 3919 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
| xmlNodeSetContent(node, code); |
xmlNodeSetContent(node, code); |
| xmlFree(code); |
xmlFree(code); |
| } else { |
} else { |
| xmlNodeSetContentLen(node, BAD_CAST(str), new_len); | xmlNodeSetContentLen(node, BAD_CAST(str), (int)new_len); |
| } |
} |
| efree(str); |
efree(str); |
| } |
} |
|
Line 3922 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
Line 3934 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
| detail_name = "detail"; |
detail_name = "detail"; |
| } else { |
} else { |
| if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp) == SUCCESS) { |
if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp) == SUCCESS) { |
| int new_len; | size_t new_len; |
| xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Code"), NULL); |
xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Code"), NULL); |
| char *str = php_escape_html_entities((unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), &new_len, 0, 0, NULL TSRMLS_CC); |
char *str = php_escape_html_entities((unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), &new_len, 0, 0, NULL TSRMLS_CC); |
| node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL); |
node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL); |
|
Line 3932 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
Line 3944 static xmlDocPtr serialize_response_call(sdlFunctionPt
|
| xmlNodeSetContent(node, code); |
xmlNodeSetContent(node, code); |
| xmlFree(code); |
xmlFree(code); |
| } else { |
} else { |
| xmlNodeSetContentLen(node, BAD_CAST(str), new_len); | xmlNodeSetContentLen(node, BAD_CAST(str), (int)new_len); |
| } |
} |
| efree(str); |
efree(str); |
| } |
} |