01-12-2010, 09:03 PM
rylleman
2008-10-29 06:48:29 PDT
I've installed OpenDocMan which seemed to work but when I'm trying to log I get the following error after providing my username/password;
Error in query: SELECT id, username, password FROM user WHERE username = '*******' AND password = password('*********'). No database selected
I guess it has something to do with mySQL but I have found nothing on the subject so I thought I'd start by asking here.
jonathanwminer
2008-10-29 07:19:47 PDT
I suspect an error with your database definitions in your config files. Assuming the following:
$GLOBALS['database'] = 'opendocman';
$GLOBALS['user'] = 'opendocman';
$GLOBALS['pass'] = 'opendocman';
$GLOBALS['hostname'] = 'localhost';
You should be able to issue the following mysql query from the command line:
$ mysql --host=localhost \
--user=opendocman \
--password=opendocman \
--execute="select id,username,password from user" \
opendocman
The output should be a list of your users, and their passwords.
rylleman
2008-10-29 08:40:46 PDT
Thanks!
There was an error with the user not allowed to the DB. I ran the following, logged in as 'root' to mySQL;
mysql> grant all on rarepository.* to rarepository@localhost identified by *password*
Now I get past the error message and into OpenDocGUI where I get the error;
"!There was an error logging you in. Please try again."
Trying again doesn' work...
Clicking on anything in the GUI gets me to the loginpage.
Restarted mySQL after running the above.
Also tried granting everything for the user rarepository for db rarepository in mySQLadmin.
jonathanwminer
2008-10-29 09:12:14 PDT
If your database permissions were not correct, it's possible that the ODM database was not setup correctly. You may be best off re-installing. For documentation purposes, I always install ODM from the command line, using the following:
mysql> create database opendocman;
mysql> grant select,insert,update,delete,create,alter,drop on opendocman.* to opendocman@localhost identified by 'opendocman';
mysql> flush privileges;
mysql> exit;
Bye
# mysql -u opendocman -p opendocman < database.sql
Enter Password: opendocman
In your case, you might be able to re-run the "database.sql" script... It will try to create the required databases and populate some intial data.
rylleman
2008-10-29 10:45:54 PDT
Thanks, I've created a new database but I'm having troubles with your last tip,
# mysql -u opendocman -p opendocman < database.sql.
All I get when I try is
-bash: database.sql: Filen eller katalogen finns inte (File or folder not existing)
I've tried all variants I can think of. What is < database.sql supposed to do? Without it I just log in to mySQL as my new user/database.
Logging into OpenDocMan now gives me;
Error in query: SELECT id, username, password FROM user WHERE username = 'filerepository' AND password = password('*******'). Table 'filerepository.user' doesn't exist
I'm completely new to mySQL and I don't think I completely understand all terms yet.
jonathanwminer
2008-10-29 10:50:43 PDT
The "< database.sql" causes mysql to read the commands from the database.sql file. In order for this to work, you need to be in the top level ODM directory.
rylleman
2008-10-31 12:18:12 PDT
I still can't get it to work.
All that happens is that I get this error in when logging in;
"!There was an error logging you in. Please try again."
MySQL seems to work just fine. I can connect to it with the right usernames. Tested the databases in both myPhpAdmin and MySQL Administrator and everything seems to work exactly as it should.
All grants are set right.
I've tried creating many new users and databases for OpenDocMan but none seems to work, all I get is the error message above.
I've tried to change every parameter that might have anything to do with it in both the OpenDocMans config.php and mySQLs my.cnf.
I can log into mySQL with myPhpAdmin and the username for OpenDocMan so logging in via web interface does work.
Is there a way to get OpenDocMan to give some more info than just that it didn't work to log in?
All seem to work as it should but still OpenDocMan wont allow me to log in.
jonathanwminer
2008-11-03 06:58:43 PST
The username/password(1) pair that you use to login to MySQL is different than the username/password(2) pairs that users use when logging into OpenDocMan.
(1) single username specified in your config.php files... allows the webserver to connect to the database.
(2) specified within the opendocman.user table. separate usernames for each person using ODM.
The error you're specifying occurs when a user does not enter their correct username/password pair. You could look at the index.php file, and appropriate auth/*.php file.
rylleman
2008-11-03 08:08:57 PST
Thank you.
Now examinating the various opendocman databases I've created I see that none of them contains any entry for the users I've been creating. The do however all contain an user called "admin" without any password.
Using username "admin" and leaving password field blank I can log in to my opendocman install with Admin privileges...
Tihs all seem very strange but now at least I can edit and add users using opendocman UI...
jonathanwminer
2008-11-03 08:23:23 PST
ODM appears to be working as documented. Initially, the "admin" account does not have a password, you need to set that yourself.
<!-- m --><a class="postlink" href="http://www.opendocman.com/demo/docs/opendocman.txt">http://www.opendocman.com/demo/docs/opendocman.txt</a><!-- m -->
<quote>
6. Point your favorite webbrowser to the opendocman folder:
ex. "http://www.mydomain.com/opendocman"
7. Login as "admin" (without password). After that, go to
"admin->users->update->admin" and set your admin password.
8. Add departments, categories, users, etc.
</quote>
2008-10-29 06:48:29 PDT
I've installed OpenDocMan which seemed to work but when I'm trying to log I get the following error after providing my username/password;
Error in query: SELECT id, username, password FROM user WHERE username = '*******' AND password = password('*********'). No database selected
I guess it has something to do with mySQL but I have found nothing on the subject so I thought I'd start by asking here.
jonathanwminer
2008-10-29 07:19:47 PDT
I suspect an error with your database definitions in your config files. Assuming the following:
$GLOBALS['database'] = 'opendocman';
$GLOBALS['user'] = 'opendocman';
$GLOBALS['pass'] = 'opendocman';
$GLOBALS['hostname'] = 'localhost';
You should be able to issue the following mysql query from the command line:
$ mysql --host=localhost \
--user=opendocman \
--password=opendocman \
--execute="select id,username,password from user" \
opendocman
The output should be a list of your users, and their passwords.
rylleman
2008-10-29 08:40:46 PDT
Thanks!
There was an error with the user not allowed to the DB. I ran the following, logged in as 'root' to mySQL;
mysql> grant all on rarepository.* to rarepository@localhost identified by *password*
Now I get past the error message and into OpenDocGUI where I get the error;
"!There was an error logging you in. Please try again."
Trying again doesn' work...
Clicking on anything in the GUI gets me to the loginpage.
Restarted mySQL after running the above.
Also tried granting everything for the user rarepository for db rarepository in mySQLadmin.
jonathanwminer
2008-10-29 09:12:14 PDT
If your database permissions were not correct, it's possible that the ODM database was not setup correctly. You may be best off re-installing. For documentation purposes, I always install ODM from the command line, using the following:
mysql> create database opendocman;
mysql> grant select,insert,update,delete,create,alter,drop on opendocman.* to opendocman@localhost identified by 'opendocman';
mysql> flush privileges;
mysql> exit;
Bye
# mysql -u opendocman -p opendocman < database.sql
Enter Password: opendocman
In your case, you might be able to re-run the "database.sql" script... It will try to create the required databases and populate some intial data.
rylleman
2008-10-29 10:45:54 PDT
Thanks, I've created a new database but I'm having troubles with your last tip,
# mysql -u opendocman -p opendocman < database.sql.
All I get when I try is
-bash: database.sql: Filen eller katalogen finns inte (File or folder not existing)
I've tried all variants I can think of. What is < database.sql supposed to do? Without it I just log in to mySQL as my new user/database.
Logging into OpenDocMan now gives me;
Error in query: SELECT id, username, password FROM user WHERE username = 'filerepository' AND password = password('*******'). Table 'filerepository.user' doesn't exist
I'm completely new to mySQL and I don't think I completely understand all terms yet.
jonathanwminer
2008-10-29 10:50:43 PDT
The "< database.sql" causes mysql to read the commands from the database.sql file. In order for this to work, you need to be in the top level ODM directory.
rylleman
2008-10-31 12:18:12 PDT
I still can't get it to work.
All that happens is that I get this error in when logging in;
"!There was an error logging you in. Please try again."
MySQL seems to work just fine. I can connect to it with the right usernames. Tested the databases in both myPhpAdmin and MySQL Administrator and everything seems to work exactly as it should.
All grants are set right.
I've tried creating many new users and databases for OpenDocMan but none seems to work, all I get is the error message above.
I've tried to change every parameter that might have anything to do with it in both the OpenDocMans config.php and mySQLs my.cnf.
I can log into mySQL with myPhpAdmin and the username for OpenDocMan so logging in via web interface does work.
Is there a way to get OpenDocMan to give some more info than just that it didn't work to log in?
All seem to work as it should but still OpenDocMan wont allow me to log in.
jonathanwminer
2008-11-03 06:58:43 PST
The username/password(1) pair that you use to login to MySQL is different than the username/password(2) pairs that users use when logging into OpenDocMan.
(1) single username specified in your config.php files... allows the webserver to connect to the database.
(2) specified within the opendocman.user table. separate usernames for each person using ODM.
The error you're specifying occurs when a user does not enter their correct username/password pair. You could look at the index.php file, and appropriate auth/*.php file.
rylleman
2008-11-03 08:08:57 PST
Thank you.
Now examinating the various opendocman databases I've created I see that none of them contains any entry for the users I've been creating. The do however all contain an user called "admin" without any password.
Using username "admin" and leaving password field blank I can log in to my opendocman install with Admin privileges...
Tihs all seem very strange but now at least I can edit and add users using opendocman UI...
jonathanwminer
2008-11-03 08:23:23 PST
ODM appears to be working as documented. Initially, the "admin" account does not have a password, you need to set that yourself.
<!-- m --><a class="postlink" href="http://www.opendocman.com/demo/docs/opendocman.txt">http://www.opendocman.com/demo/docs/opendocman.txt</a><!-- m -->
<quote>
6. Point your favorite webbrowser to the opendocman folder:
ex. "http://www.mydomain.com/opendocman"
7. Login as "admin" (without password). After that, go to
"admin->users->update->admin" and set your admin password.
8. Add departments, categories, users, etc.
</quote>