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
Database issues fresh install Ubuntu Server 16 #1434
Comments
Could you check your error.log file for what's causing the issue? It's located at /var/www/MISP/app/tmp/error.log . |
My bad, completely missed it. It looks like your database.php isn't correctly set up, could you have a look at whether you have it correctly set up? It's located at /var/www/MISP/app/Config/databse.php |
root@ubuntu:/var/www/MISP/app/tmp/logs# sudo -u www-data vim /var/www/MISP/app/Config/database.php
|
It looks like you accidentally capitalised the name of the array, it should be $default. Could you change that and see if it works? Thanks! |
Database error went away buy still the same: 2016-08-12 06:42:59 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 92] |
2016-08-12 06:42:59 Error: [ParseError] syntax error, unexpected 'o' (T_STRING), expecting function (T_FUNCTION) |
To me, it seems your MISP repository is broken. What does |
HEAD detached at v2.4.50
Untracked files:
no changes added to commit (use "git add" and/or "git commit -a") |
Could you check if you can connect to mysql using these settings? public $Default = array( Something like this: mysql -u rnixon -p misp; Does this work? |
No it fails. |
I change the DB user to root in database.php, an logged into mysql using root. root@ubuntu:/var/www/MISP/app/tmp/logs# mysql -u root -p misp Welcome to the MariaDB monitor. Commands end with ; or \g. Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [misp]> |
OK so the issue is that the mariadb user you've provided MISP with didn't have access / wasn't set up properly. Could you retrace your steps using the install guide and see where it went wrong? Just make sure that you provide MISP with a user that has access to the misp database and that everything in there is imported from MYSQL.sql. Let me know how it goes! |
I was able to connect to the database. Now getting this error. 2016-08-12 11:36:19 Error: [ParseError] syntax error, unexpected end of file, expecting function (T_FUNCTION) |
And this: 2016-08-12 11:35:17 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 92] |
your second error message is only a "Notice", so nothing to worry about. the first one looks like one of the PHP files is messed up... does "git status" in the MISP directory still not show anything else than what you already posted here? maybe the Lib/cakephp got mixed up, please delete /var/www/MISP/app/Lib/cakephp/ completely and do a submodule update afterwards:
|
Same. Only error I see standing out in the logs is: |
Well, you've likely got a syntax error in a file, maybe a missing Does the error give any more info? A filename? |
Yeah that looks really weird. It sounds like one of the files is incomplete / corrupt? Never seen this happen before. |
If you type "git status" in your MISP directory, do you see any files that are changed? |
root@ubuntu:/var/www/MISP# git status
Untracked files:
no changes added to commit (use "git add" and/or "git commit -a") |
ok, nothing too bad there. Can you paste the full error? as in, everything? |
2016-08-15 08:33:33 Error: [ParseError] syntax error, unexpected end of file, expecting function (T_FUNCTION) |
Here is the debug log: 2016-08-15 08:35:10 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 92] |
I know this is asking a fair bit, but could you sanitise and send your bootstrap.php, config.php, core.php and database.php (all located in /var/www/MISP/app/Config) to the e-mail address in my profile? Make sure you remove any passphrases / urls etc, my suspicion is that one of the files is missing a bracket, semi-colon or something similar. Thanks in advance! |
Figured it out with a screen by screen comparison with the database.php file. I was missing a bracket at the very end. Must have delete it by fat fingers when write quiting. |
Excellent news, glad that you've got it resolved! I'll close the issue for now, don't hesitate to open a new one if you run into anything else! |
debug_log.txt
error_log.txt
Fresh install and I am getting a database error. Newbie to all this.
Thanks.
If you would like to report a bug, please fill the template bellow
Work environment
The text was updated successfully, but these errors were encountered: