ID:               3423
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         DBM/DBA related
 Operating System: Win NT 3.51
 PHP Version:      3.0.14
 New Comment:

some extensions are just not thread-safe as the underlying libs aren't
:(

theres a way more general report requesting documentation on
tread-safety status for extensions so i'm setting this
one to "Won't fix" (as we'll fix the documentation instead
of fixing all the differend underlying db* libs)

btw: flock() works on process-level only, as threads are part of the
same process they all get positive results from flock if the lock is
held by another thread in that process


Previous Comments:
------------------------------------------------------------------------

[2000-02-07 22:52:53] [EMAIL PROTECTED]

The dbm unit isn't capable of handling multiple request on the same .db
files more than once. There's indeed some kind of "php-own-locking",
but this just makes the whole php fail when it's needed. The following
code allows simulating multiple accesses on the same .db file ("shit"
must have been created as dbm file before):

function shoot_dbm()
  {  /* this loop should wait until the db is unlocked */
     /* - but it makes the second instance crash */
   do
     {
     $dbShit = dbmopen( "shit", "w" ); 
     }
   while( ! $dbShit );  

   sleep(5); /* simulate some activity in critical part */

   dbmclose( $dbShit ); 
  };

Running this part via two clients, the second get's an "server
misconfiguration error" page wit apache.

using a lock file via flock() to "protect" the dbm module from its
dumbness doesn't help also. Locking works fine, but the dbm still
causes problems (quite strange!).


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=3423&edit=1

Reply via email to