Just started working with PHP and wrote a PHP extension in C. Got it working with hard coded variables and started to work on feeding it 3 string arguments as input.
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss",
&acct, &acct_len,&userid, &userid_len, &passwd, &passwd_len) == FAILURE)
{
RETURN_NULL();
}
When I execute the extension with 3 arguments I always get the following.
[XXX@XXXVIPH01 smxauth]$ php -r "smxauth('myacct','nobody','password');"
PHP Warning: smxauth() expects exactly 1 parameter, 3 given in Command line code on line 1
I thought the "sss" would dictate the number of args expected but it doesn't seem to work that way (for me at least). Using php-5.1.6
Any thoughts?
Thanks
Tim