Recently, I posted about a problem with AuthDBI under MP2 discovered during
testing.  After much hair pulling, I have deduced the following:

During my testing of AuthDBI.pm, I used apache1 and apache2 and ran under
different users.

In doing so, I somehow left orphaned semaphore arrays and share memory
segments.

Because AuthDBI will try and use the same Semaphore Key each execution, it
had a problem opening the existing semaphore.

I then used ipcs -s to list semaphores, found the offending collision and
removed it with ipcrm sem <id>.

Thanks to Rob Mueller who suggest the utterly brilliant use of $! to
actually debug things ;-).  I was then able to track down the fact that the
error was permission denied.


To allow for different apache servers on the same server that don't want to
(or can't) share the same memory for caching authentication, I added the
ability to configure the project ID for the shared memory key.

http://www.thoughtworthy.com/downloads/Apache-DBI-0.97-KAM-patch

Here's a list of the changes:

Patch   June 29, 2005 - Thanks to Kevin A. McGrail (ThoughtWorthy Media,
Inc.)
        - Added a feature 'Apache::AuthDBI->setProjID(1)' to set a Shared
          Memory Project ID when using the shared memory caching.
        - Fixed an MP2 problem when Debug is set to 2 changing is_main() to
main() call
        - Added a few more Debug statements including the Semaphore ID in
hex to use ipcs

Note: This is a patch against http://p6m7g8.net/Apache-DBI-dev

Regards,
KAM



Reply via email to