]> granicus.if.org Git - php/commitdiff
INI options should not be modified directly.
authorSara Golemon <pollita@php.net>
Wed, 17 Jan 2007 00:22:48 +0000 (00:22 +0000)
committerSara Golemon <pollita@php.net>
Wed, 17 Jan 2007 00:22:48 +0000 (00:22 +0000)
Bad extension.  No cookie for you.

ext/soap/php_http.c
ext/soap/php_xml.c

index ca14219da9fa3591149e3f94e22c977f2d829cf6..0f33c2c767020cf4350178ad29bd80e5205cab52 100644 (file)
@@ -318,12 +318,12 @@ try_again:
        }
 
        old_allow_url_fopen = PG(allow_url_fopen);
-       PG(allow_url_fopen) = 1;
+       zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
        if (use_ssl && php_stream_locate_url_wrapper("https://", NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) == NULL) {
                php_url_free(phpurl);
                if (request != buf) {efree(request);}
                add_soap_fault(this_ptr, "HTTP", "SSL support is not available in this build", NULL, NULL TSRMLS_CC);
-               PG(allow_url_fopen) = old_allow_url_fopen;
+               zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen ? "1" : "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
                return FALSE;
        }
 
@@ -376,11 +376,11 @@ try_again:
                        php_url_free(phpurl);
                        if (request != buf) {efree(request);}
                        add_soap_fault(this_ptr, "HTTP", "Could not connect to host", NULL, NULL TSRMLS_CC);
-                       PG(allow_url_fopen) = old_allow_url_fopen;
+                       zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen ? "1" : "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
                        return FALSE;
                }
        }
-       PG(allow_url_fopen) = old_allow_url_fopen;
+       zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen ? "1" : "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
 
        if (stream) {
                if (client->url) {
index 65aed517dc357cca58bc660005b06ce7e1444b36..2e36751c265b70d22a5d34f12d1e9bb7052986b6 100644 (file)
@@ -87,9 +87,9 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
 */
 
        old_allow_url_fopen = PG(allow_url_fopen);
-       PG(allow_url_fopen) = 1;
+       zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "1", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
        ctxt = xmlCreateFileParserCtxt(filename);
-       PG(allow_url_fopen) = old_allow_url_fopen;
+       zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), old_allow_url_fopen ? "1" : "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
        if (ctxt) {
                ctxt->keepBlanks = 0;
                ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;