Re: function calling
| From: | Thomas Eisengarten | Date: | Mon, 21 Aug 2000 11:15:41 +0000 |
| Subject: | Re: function calling | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-30030@lists.php.net to get a copy of this message | ||
i think, i made anything wrong. if the function CreateNewUser is in another
extension (this is exactly what i want. calling pfsockopen
(etc/standard/fsock.c) from within my own extension) apache won't start and
brings the following error:
Syntax error on line 201 of /usr/local/httpd/conf/httpd.conf:
Cannot load /usr/lib/apache/libphp4.so into server: /usr/lib/apache/libphp4.so:
undefined symbol: pfsockopen
...but if i dont use pfsockopen in my own... the server goes up and running.
what i'm making wrong`?
-eisen-
Gustavo Badauy wrote:
> Thomas,
>
> To call functions in your extension, it's just like any other. To get the
> parameters, the best example is to create the propotypes and let ext_skel do
> the work.
>
> Anyway, here is one example:
>
> PHP_FUNCTION(myfunction)
> {
> zval **UserName;
> zval **Password;
> zval **Day
>
> long retval = 0;
> long pin = 0;
> if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3,
> &UserName,&Password,&Day) == FAILURE){
> WRONG_PARAM_COUNT;
> }
>
> convert_to_string_ex(UserName);
> convert_to_string_ex(Email);
> convert_to_long_ex(Day);
>
> retval = CreateNewUser (
> Z_STRVAL_PP(UserName),
> Z_STRVAL_PP(Password),
> Z_LVAL_PP(Day))
>
> Hope it helps
>
> ----- Original Message -----
> From: "Thomas Eisengarten" <eisen@pro-net.de>
> To: <php-dev@lists.php.net>
> Sent: Friday, August 18, 2000 9:22 AM
> Subject: [PHP-DEV] function calling
>
> > is it a way to call a standardfunction (e.g. fsockopen()) from my own
> > extension? and how the parameters tranfered, if it possible?! does any
> > example exists, where this problem is solved?
> > thomas eisengarten
> >
> >
> >
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-dev-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net