I'm trying to use PHP to read a configuration file in xml (only one time per AppServer instance) but I do not find the way to read it and store it in memory for others users (a performance problem, I do not wish to read the file every time than I execute my script)
I could do ยก it in Java i.e. using a Singleton pattern, or in ASP using Application variables scope.
The possibly solutions (and its impossibilities are):
1) Use Session variables to store an instance of configuration properties per user ( Not available for me for restriction problems)
2) Use shared memory mechanism to store a copy of the properties readed from xml file (Not available for me due than my application is resident in Windows and Linux servers, either is a good solution...)
So the unique way is read the file (and read its configuration properties) every time than one user performs an action which requires information stored in the xml configuration file!!!... (This can be suppose 1 or 2 seconds of delay per execution script!!!!)
My question is: Is there a way to use User global variables setted by user or some other way to can store in memory some variables with scope for all users. In definitivy read only one time my confiruation file.
Thanks in advance,
Oscar