problem in callling function of my custom extension

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
iceberg
Forum Newbie
Posts: 3
Joined: Wed Oct 30, 2002 5:52 am

problem in callling function of my custom extension

Post by iceberg »

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.
lambart
Forum Newbie
Posts: 4
Joined: Thu Dec 05, 2002 2:28 pm
Location: La Ciudad de Santa Cruz

Are you running PHP from command line or via a browser?

Post by lambart »

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.
Post Reply