fuzzz / extshark

Web-based packet decoder
MIT License
32 stars 19 forks source link

Error parsing Json response: null when trying to open file list #1

Closed TrXuk closed 8 years ago

TrXuk commented 12 years ago

When clicking 'Open' at the top of the UI, the following error is given; "Error parsing JSON response: null" A blank 'Chose file' window is seen in the background.

Apache logs related to the error are below:

Wed Apr 25 14:36:45 2012] [error] [client 127.0.0.1] PHP Warning: Missing argument 1 for Util::loadDumpDir() in /var/www/html/extshark/php/classes/Util.php on line 4, referer: http://localhost/extshark/ [Wed Apr 25 14:36:45 2012] [error] [client 127.0.0.1] PHP Notice: Undefined variable: params in /var/www/html/extshark/php/classes/Util.php on line 10, referer: http://localhost/extshark/ [Wed Apr 25 14:36:45 2012] [error] [client 127.0.0.1] PHP Notice: Trying to get property of non-object in /var/www/html/extshark/php/classes/Util.php on line 10, referer: http://localhost/extshark/ [Wed Apr 25 14:36:45 2012] [error] [client 127.0.0.1] PHP Notice: Undefined variable: params in /var/www/html/extshark/php/classes/Util.php on line 11, referer: http://localhost/extshark/ [Wed Apr 25 14:36:45 2012] [error] [client 127.0.0.1] PHP Notice: Trying to get property of non-object in /var/www/html/extshark/php/classes/Util.php on line 11, referer: http://localhost/extshark/

Looks like the $params var passed to loadDumpDir is empty. Referenced only from one other location in the php dir;

[root@matjohn2-pc php]# grep -R loadDumpDir * classes/Util.php: function loadDumpDir($params){ config.php: 'loadDumpDir'=>array(

Either I'm meant to populate config.php with items or it's a bug, either way any chance in a little direction :)? Regards, Matt

fuzzz commented 12 years ago

Seems like two different bugs. Fisrt one is unwanted $params in Util.php. This is outcome from copy-paste :) Second is reading directory, maybe it is empty or something with permissions. I will debug it later.

fuzzz commented 12 years ago

It is because of output error text directly to browser. It led JSON parsing fails. Now, this issue has been corrected. But in release i will set up error_reportting to 0.