faqts : Computers : Programming : Languages : PHP : Common Problems : Errors

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 2 people (50%) answered Yes
Recently 0 of 1 people (0%) answered Yes

Entry

I added some functions to php3 source and error occurs

Oct 26th, 1999 00:28
HyungSeok Shim,


I added some functions to php3 source and error occurs.
The error message is "call to unsupported or undefined function".

I located myfuction file at 

php3root/functions/test.c, php3root/functions/php3_test.h

and I changed php3root/Makefile to link some library( I made this ), to 
include some headerfiles...

there was no error on compiling.

how can i make it work?           thanks!!


following is test.c, my source.
=====================================================================

#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#ifdef THREAD_SAFE
#include "tls.h"
#endif
#include "php.h"
#ifndef MSVC5
#include "build-defs.h"
#endif
#include "internal_functions.h"
#include "php3_test.h"

#include "/usr/local/test/stonetest.h" //this is my header file

#if APACHE
#  ifndef DEBUG
#  undef palloc
#  endif
#endif


/*====================================================================
** DEFINE FUNCTION_ENTRY
====================================================================*/
function_entry test_functions[] = {
	{"stonetest",		php3_test,		NULL},
	{NULL, NULL, NULL}
};

/*=====================================================================
** DEFINE MODULE_ENTRY
=====================================================================*/
php3_module_entry test_module_entry = {
	"Test", test_functions, NULL, NULL, NULL, NULL, NULL, 
STANDARD_MODULE_PROPERTIES
};

#if COMPILE_DL
DLEXPORT php3_module_entry *get_module(void) { return 
&test_module_entry; }
#endif

/*=====================================================================
** php3_test()
=====================================================================*/
void php3_test(INTERNAL_FUNCTION_PARAMETERS)
{
	char	mystring[20];

	/*-------------------------------------
	** USE TEST LIBRARY 
	-------------------------------------*/
	stonetest( mystring ); //this is my function

	RETURN_STRING( mystring, 1 );
}