KETSE / casebox

Casebox: Secure all your information and team communication in one place
https://www.casebox.org
216 stars 120 forks source link

Installed on CentOS 7 but can't create core's db tables #19

Closed jaylopez closed 8 years ago

jaylopez commented 8 years ago

I installed CB on CentOS 7 and the database server (MariaDB 10) resides on another CentOS 7 server. When I run the install with the user and root credentials for the remote database server, it creates the cb_databases fine but when it tries to create the cores, it can't create the tables and other stuff on the databases. I guess it is still trying to create something local even when directed to create the dumps on the remote server. Example of problem: Core name:laborales Applying dump .. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") OK Registering core .. OK Specify email address for root user:root@localhost Specify root user password:password PHP Fatal error: Uncaught exception 'Exception' with message '2015-08-05 17:31:04:


Query error (): Table 'cb_laborales.users_groups' doesn't exist



Query: SELECT id FROM users_groups WHERE name = 'root'2015-08-05 17:31:04:

Query error (): Table 'cb_laborales.users_groups' doesn't exist

' in /var/www/casebox/httpsdocs/lib/DB.php:175 Stack trace:

0 /var/www/casebox/httpsdocs/classes/CB/DataModel/Base.php(225): CB\DB\dbQueryError()

1 /var/www/casebox/httpsdocs/classes/CB/DataModel/User.php(123): CB\DataModel\Base::toId('root')

2 /var/www/casebox/bin/core_create.php(129): CB\DataModel\User::updateByName(Array)

3 /var/www/casebox/bin/install.php(238): include('/var/www/casebo...')

4 {main}

thrown in /var/www/casebox/httpsdocs/lib/DB.php on line 175 [root@srmcasebox casebox]#

smugderby commented 8 years ago

Did you create a root username/password for a local account and a root account on mysql?

tvitalie commented 8 years ago

Fixed in last commit, please check.

jaylopez commented 8 years ago

@smugderby Yes I did. I have a casebox user and user with connect to any host and with all privileges on all databases like root. I also tried the root@local for the db server.

jaylopez commented 8 years ago

@tvitalie Hi, tried with the actual commit and found some problems with the install script. For some reason it still thinks you are installing on the localhost but at least after telling it the remote MySQL server it connects and create the cb_ databases. The install continues but after selecting the language it gives a couple of PHP errors:

Specify default language (ISO) (default "en"): UI available languages (comma separated ISO list) (default "en"): PHP Warning: constant(): Couldn't find constant CB\IS_DEBUG_HOST in /var/www/casebox/httpsdocs/classes/CB/Solr/Service.php on line 319 Creating solr core ... OK Reindex core [Y/n]: y Reindexing core ... PHP Warning: syntax error, unexpected '!' in /var/www/casebox/httpsdocs/config.ini on line 5 in /var/www/casebox/httpsdocs/classes/CB/Config.php on line 101 PHP Fatal error: Unsupported operand types in /var/www/casebox/httpsdocs/config_platform.php on line 68 OK Creating language files .. PHP Warning: syntax error, unexpected '!' in /var/www/casebox/httpsdocs/config.ini on line 5 in /var/www/casebox/httpsdocs/classes/CB/Config.php on line 101 PHP Fatal error: Unsupported operand types in /var/www/casebox/httpsdocs/config_platform.php on line 68 OK Done. Done

jaylopez commented 8 years ago

This software looks great and works great on the VM that can be downloaded. I tried to convert the VirtualBox OVA to .vhd in order to import it to Hyper-v but it gets stuck on booting. I have converted a lot of other OVA's .vmdk disks to .vhd without problems including Nexiun, Oddo, and other VM. If I could I would deploy the OVA VM even with CentOS 6.

On another note, can CB be deployed on Windows using Apache?

tvitalie commented 8 years ago

@jaylopez, yes I am working on windows using apache.

tvitalie commented 8 years ago

@jaylopez there seems to be some syntax error in your config.ini on line 5 that causes error on parsing.

As I can see from a newly created config.ini - it seems that db_pass has some special chars. I've made changes to enclose config values in double quotes now.

Made the commit, you can check now with latest commit.

jaylopez commented 8 years ago

The problem still persist. Can the install script be made to ask for the parameters as many times as needed or to know that a remote database was specified instead of assuming a localhost database is in use? I think that will take care of the problem.

During the first part of creating a database it is done successfully but when trying to import the tables, etc., the install script defaults to localhost.

Creating solr core ... OK 'cb__casebox' database exists. Would you like to backup it and overwrite with dump from current installation [Y/n]: y Backuping .. mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: YES)" when trying to connect OK Applying dump .. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) OK

tvitalie commented 8 years ago

@jaylopez you are right, I've changed connection params for main connection method but missed to specify host connection param for backuping and restoring processes. I've changed this in latest commit. Now you shouldn't face any issues.

Best regards.