Hi,
I am struggling little bit with the status of the system. I am not able to check it at all .
I am getting the following :
Slim Application Error
The application could not run because of the following error:
Details
Type: ErrorException
Code: 2
Message: Division by zero
File: /opt/unetlab/html/includes/api_status.php
Line: 113
Trace
#0 /opt/unetlab/html/includes/api_status.php(113): Slim\Slim::handleErrors(2, 'Division by zer...', '/opt/unetlab/ht...', 113, Array)
#1 /opt/unetlab/html/api.php(236): apiGetSwapUsage()
#2 [internal function]: {closure}()
#3 /opt/unetlab/html/includes/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#4 /opt/unetlab/html/includes/Slim/Slim.php(1357): Slim\Route->dispatch()
#5 /opt/unetlab/html/includes/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#6 /opt/unetlab/html/includes/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#7 /opt/unetlab/html/includes/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#8 /opt/unetlab/html/includes/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
#9 /opt/unetlab/html/api.php(1339): Slim\Slim->run()
#10 {main}
Any ideas?
Slim Application Error - DIVISION BY ZERO
Moderator: mike
-
- Posts: 3
- Joined: Mon Jun 12, 2017 1:41 pm
-
- Posts: 533
- Joined: Wed Mar 15, 2017 1:54 pm
Re: Slim Application Error - DIVISION BY ZERO
You did a custom installation ?
This error occurs due to lack of swap partition....
in /opt/unetlab/html/include/api_node.php
replace line 113:
from:
return 100 - round($used / $total * 100) ;
to:
return ( $total != 0 ) ? 100 - round($used / $total * 100) : 0 ;
E.
This error occurs due to lack of swap partition....
in /opt/unetlab/html/include/api_node.php
replace line 113:
from:
return 100 - round($used / $total * 100) ;
to:
return ( $total != 0 ) ? 100 - round($used / $total * 100) : 0 ;
E.
-
- Posts: 3
- Joined: Mon Jun 12, 2017 1:41 pm
Re: Slim Application Error - DIVISION BY ZERO
Fixed!!!!!
Thanks a lot!
Thanks a lot!