Hi,
I've added a function to my custom extension. But from the point I call the function, there is no output. It seems as if there is some exception or error that occurs internally.
In the output I have used 'get_extension_funcs' to list the functions in the extension. This list shows my function.
Following are excerpts from from my code :
In header file :
PHP_FUNCTION(Init);
In C file :
function_entry php_mcelite_functions[] = {
PHP_FE(Init, NULL)
PHP_FE(confirm_php_mcelite_compiled, NULL) /* For testing, remove later. */
{NULL, NULL, NULL} /* Must be the last line in php_mcelite_functions[] */
};
PHP_FUNCTION(Init)
{
RETURN_TRUE ;
}
I've even turned on the log, but the log does not have any info.
Can anyone give some help/hint ?
Thanks in advance.
iceberg.
problem in callling function of my custom extension
Moderator: General Moderators
Are you running PHP from command line or via a browser?
Since you haven't included an example of the .php file you are using to test your code, I have no idea what "output" you are expecting.
But if you run PHP from the command line, you might get more feedback as to what is going wrong. If you configure PHP without the --with-apxs option, it will compile a local executable which you can then use something like this:
$ ./php ext/my_extension/my_extension.php
Your post is very vague, so I don't know if this will help, but it's worth a shot.
But if you run PHP from the command line, you might get more feedback as to what is going wrong. If you configure PHP without the --with-apxs option, it will compile a local executable which you can then use something like this:
$ ./php ext/my_extension/my_extension.php
Your post is very vague, so I don't know if this will help, but it's worth a shot.