Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9608 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23136 invoked by uid 1010); 29 Apr 2004 05:28:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23112 invoked by uid 1007); 29 Apr 2004 05:28:50 -0000 Message-ID: <20040429052850.23111.qmail@pb1.pair.com> To: internals@lists.php.net Date: Thu, 29 Apr 2004 01:26:49 -0400 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 157.252.174.104 Subject: call_user_function wrong number of parameters? From: bill@zempt.com ("Bill Zeller") (Win XP Pro, PHP 5 RC 1, Visual C++ .NET) Hi, I'm trying to create an extension which calls a function defined in a PHP script. The name of this function is "someFunction". My code is here: zval **params[2], *func_name, *retval_ptr; CLS_FETCH(); ZVAL_STRING(func_name, "someFunction", 1); ZVAL_LONG(*params[0], 32); ZVAL_STRING(*params[1], "meters", 1); if (call_user_function(CG(function_table), NULL, func_name,&retval_ptr, 2,params) == SUCCESS) { zval_ptr_dtor(&retval_ptr); } When I compile this I get an error saying c:\Documents and Settings\Bill Zeller\Desktop\testing\phui\phui_ext\phui_ext\phui_ext.cpp(121): error C2198: 'call_user_function' : too few actual parameters I don't know why this happens, because I'm using the arguments as described in the definition on line 298 of zend_API.h: ZEND_API int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC); Thanks for your help, Best Regards, Bill Zeller