Welcome! Log In Create A New Profile

Advanced

Singleton usage

Posted by Erez 
Singleton usage
April 17, 2011 06:52AM
Hi All

My name is Erez and I am trying to create php application that using singleton.
My web server is obviously nginx :)

I noticed that my php singleton is always disposed when the page request war ended.
I googled it and i think that i found a solution to this problem, I am using fast-cgi to run php. the fast-cgi is runing the php page in a different process.

I need to create singleton in the application that will be accessible from all the pages.
Can you recommend me a good way to create and use singletons?

Thanks
Erez
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready