If you are not running PHP under a Windows platform and can compile extensions into PHP the most efficient way to solve problem #2 may be with a PHP extension I developed. It handles constants and provides a type of persistent variable too. It has been immensely useful for my projects.
http://pwee.sourceforge.net/ Lance > -----Original Message----- > From: ssamuel [mailto:[EMAIL PROTECTED] > Sent: Sunday, May 25, 2003 7:05 PM > To: [EMAIL PROTECTED] > Subject: [PHP] caching variables and preloading functions > > > Hi, > > I am looking for a way to do the following with PHP on Apache. > > 1) I have a list of functions that I would like loaded into memory when > the Apache server starts so that other .PHPs can call these functions at > any time. Somewhat of a way to expand the API set for PHP. > > i.e., Say I have a file named "init.php" which has many functions > defined. When the Apache server loads, I want this file to be sourced > so that these functions are visible to all other phps. > > 2) I have several variables, that I want to be cached at server init > time. These variables are global variables and live until the server is > restarted and can be accessed by any .phps. > > Are there any ways to do these? > > thanks, > sunil. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php