Re: [phplib-dev] Re: [phplib] PHPlib session using PHP4 sessionsimplementation: the code From: Max Derkachev (kot <email protected>)
Date: 12/05/00

Sascha Schumann wrote:

> session_set_save_handler can also call functions in
> instantiated objects, if you prefer that.
>
> Just change "func_name" for each function entry to
> array("object_name", "method_name") in the
> session_set_save_handler call.
>

Would be nice. In which version of PHP this feature appears first? I use
php-4.0.3pl1, and it does not work for me - Fatal error: Failed to initialize
session module .... . It appeared at session_start() call,
session_set_save_handler with array arguments was called before.

As I could see in session.c:
for (i = 0; i < 6; i++) {
          convert_to_string_ex(args[i]);
          mdata->names[i] = estrdup(Z_STRVAL_PP(args[i]));
}

The names passed to session_set_save_handler() are converted to strings, so all
the arguments like array ('foo', 'bar') would be converted to "Array" word.
Am I mistaken?

--
Best regards,
Max A. Derkachev mailto:kot <email protected>
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-5353
http://www.Books.Ru -- All Books of Russia

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected> For additional commands, e-mail: phplib-dev-help <email protected>