Update breaks Quickbox web and Deluge web

@JMSolo is not a stranger he is the creator of this project. he is the only one who could just look and see whats wrong with your server.

That being said you installed our script. if we were out to hurt you don’t you think that would be part of the script?

We are working on writing up change logs. takes time to do. and as this is open source you could just look at the script itself.

From 2.4.2 to 2.4.4 the only additions/changes made were:

###Applications added - version bump 2.4.2 - 2.4.3
Syncthing added
CSF (firewall) added

###Security - version bump 2.4.3 - 2.4.4
Require specific user to access https downloads directory

###Aesthetics - version bump 2.4.3 - 2.4.4
Sortable widgets
Bandwidth chart aesthetics

1 Like

I’m looking through the code, but I’m a windows programmer.

Just occurred to me, just before it stopped working I hit the disable web console button as I have no use for that feature.

Is there a command to restart that service, or will it have restarted as part of the reboot? It might just be a coincidence but that was the last thing I did.

I wasnt trying to be disrespectful with the “stranger” comment, sorry if you were offended.

No worries, I am not offended. It’s a matter of choice and I like to figure these issues out hands on in order to prevent potential pitfalls for future users… without access to such environments it makes the troubleshooting incredibly difficult as I can’t possibly give a definitive answer to the 100 potential variables.

You could restart the web console by typing in systemctl restart shellinabox

PS: good call on the changelog… I am taking time now to publish all the commits that have been made. To that I do apologize. :blush:


That did restart the Shellinabox, but no effect on loading the quickbox webpage.

You know when you click on button that enables and disables the shellinabox has that been changed to do anything new, or that might conflict with something?

Deluge web interface is working. I dont know if that restarted when I rebooted, and I just assumed it wasnt because the Quickbox page wasnt loading. Its late here. Time for bed.

Anything in the apache error log? /var/log/apache2/error.log

500 server error is probably something that we should see a trace for somewhere.

1 Like

Yes! I saw this last night, but didnt thing too much about it with it mentioning utorrent and that being the only thing that was still working.

This is the error:-

PHP Parse error: syntax error, unexpected ‘;’ in /srv/rutorrent/home/inc/config.php on line 14

When I have looked at this file, its actually not just for rutorrent as I can see lots of Quickbox references in it.

Line 14 was

$interface = ;

So I changed that to

$interface = venet0;

restarted Apache

And we now have a Quickbox web interface coming up!! And back to normal!

Thanks for the reply @Jason and the solution.

That looks like the script didn’t write the adapter over the INETFACE text.

Just to confirm, are the other settings filled in with your proper network adapter?

// Network Interface
$interface = INETFACE;
$iface_list = array('INETFACE');
$iface_title['INETFACE'] = 'External';
$vnstat_bin = '/usr/bin/vnstat';
$data_dir = './dumps';
$byte_notation = null;

####Post Script:
A lot of those errors can safely be ignored in the error log. A lot of them are coming from hard-coded values that cannot be read dynamically by php, i.e; Network Adapters and CPU threads, etc etc.

Its not quite that, this is what I have:-

// Network Interface
$interface = venet0;
$iface_list = array(’’);
$iface_title[’’] = ‘External’;
$vnstat_bin = ‘/usr/bin/vnstat’;
$data_dir = ‘./dumps’;
$byte_notation = null;

Yeah, then you’ll need to place venet0 in each of those slots I have above. Anywhere it says INETFACE. I’ll look at this tomorrow closer and see what could potentially be making these values blank.

Great, thanks for your help.

Just looking through your code, the same problem was in


The “view additional bandwidth” box never worked. But I didnt really care as it wasnt core functionality for me. Pasting the interfaces in, now means that works too.

I wonder if this is why the bandwidth graph / chart never worked also? Checking data.php the first line was interface =; But setting it to venet0 does not give me a graph. I’ll let you know if I get it working.

Ok the graph now works too. In data.php there was another line with no value namely

$data[‘label’] = ;

Which I just set to any value, and we now have a blue line in the middle of the graph - never had that before. Sadly it isnt showing bandwidth usage, yet.

These are the files it reads from:


Looks like you found them all, just missing stat.php

in data.php I have the following:-

$rx[] = @file_get_contents("/sys/class/net//statistics/rx_bytes");
$tx[] = @file_get_contents("/sys/class/net//statistics/tx_bytes");
$rx[] = @file_get_contents("/sys/class/net//statistics/rx_bytes");
$tx[] = @file_get_contents("/sys/class/net//statistics/tx_bytes");

