On Thu, Jun 06, 2002 at 11:27:06AM +0200, Markus Fischer wrote: > You can fech the zval * for _SESSION from the > EG(symbol_table), e.g. something like this (untested): > > zval **z_sess; > if (zend_hash_find(&EG(symbol_table), "_SESSION", sizeof("_SESSION")-1, >(void**)&z_sess) == SUCCESS) { > ... > }
Well, this doesn't work. The _SESSION thing is something of another ext module (the session module), and I haven't been able to access anything from that directly. But I have worked around that, I can simply check whether a variable is registered in a session by calling the session_is_registered function from the session module (by using the call_user_function_ex() function). I don't think it is very pretty, but it works... Normal variables can then be fetched by using this zend_hash_find() function. But if it is an array or a hash the zend_hash_find function fails. I've got no idea why. And even if it would work I would still have no clue about how the access the key/value pairs in this array/hash. It would be nice it there was some REAL documentation about the API... -- #!perl # Life ain't fair, but root passwords help. # Eric Veldhuyzen [EMAIL PROTECTED] $!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~ # Perl Monger /.(.)...(.)(.)....(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;` -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php