"Bad result object {}"

"Bad result object {}"

por Paul Martin -
Número de respuestas: 6
Hi all,

I just completed a jobe server install on to Ubuntu 16.04 following the guide. The install completed successfully without error.  However, when I run testsubmit.py all tests failed with error "Bad result object {}"

The Apache error log shows the following.   Any suggestion/advice/help?


Tue Jun 12 12:50:57.126831 2018] [:error] [pid 19564] [client ::1:51850] PHP Fatal error:  Uncaught Error: Call to undefined function mb_check_encoding() in /var/www/html/jobe/application/libraries/resultobject.php:37\nStack trace:\n#0 /var/www/html/jobe/application/libraries/resultobject.php(25): ResultObject::clean('')\n#1 /var/www/html/jobe/application/libraries/LanguageTask.php(461): ResultObject->__construct(NULL, 15, '', 'Hello world\\nIsn...', '')\n#2 /var/www/html/jobe/application/controllers/restapi.php(235): Task->resultObject()\n#3 /var/www/html/jobe/application/libraries/REST_Controller.php(432): Restapi->runs_post()\n#4 /var/www/html/jobe/application/libraries/REST_Controller.php(419): REST_Controller->_fire_method(Array, Array)\n#5 /var/www/html/jobe/system/core/CodeIgniter.php(325): REST_Controller->_remap('runs', Array)\n#6 /var/www/html/jobe/index.php(207): require_once('/var/www/html/j...')\n#7 {main}\n  thrown in /var/www/html/jobe/application/libraries/resultobject.php on line 37

Debugging so far...

  1. Check the install went OK: - Yes

  2. Make sure your webserver has read access to the entire jobe subtree - Yes

  3. Make sure your webserver has write access to jobe/files - Yes

  4. Make sure there exist users jobe and jobe00 through jobe09. - Yes

  5. Make sure there is a directory /home/jobe/runs owned by jobe and writeable by the webserver. - Yes

  6. Make sure there is a directory /var/log/jobe -yes.

Any advice or help here would be greatly appreciated
Thanks,




En respuesta a Paul Martin

Re: "Bad result object {}"

por Paul Martin -
I re-did the install on Debian 9 but am having the same issue there. 



En respuesta a Paul Martin

Re: "Bad result object {}"

por Richard Lobb -

That's odd. It seems the mbstring module has not been installed. You did execute all four lines of the apt install command in the section "Installing the necessary dependencies", I assume?

Could you run the commands

sudo apt update
sudo apt install php-mbstring

and report on the output, please? It should say php-mbstring is already the newest version.

Richard

En respuesta a Richard Lobb

Re: "Bad result object {}"

por Paul Martin -

Thanks for your reply and help here Richard. It's very much appreciated. 

Here is the output:

root@gamma:/var/www/html/jobe# sudo apt install php-mbstring

Reading package lists... Done

Building dependency tree       

Reading state information... Done

php-mbstring is already the newest version (1:7.0+35ubuntu6.1).

0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.


Here is the output from the simpletest:

root@gamma:/var/www/html/jobe# python3 simpletest.py 

Supported languages:

  •     c: 5.4.0
  •     cpp: 5.4.0
  •     java: 9
  •     nodejs: 4.2.6
  •     php: 7.0.30
  •     python3: 3.5.2

Running python...

Bad result object {}

Running C++

Bad result object {}

Running Java

Bad result object {}


These is newly installed system running only the necessary dependencies and the jobe server.  perhaps I need to do something else. In the install guide you mention "The Python3 and the C development system must also be installed."  


Paul






En respuesta a Paul Martin

Re: "Bad result object {}"

por Paul Martin -

Think I found the issue,  mbstring installed but not enabled

added "extension=php7.0-mbstring.so" and restarted apache


Simpletest output is now:


/var/www/html/jobe# python3 simpletest.py 

Supported languages:

  •     c: 5.4.0
  •     cpp: 5.4.0
  •     java: 9
  •     nodejs: 4.2.6
  •     php: 7.0.30
  •     python3: 3.5.2

Running python...

Successful run

Output:

Message is Hello Jobe!

Running C++

Successful run

Output:

Hello Jobe!

Running Java

Successful run

Output:

Farewell cruel world


Thanks again for your help, Richard.

Paul




En respuesta a Paul Martin

Re: "Bad result object {}"

por Richard Lobb -

Good to know the problem is solved. I'm still slightly puzzled though, as apt install is all that's usually needed. I wonder if it was the restart of Apache that did the trick? I'll consider adding the suggestion of restarting Apache to the install instructions.

Richard