}
module_entry = get_module();
if (module_entry->zend_api != ZEND_MODULE_API_NO) {
- /* Check for pre-4.1.0 module which has a slightly different module_entry structure :( */
- struct pre_4_1_0_module_entry {
- char *name;
- zend_function_entry *functions;
- int (*module_startup_func)(INIT_FUNC_ARGS);
- int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
- int (*request_startup_func)(INIT_FUNC_ARGS);
- int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
- void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
- int (*global_startup_func)(void);
- int (*global_shutdown_func)(void);
- int globals_id;
- int module_started;
- unsigned char type;
- void *handle;
- int module_number;
- unsigned char zend_debug;
- unsigned char zts;
- unsigned int zend_api;
- };
-
- const char *name;
- int zend_api;
-
- if ((((struct pre_4_1_0_module_entry *)module_entry)->zend_api > 20000000) &&
- (((struct pre_4_1_0_module_entry *)module_entry)->zend_api < 20010901)
- ) {
- name = ((struct pre_4_1_0_module_entry *)module_entry)->name;
- zend_api = ((struct pre_4_1_0_module_entry *)module_entry)->zend_api;
- } else {
- name = module_entry->name;
- zend_api = module_entry->zend_api;
- }
-
php_error_docref(NULL, error_type,
"%s: Unable to initialize module\n"
"Module compiled with module API=%d\n"
"PHP compiled with module API=%d\n"
"These options need to match\n",
- name, zend_api, ZEND_MODULE_API_NO);
+ module_entry->name, module_entry->zend_api, ZEND_MODULE_API_NO);
DL_UNLOAD(handle);
return FAILURE;
}