c - Can't load custom PHP module -


it compiles dll w/o problems. it's not being recognized loaded when use extension_loaded function in php or in phpinfo list. put dll extensions folder add it's entry php.ini. think problem may in code.

am missing or doing wrong?

zend_function(myfunction)  {      char var1 = null;     char var2 = null;     char var3 = null;     char var4 = null;     char var5 = null;     char var6 = null;     int var7;     double *var8;      if (zend_parse_parameters(zend_num_args() tsrmls_cc, "ssssssla", &var1, &var2,                                 &var3, &var4, &var5, &var6, &var7, &var8) == failure) {         return_null();     }      cfunction(&var1,&var2,&var3,&var4,&var5, &var6, var7, var8);      return_true; }  zend_function_entry myextension_functions[] = {     zend_fe(myfunction, null)     {null,null,null} };   php_minit_function(myextension) {     return success; }  php_mshutdown_function(myextension) {     return success; }  php_minfo_function(myextension) {     php_info_print_table_start();     php_info_print_table_header(2, "myextension v1.0", "");     php_info_print_table_row(2, "php extension", "enabled");     php_info_print_table_end(); }      zend_module_entry myextension_module_entry = { #if zend_module_api_no >= 20010901     standard_module_header, #endif     "myextension",      myextension_functions,     null,     null,     null,     null,     php_minfo(myextension),     "1.0",     standard_module_properties };      zend_get_module(myextension) 

the best way view extension loading errors run php.exe command line. showed me error messages of

warning: php startup: myextension: unable initialize module module compiled module api=20121212 php    compiled module api=20090626 these options need match  in unknown on line 0 

so found #define zend_module_api_no in zend_modules.h , changed 20121212 20090626.

then complained with:

warning: php startup: myextension: unable initialize module module compiled build id=api20090626,nts,vc10 php    compiled build id=api20090626,nts,vc9 these options need match  in unknown on line 0 

so found #define php_compiler_id in config.w32.h , changed "vc10" "vc9".

after loaded module. able call function came tradition 500 error. suspect has vc9/vc10 incompatibility.

the moral of story tried use extension compiled vc10 when php using compiled vc9. leads sorts of errors. appropriate thing compile php src vc10.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -