-
Notifications
You must be signed in to change notification settings - Fork 103
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
Error 500 after fresh Centos7 Install #54
Comments
The errors indicate that you are running php 5.3. Make sure you follow the
instructions from the install directory, especially when it comes to
setting up scl.
…On Jul 6, 2017 3:37 AM, "krypto29s" ***@***.***> wrote:
I followed the install guide according, and when I start the process
everything appears to start but I am not able to access
http://misp/user/login url. I am getting an error 500.
sudo su -s /bin/bash apache -c 'scl enable rh-php56
/var/www/MISP/app/Console/worker/start.sh'
[sudo] password for sjohn345:
Stopping workers
Stopping 12950 ... Done
Stopping the Scheduler Worker ... Done
Stopping 12968 ... Done
Stopping 12986 ... Done
Stopping 13004 ... Done
Creating workers
Starting worker ... Done
Creating workers
Starting worker ... Done
Creating workers
Starting worker ... Done
Creating workers
Starting worker ... Done
Creating the scheduler workers
Starting scheduler worker ... Done
! more misp.local_error.log
[Wed Jul 05 21:28:56.478562 2017] [:error] [pid 11684] [client ::1:51188]
PHP Fatal error: Can't use function return value in write context in
/var/www/MISP/app/Controller/UsersController.php on line 97
[Wed Jul 05 21:28:56.479803 2017] [:error] [pid 11684] [client ::1:51188]
PHP Fatal error: Can't use function return value in write context in
/var/www/MISP/app/Controller/AppController.php on line 305
[Wed Jul 05 21:29:02.058256 2017] [:error] [pid 2369] [client ::1:51190]
PHP Fatal error: Can't use function return value in write context in
/var/www/MISP/app/Controller/AppController.php on line 305
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#54>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADf6wH-Z4492HLwgVX-GlrG-Xg3NmtNYks5sLDppgaJpZM4OPDzm>
.
|
I have followed the instructions located here. https://github.com/MISP/MISP/blob/2.4/INSTALL/xINSTALL.centos7.txt. Am I missing something? This is from /var/www/MISP/app/tmp/logs/error.log This is from: /var/www/MISP/app/tmp/logs/debug.log 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 11] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 21] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 1] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 10] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 48] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 50] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/footer.ctp, line 1] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 87] 2017-07-06 08:16:42 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 102] |
Which version of PHP are using? |
~]$ php -v |
This is weird; I just had to rerun the below; ~]$ php -v Still same error |
Yes, scl enable rh-php56 bash enables scl for your current shell. It will however not change anything for apache. |
I have uninstalled php 5.4. The only version of php is 5.6. I will put a phpinfo in the web root, and let let you know how that works. |
Did you do this? |
Yes I did |
php info wasn't working. That told me that I had some integration issues with the web server. I ran a pecl upgrade-all. phpinfo now shows me that php version is still 5.4. Not sure how that is, because php 5.4 is uninstalled. Crazy thing is php -v now shows it is back... ugh. |
php 5.4 being back isn't a problem, the important part is to go through the SCL 5.6 intallation. Did you use and modify the CentOS apache conf file? https://github.com/MISP/MISP/blob/2.4/INSTALL/apache.misp.centos7 |
Yes sir, I did. I executed the below. FYI, |
What is the stack trace now? While running 5.6 that is? Because the
previous error was a 5.4 error.
…On Thu, Jul 6, 2017 at 3:38 PM, krypto29s ***@***.***> wrote:
Yes sir, I did. I executed the below.
cp /var/www/MISP/INSTALL/apache.misp.centos7 /etc/httpd/conf.d/misp.conf
FYI,
i just bounced the apache service, and phpinfo now shows 5.6, and I still
getting error 500.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#54 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADf6wJwXd61nfCSGAC92OR7Mvk3OnuXQks5sLONQgaJpZM4OPDzm>
.
|
2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 11] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 21] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 1] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 10] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 48] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 50] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/footer.ctp, line 1] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 87] 2017-07-06 09:48:43 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 102] |
more error.log |
The previous post was just notices. But the logs table missing doesn't sound good. Could you run the following?
|
mysql -u misp -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]> show tables; |
Yeah, that looks like your table import failed. Could you redo the steps for the MYSQL.sql import? Something went REALLY wrong over there during installation. |
mysql -u misp -p misp < INSTALL/MYSQL.sql |
what version of MISP is this? |
The latest on Git. I executed git clone https://github.com/MISP/MISP.git. Is there a command to get that info? This is a new install. |
In your MISP installation could you paste the contents of the following files?
|
more VERSION.json |
more /var/www/MISP/INSTALL/MYSQL.sql --
|
Indeed, could you get the latest commit? Simply
The latest commit doesn't have fulltext indeces! |
10-4. Rerun the sql import? |
yup! |
Good news is the tables are all there; Bad news is I am getting perms errors now |
looks like perms on the webroot were reset. Do I need to do anything other than reset to permissions? |
nope, you should be good to go. |
Same thing. Below is the dbug log. I will post error seperately 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 21] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 1] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 10] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 48] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 50] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/footer.ctp, line 1] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 87] 2017-07-06 10:40:56 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 102] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 11] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 21] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 1] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 10] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 48] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 50] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/footer.ctp, line 1] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 87] 2017-07-06 10:41:02 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 102] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 11] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 21] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 1] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Elements/global_menu.ctp, line 10] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 48] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 50] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Elements/footer.ctp, line 1] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: me in [/var/www/MISP/app/View/Layouts/default.ctp, line 87] 2017-07-06 10:41:19 Notice: Notice (8): Undefined variable: debugMode in [/var/www/MISP/app/View/Layouts/default.ctp, line 102] |
more error.log |
I found you comment on the same exact error on this link. Could you clean your model cache just in case? rm /var/www/MISP/app/tmp/cache/models/myapp* The login page is now up. I will try and login and se if it works now |
Perfect, was about to suggest that. You only had 5 tables during the
incorrect import and they were erroneously cached.
BTW, the reason it couldn't be imported in the first place is that centos
is using a pretty old version of mariadb. So even though it should work
now, it's a good idea probably to upgrade to a less historic version ;)
…On Thu, Jul 6, 2017 at 5:10 PM, krypto29s ***@***.***> wrote:
I found you comment on the same exact error on this link.
MISP/MISP#1796 <MISP/MISP#1796>
Could you clean your model cache just in case?
rm /var/www/MISP/app/tmp/cache/models/myapp*
rm /var/www/MISP/app/tmp/cache/persistent/myapp*
The login page is now up. I will try and login and se if it works now
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#54 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADf6wPLuteunMA-4CFL2L44dUTAkfI8Sks5sLPjSgaJpZM4OPDzm>
.
|
The default creds do not work. Where are they stored? Guide says they should be 1Now log in using the webinterface: http://misp/users/login| # The default user/pass = admin@admin.test/admin |
What the hell.
|
I was just showing the user table.. sadly, it is empty. |
The first login should create a user o.O What the hell is going on. |
Are MySQL permissions and the settings in /var/www/MISP/app/Config/database.php correct? |
Not real sure. |
The settings within I mean, if you check the credentials in database.php, can you access mysql with it and create data in the existing tables on the misp database? |
public $default = array( |
I can try to create a user if you like? |
Give it a shot! |
But I don't get what's up. |
Do I need to add the user to the mysql, or the misp DB? what is the syntax for the table? It is currently empty. |
looks like the table is empy, so I would need to make columns for the table. |
After some crafty ingenuity, I have the table populated. I can't change the password; ./cake Password admin@admin.test Password1234 2017-07-06 12:15:41 Error: Can't use function return value in write context in [/var/www/MISP/app/Model/User.php, line 761] |
What is the authkey column in the user table? How is the password column salted? i am able to add users, but they won't authenticate because the pasword field is a encoded/encrypted value of the real password. |
I used the MYSQL db to load all the columns in the empty users table. Ok, so here is why the cake command didn't work. It wants to execute system level php. For some reason it keeps wanting to default to php 5.4. PHP 5.4 is not even installed. We fixed it by putting the relative path to php56. exec /opt/rh/rh-php56/root/usr/bin/php -q "$LIB"cake.php -working "$APP" "$@" From there I was able to execute ./cake Password admin@admin.test Password1234. This allowed me to login to the webgui, and setup the other accounts, and remove the test user after I was done. We can call this case closed now. |
Great! Sorry, had to take my train and get home so couldn't respond. It keeps reverting to PHP 5.4 since you need an scl rh56 enabled bash (scl enable rh-php56 bash), but your solution is perfectly fine! |
No worries, and thanks for all your help.
I do have a new issue though. I am now trying to get working on https only. The web console says that miss is disabled for all users when I access it via https. Any recommendations?
Thanks,
… On Jul 6, 2017, at 3:08 PM, Andras Iklody ***@***.***> wrote:
Great! Sorry, had to take my train and get home so couldn't respond. It keeps reverting to PHP 5.4 since you need an scl rh56 enabled bash (scl enable rh-php56 bash), but your solution is perfectly fine!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub <#54 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AcjGTHNx-Kr-rbJICAGlsHHRtz8Q_VMqks5sLTCsgaJpZM4OPDzm>.
|
I followed the install guide according, and when I start the process everything appears to start but I am not able to access http://misp/user/login url. I am getting an error 500.
sudo su -s /bin/bash apache -c 'scl enable rh-php56 /var/www/MISP/app/Console/worker/start.sh'
[sudo] password for sjohn345:
Stopping workers
Stopping 12950 ... Done
Stopping the Scheduler Worker ... Done
Stopping 12968 ... Done
Stopping 12986 ... Done
Stopping 13004 ... Done
Creating workers
Starting worker ... Done
Creating workers
Starting worker ... Done
Creating workers
Starting worker ... Done
Creating workers
Starting worker ... Done
Creating the scheduler workers
Starting scheduler worker ... Done
! more misp.local_error.log
[Wed Jul 05 21:28:56.478562 2017] [:error] [pid 11684] [client ::1:51188] PHP Fatal error: Can't use function return value in write context in /var/www/MISP/app/Controller/UsersController.php on line 97
[Wed Jul 05 21:28:56.479803 2017] [:error] [pid 11684] [client ::1:51188] PHP Fatal error: Can't use function return value in write context in /var/www/MISP/app/Controller/AppController.php on line 305
[Wed Jul 05 21:29:02.058256 2017] [:error] [pid 2369] [client ::1:51190] PHP Fatal error: Can't use function return value in write context in /var/www/MISP/app/Controller/AppController.php on line 305
The text was updated successfully, but these errors were encountered: