JMT
11-10-2001, 10:28 PM
What I am trying to do is use mod_auth_db to control access to directories.
From other threads I have been able to setup the htaccess file to point to a db file created by dbmmanage. That all works, including groups.
Next I wrote a set of scripts to allow me to make changes to the db file such as add, changing or deleting users. I was able to debug the scripts independent of trying to use the resulting file for authorization. (I created a new file rather then trying to read a file created by dbmmanage.)
When I try to use the file created and managed by my scripts instead of the file created by dbmmanage the authorization fails with the following line in the /big/dom/xdomain/logs/error file:
(22)Invalid argument: could not open db auth file: /big/dom/xdomain/www/downloads/EVAA.pwd
If I try to access the file created by dbmmanage using my scripts they fail trying to open the file. There is no error in the .../log/php_errors file or the Apache error file when this happens but I am returned a 'FALSE' by dba_open().
My scripts use the dba_xxxx functions with the 'gdbm' handler. When I first wrote them I used 'db2' as the handler but APACHE generated the same error 22 as above. I noticed that the file created by my scripts was significantly smaller then file created by dbmmanage so I switched to 'gdbm' and the files ended up within 500 bytes of the same size. When I dump out the start of the file created by dbmmanage and my file they are very different.
Questions:
1) Which "handler" does dbmmanage use?
2) Suggestions about what I else I should look at/for?
Thanks
From other threads I have been able to setup the htaccess file to point to a db file created by dbmmanage. That all works, including groups.
Next I wrote a set of scripts to allow me to make changes to the db file such as add, changing or deleting users. I was able to debug the scripts independent of trying to use the resulting file for authorization. (I created a new file rather then trying to read a file created by dbmmanage.)
When I try to use the file created and managed by my scripts instead of the file created by dbmmanage the authorization fails with the following line in the /big/dom/xdomain/logs/error file:
(22)Invalid argument: could not open db auth file: /big/dom/xdomain/www/downloads/EVAA.pwd
If I try to access the file created by dbmmanage using my scripts they fail trying to open the file. There is no error in the .../log/php_errors file or the Apache error file when this happens but I am returned a 'FALSE' by dba_open().
My scripts use the dba_xxxx functions with the 'gdbm' handler. When I first wrote them I used 'db2' as the handler but APACHE generated the same error 22 as above. I noticed that the file created by my scripts was significantly smaller then file created by dbmmanage so I switched to 'gdbm' and the files ended up within 500 bytes of the same size. When I dump out the start of the file created by dbmmanage and my file they are very different.
Questions:
1) Which "handler" does dbmmanage use?
2) Suggestions about what I else I should look at/for?
Thanks