changed to

$rx[] = @file_get_contents("/sys/class/net/venet0/statistics/rx_bytes");
$tx[] = @file_get_contents("/sys/class/net/venet0/statistics/tx_bytes");
$rx[] = @file_get_contents("/sys/class/net/venet0/statistics/rx_bytes");
$tx[] = @file_get_contents("/sys/class/net/venet0/statistics/tx_bytes");

But still no graph. Hope what I am doing is helpful :slight_smile:

stat.php has the same problem

$interface = ;
$data[‘rec’] = exec(“cat /sys/class/net//statistics/rx_bytes”);
$data[‘snd’] = exec(“cat /sys/class/net//statistics/tx_bytes”);

Ohhhh with that fixed we now have a very pretty blue graph!

you can trust JMSolo, he helps so many ppl and nobody complains.

I am curious as we want to avoid this in the future.
Will you show me the output of the following:

cd /
locate set_interface

It should show as

server:/# locate set_interface

If those are all showing, then show me the output for:

cat /srv/rutorrent/home/db/interface.txt

This is where the file that the cronjob for writing your adapter to these files on updates lives. If you have an empty file for some reason and no results are returned, we will need to add your adapter. You can do:

printf "venet0" > /srv/rutorrent/home/db/interface.txt

Next, run the updater from your dashboard (no worries, if this happens again… it gives us an idea) to import the text back to the files. Then allow 1 minute to pass for your adapter to show up.

locate set_interface
locate: can not stat () `/var/lib/mlocate/mlocate.db’: No such file or directory

Cron job exists. Does point to /usr/local/bin/quickbox/system/set_interface

interface.txt is empty.

Run the printf command, updated, rebooted (just to be sure) Everything is working as you would expect!

It hasnt updated everything, as the formatting change i made to disk_data has been retained. It kept showing like 8 or 9 decimal places, so I added couple of lines to format it to 3.

Could you possibly share those lines? I’ll credit you in the commit. :slight_smile:

Of course, they arent impressive and I dont want credit for them. You might even tell me there’s a nicer way to do it. Maybe using number_format(round(@…etc)

     //hard disk
      $dftotal = round(@disk_total_space(".")/(1024*1024*1024),3); //Total
      $dffree = round(@disk_free_space(".")/(1024*1024*1024),3); //Available
      $dffree = number_format($dffree,3);
  $dfused = $dftotal-$dffree; //used
  $dfused = number_format($dfused,3);

I had another idea that you would have been more impressed with, but I couldnt get the syntax to work. In Config.php around line 238, where you are running lots of PS Axo commands to determine if a process exists,

I was thinking run a single “ps” command showing all processes for that user, store the list of running program names in a variable or array. And then the next call to ProcessExists just becomes a check to see if that process exists in the array for that user. I thought this would be a lot more efficient and save on calls to the server.

1 Like

Excellent call on number_format. I actually hadn’t considered that!

This would be much more efficient. I could add pending variables to work around how some services requires the name of the service itself. This is a good idea and I will work on pushing it into the timeline… more than likely by v2.4.6 - as v2.4.5 is already assigned to launch today or tomorrow.

Thanks for the effort on that, the share and the wonderful suggestion!

As per the number format to return cleaner and more readable values, this works and will be included soon:

  //hard disk
  $dftotal = number_format(round(@disk_total_space("$location")/(1024*1024*1024),3)); //Total
  $dffree = number_format(round(@disk_free_space("$location")/(1024*1024*1024),3)); //Available
  $dfused = number_format(round(@disk_total_space("$location")/(1024*1024*1024),3)-round(@disk_free_space("$location")/(1024*1024*1024),3)); //used
  $perused = (floatval($dftotal)!=0)?round($dfused/$dftotal*100,2):0;

Return values are:

Free: 3,841 GB
Used: 1,680 GB
Size: 5,521 GB
1 Like

Hi, sorry to revive this topic, but I just have the problem today after an update.

Interface whasn’t in these files:
/srv/rutorrent/home/widgets/stat.php /srv/rutorrent/home/widgets/data.php /srv/rutorrent/home/widgets/bw_tables.php /srv/rutorrent/home/inc/config.php

This was non-existent:

Here is what I’ve done:
echo "eth0" > /srv/rutorrent/home/db/interface.txt /usr/local/bin/quickbox/system/set_interface

Yesterday, I had a problem with sudo, master.txt was missing also and sudoers was broken:
echo "myusername" > /srv/rutorrent/home/db/master.txt