Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If dataDir is misconfigured, there is no way to login to adjust it #166

Closed
stephenlawrence opened this issue Jul 19, 2014 · 3 comments
Closed

Comments

@stephenlawrence
Copy link
Member

If a user is moving sites to a new server and their dataDir path changes, when they go to login @ their new site the dataDir warning will show and will keep re-directing them to the login. The only way they would be able to get past this is to manually adjust the mysql data.

@johncarn
Copy link

I was able to adjust this by replacing the entry in the mysql database directly. I had the wrong format for the dataDir and had to change it. Took about 3 minutes. Don't have the exact sql statement in front of me at the moment, but can get it for you if you need it.

@katedev
Copy link

katedev commented Aug 25, 2015

johncarn,
It will be helpful if you share with us what exactly in the database we need to edit. I laso would wish to accomplish it in 3 minutes or less.
I'm I supposed to change /var/www/document_repository/ to my localhost address coz I'm running a locally hosted server.
And i get "There is a problem with your dataDir setting. It does not appear to exist." when i try to run the opendocman
Best regards

@johncarn
Copy link

This should work for you. I'll show syntax using my database name.

You need to go to the mysql console. Once you are there, use the following commands:

Use opendocman_db;
(substitute your database name)

select * from odm_settings;
(the output should have a line that has a value in the name column of datadir, and the value column of the locationof the file repository)

delete from odm_settings where name = datadir;
(this should delete the existing line that you have for datadir. You may need quotes after the where clause , i.e. 'name=datadir' I don't have the exact syntax in front of me

Insert Into odm_settings values (null, 'datadir', '/var/www/document_repository/', 'location of file repository. This should ideally be outside the Web server root. Make sure the server has permissions to read/write files to this folder!. (Examples: Linux - /var/www/document/repository/ : Windows - c:/document_repository/', 'maxsize=255');
(this statement, from 'location of file repository.....toc:/document_repository/', is a comment field. It shows the exact syntax you need to use. Note the use of the left tilted single quote vs. single quote, and also the forward slashes in the syntax for windows, vs. backward slashes. the third value in the paren after values is what you need to change for your site. It defaults to 'var/www/document_repository/' Change that for your site and hit enter. Also notice how the statements end in ;)

This SQL statement is right out of the database.sql file that comes with opendocman installation files.

Hopefully this helps. If you have troubles with the syntax, let me know. I'll provide the commands to delete the entire table, re-create it and insert all the data you need.

To verify you got the line right, use the Select statement at the top of this post.

jc

@stephenlawrence stephenlawrence added this to the 1.3.4 milestone Aug 29, 2015
@stephenlawrence stephenlawrence self-assigned this Aug 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants