|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-01 11:36 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 02:00:01 2025 UTC |
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!).