Hi
i want to make extension module with dll that implement unzip function..
so i searched here http://www.zend.com/apidoc/ <----Extending php 4.0
it says make example_module.c and examle_module.h with this source code
and include all php source code and complie it
but when i tried it i got several errors to build..
i've downloaded php version 4.3.1 source code and unzipped.
and compiled but it said
---> 'Cannot open include file: 'zend_config.h': No such file or directory'
so i downloaded that file and compiled but it said
---> 'Cannot open include file: '../main/php_config.h': No such file or
directory'
so changed that file '../main/php_config.h.in' and another problem
---> is 'Cannot open strings.h'
so downloaded that file and complied
but 102 errors....
---> extern void string_load (file ) ;
---> syntax error : missing ')' before '' etc
what was i wrong?
is there any different way to create extention dll using VC++ 6.0?
<< ----- source code --------- >>
/ include standard header /
#include "php.h"
/ declaration of functions to be exported /
ZEND_FUNCTION(first_module);
/ compiled function list so Zend knows what's in this module /
zend_function_entry firstmod_functions[] =
{
ZEND_FE(first_module, NULL)
{NULL, NULL, NULL}
};
/ compiled module information /
zend_module_entry firstmod_module_entry =
{
STANDARD_MODULE_HEADER,
"First Module",
firstmod_functions,
NULL,
NULL,
NULL,
NULL,
NULL,
NO_VERSION_YET,
STANDARD_MODULE_PROPERTIES
};
/ implement standard "stub" routine to introduce ourselves to Zend /
#if COMPILE_DL_FIRST_MODULE
ZEND_GET_MODULE(firstmod)
#endif
/ implement function that is meant to be made available to PHP /
ZEND_FUNCTION(first_module)
{
long parameter;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", ¶meter) ==
FAILURE) {
return;
}
RETURN_LONG(parameter);
}
<< ------ >>
thanks