Hi!

I have a problem that is driving me crazy.

I need to allocate some memory that will be available
throughout a session.

Firstly a database connection is established, but at the
same time I read all relevant information about the db (records,
attributes, typedeclarations and such and such). This is a rather
lengthy process so I am trying to store these information in memory
for later retrieval.
This is the part, that doesn't work. Whenever a new page is loaded
the information is lost. I have tried using static (global) 
variables, and I have tried the ZEND_BEGIN/END_MODULE_GLOBALS. 
About the ZEND_BEGIN/END... approach: the std. skeleton defines these 
macros:
#ifdef ZTS
        #define RAIMAG(v) (raima_globals->v)
        #define RAIMALS_FETCH() php_raima_globals
*raima_globals=ts_resource(raima_globals_id)
#else
        #define RAIMAG(v) (raima_globals.v)
        #define RAIMALS_FETCH()
#endif

How do I utilize ZTS? Where is raima_globals_id defined?
I do set a variable in PHP_MINIT_FUNCTION that variable is always set!
But any other variables from the ZEND_BEGIN/END_MODULE_GLOBALS section
(phew)
that is set later do not remember their value??? Why is that?

Thanks
  Thomas

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to