/* }}} */
-/* Only _ENV and _SERVER are JIT'd for now */
-#if 0
-static zend_bool php_auto_globals_create_get(TSRMLS_D)
-{
- if (PG(activated_auto_globals)[TRACK_VARS_GET]) {
- return 0;
- }
-
- return 0;
-}
-
-
-static zend_bool php_auto_globals_create_post(TSRMLS_D)
-{
- if (PG(activated_auto_globals)[TRACK_VARS_POST]) {
- return 0;
- }
- if (!SG(headers_sent) && SG(request_info).request_method && !strcmp(SG(request_info).request_method, "POST")) {
- sapi_module.treat_data(PARSE_POST, NULL, NULL TSRMLS_CC); /* POST Data */
- _gpc_flags[0]=1;
- }
-
- PG(activated_auto_globals)[TRACK_VARS_POST] = 1;
-
- return 0;
-}
-
-/* {{{ php_autoglobal_merge
- */
-static void php_autoglobal_merge(HashTable *dest, HashTable *src TSRMLS_DC)
-{
- zval **src_entry, **dest_entry;
- char *string_key;
- uint string_key_len;
- ulong num_key;
- HashPosition pos;
- int key_type;
-
- zend_hash_internal_pointer_reset_ex(src, &pos);
- while (zend_hash_get_current_data_ex(src, (void **)&src_entry, &pos) == SUCCESS) {
- key_type = zend_hash_get_current_key_ex(src, &string_key, &string_key_len, &num_key, 0, &pos);
- if (Z_TYPE_PP(src_entry) != IS_ARRAY ||
- (string_key_len && zend_hash_find(dest, string_key, string_key_len, (void **)&dest_entry) != SUCCESS) ||
- (!string_key_len && zend_hash_index_find(dest, num_key, (void **)&dest_entry) != SUCCESS)
- || Z_TYPE_PP(dest_entry) != IS_ARRAY) {
- (*src_entry)->refcount++;
- if (key_type == HASH_KEY_IS_STRING) {
- zend_hash_update(dest, string_key, strlen(string_key)+1, src_entry, sizeof(zval *), NULL);
- } else {
- zend_hash_index_update(dest, num_key, src_entry, sizeof(zval *), NULL);
- }
- } else {
- SEPARATE_ZVAL(dest_entry);
- php_autoglobal_merge(Z_ARRVAL_PP(dest_entry), Z_ARRVAL_PP(src_entry) TSRMLS_CC);
- }
- zend_hash_move_forward_ex(src, &pos);
- }
-}
-/* }}} */
-
-static zend_bool php_auto_globals_create_cookie(TSRMLS_D)
-{
- if (PG(activated_auto_globals)[TRACK_VARS_COOKIE]) {
- return 0;
- }
-
- return 0;
-}
-
-
-static zend_bool php_auto_globals_create_request(TSRMLS_D)
-{
- zval *form_variables;
-
- if (PG(activated_auto_globals)[TRACK_VARS_REQUEST]) {
- return 0;
- }
-
- php_auto_globals_create_get(TSRMLS_C);
- php_auto_globals_create_post(TSRMLS_C);
- php_auto_globals_create_cookie(TSRMLS_C);
-
- ALLOC_ZVAL(form_variables);
- array_init(form_variables);
- INIT_PZVAL(form_variables);
-
- for (p=variables_order; p && *p; p++) {
- switch (*p) {
- case 'g':
- case 'G':
- php_autoglobal_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]) TSRMLS_CC);
- break;
- case 'p':
- case 'P':
- php_autoglobal_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]) TSRMLS_CC);
- break;
- case 'c':
- case 'C':
- php_autoglobal_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) TSRMLS_CC);
- break;
- }
- }
-
- if (PG(register_globals)) {
- HashPosition pos;
- zval **data;
- char *string_key;
- uint string_key_len;
- ulong num_key;
-
- zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(form_variables), &pos);
- while (zend_hash_get_current_data_ex(Z_ARRVAL_P(form_variables), (void **)&data, &pos) == SUCCESS) {
- /* we only register string keys, since we cannot have $1234 */
- if (zend_hash_get_current_key_ex(Z_ARRVAL_P(form_variables), &string_key, &string_key_len, &num_key, 0, &pos) == HASH_KEY_IS_STRING) {
- ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), string_key, string_key_len, *data, (*data)->refcount+1, 0);
- }
- zend_hash_move_forward_ex(Z_ARRVAL_P(form_variables), &pos);
- }
- }
-
- zend_hash_update(&EG(symbol_table), "_REQUEST", sizeof("_REQUEST"), &form_variables, sizeof(zval *), NULL);
-}
-#endif
-
-
-
-
/* {{{ php_execute_script
*/
PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)