[PHP-DEV] Re: [PHP] mcrypt

2002-07-30 Thread Purushotham Komaravolu
Warning: mcrypt_generic_end(): 2 is not a valid MCrypt resource in /mount/marsellus/gwolfe/puruclient/staging/vhosts/partnersdev.sec.yaga.com/h tml/time/cancelsubscription/new.php on line 31 decrypted: /// Regards, Purushotham Komaravolu Software Engineer

[PHP-DEV] mcrypt

2002-07-30 Thread Purushotham Komaravolu
Hello, I am getting some odd errors trying to get an encrypt/decrypt process to work. Looking at the manual examples and some other literature, I have tried the two approaches listed below. For each, I get a sometimes-works, sometimes fails result. The manua

Re: [PHP-DEV] singleton feature

2002-06-24 Thread Purushotham Komaravolu
Singleton means only one instance.. i.e. instance of a class per webserver... all application scripts should talk only to that same instance irrespective of the request. p - Original Message - From: "Alexander Skwar" <[EMAIL PROTECTED]> To: "Purushotham Komaravolu&qu

[PHP-DEV] singleton feature

2002-06-24 Thread Purushotham Komaravolu
Hi , I have a small suggestion. I guess it is a good feature to have a provision to have a Singleton class per webserver instance. This is especially useful for maintain user defined connection pools, loggers etc. Thanks Regards, Puru

[PHP-DEV] rename not working

2002-06-20 Thread Purushotham Komaravolu
/ fp = fopen(logFile."/log.txt", "a"); flock(fp, 2); $ren= rename(logFile."/log.txt", logFile.$time); flock($this->fp, 3); This code is making the system to hang( deadlock, since i am locking the file and then trying to rename the

[PHP-DEV] singleton

2002-06-20 Thread Purushotham Komaravolu
Hi All, Is there any way to create a singleton in Php4? I am trying to create a singleton clas for database connection pooling( so the class should be a singleton for the webserver instance and should be singleton across requests). Regards, Puru

Re: [PHP-DEV] static not working as expected

2002-06-18 Thread Purushotham Komaravolu
Thanks for your prompt answer.If that's the case then, how do I define a singleton class? Regards, Puru - Original Message - From: "Markus Fischer" <[EMAIL PROTECTED]> To: "Purushotham Komaravolu" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>;

[PHP-DEV] static not working as expected

2002-06-18 Thread Purushotham Komaravolu
counter; print "\n"; } } class SingletonCounter { static $m_instance = NULL; // throwing error here function Instance() { if (self::$m_instance == NULL) { self::$m_instance = new Cou