semintelligent.com: personal site of Max Schubert a.k.a. "perldork"
By Max Schubert a.k.a. "perldork"
[Home] [Blog] [Nagios] [Cacti] [CLI utilities] [Design] [Ensim] [Music] [OS Commerce] [Projects] [Talks]


Semintelligent

LAMP with PHP5: When a Singleton is Not Quite a Singleton · Sep 5, 10:13 PM

After a few days of puzzling over why my little singleton PHP5 data access layer was continuing to produce leftover database connections and produce more than just one connection (which is what I would expect a Singleton pattern to create!), I learned the following, mostly from this PHP manual page and user comments (one of the best features of the online PHP manual pages!):

http://us.php.net/manual/en/features.persistent-connections.php

It would seem this could somehow be resolved by using shared memory for those connections, but I know that has it’s own problems and adds complexity.

— Max Schubert

---

Comment

Textile Help