unrealircd-webpanel icon indicating copy to clipboard operation
unrealircd-webpanel copied to clipboard

I have performed a new installation of unrealircd-webpanel (07/05/2023).

Open Madriix opened this issue 1 year ago • 7 comments

Hi I didn't need to delete the tables this time; everything was accepted on both installation forms. A few days ago, I noticed that unrealircd-webpanel only works if the Sodium module (mod_sodium) is enabled on php, so I did that on my cPanel.

Here are the tests I performed (using PHP 8.2 and apache/httpd):

  • When I visit the homepage, there is no data displayed, as if it is not connecting to the IRC server's RPC.

  • No data is being shown from the RPC, even though I'm using the correct login and password.

Here is a screenshot Sans titre-1

Translation from French to English :

Connection with https://labs.xx.com/unrealircd-webpanel/api/notification.php was interrupted while loading the page. unrealircd-admin.js:137:21 Connection with https://labs.xx.com/unrealircd-webpanel/api/overview.php was interrupted while loading the page. unrealircd-webpanel:592:16 None of the "sha384" hashes of the "integrity" attribute match the contents of the subresource. 2 unrealircd-webpanel

Madriix avatar May 07 '23 20:05 Madriix

php max child processes try to increase the php max childprocesses at your domain

Thoraxx87 avatar May 07 '23 20:05 Thoraxx87

I tested this morning and also this evening, but the webpanel does not work for me

Madriix avatar May 08 '23 19:05 Madriix

@Madriix: did the suggestion of @Thoraxx87 help? And do other pages work? If you could test "Users" and "Spamfilter" too.

syzop avatar May 09 '23 15:05 syzop

@syzop Yes, I increased it to 40, but nothing is displaying, and it's lagging. The RPC is not showing any data, and nothing is appearing on any page, including the homepage.

Is your statistics system only live with PHP/JavaScript?

If you're trying to create a live statistics system, let me tell you, please abandon this idea because PHP/JavaScript/AJAX is not designed for that. If I were to do it, I would use Socket.IO and Node.js. Moreover, it can trigger a function on the client/server side only once for a group of connected moderators on the page. Honestly, your "live" system created solely with PHP/JavaScript is not suitable for this purpose.

usleep($every_msec * 1000);

It's dangerous to put everything under 30 seconds in php

In the code of unrealircd-webpanel, there are also if/else conditions based on "Apache," but I have never seen conditions based on the HTTP server name before. Everything works fine everywhere without using if statements in Nginx or Apache. Personally, I prefer to avoid using such conditions.

Madriix avatar May 09 '23 22:05 Madriix

Did you really test the "Spamfilter" page? I specifically asked you to check that page for a very good reason.

Be sure to check your webserver error log as well, but you should know that by now, since we mention it every time.

syzop avatar May 10 '23 06:05 syzop

@syzop I just tested it, all the pages that contain lists from the RPC results don't work, except for the "Spamfilter," "Name bans," and "Bans exceptions" pages. They work fine. However, the "Server bans" page returns a JSON error like the others. The JSON error seems to be caused by the fact that the API pages don't return any results.

Here are the errors I encounter when clicking on Users :

[11-May-2023 07:12:33 Europe/Paris] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/x/labs.x.com/unrealircd-webpanel/api/common_api.php:49) in /home/x/labs.x.com/unrealircd-webpanel/api/users.php on line 5

When clicking on Channels : [11-May-2023 07:14:08 Europe/Paris] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/x/labs.x.com/unrealircd-webpanel/api/common_api.php:49) in /home/x/labs.x.com/unrealircd-webpanel/api/channels.php on line 5

Server bans : [11-May-2023 07:15:46 Europe/Paris] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/x/labs.x.com/unrealircd-webpanel/api/common_api.php:49) in /home/x/labs.x.com/unrealircd-webpanel/api/server-bans.php on line 4

In the side bar, there is also this: Admin Panel unknown

With the "unknown" instead of the version there was before

Madriix avatar May 11 '23 05:05 Madriix

@syzop Oh, that's good! The "Users" and "Channels" are displayed when I replace this:

flush_completely(); with: //flush_completely();

(in common_api.php)

However, that doesn't solve everything. There are other pages that don't display or take a long time to load with significant lag. Additionally, the version in the sidebar is still unresolved.

And also, "Channels" and "Users" no longer appear if we have visited them just before. They don't work anymore if we go back to those pages. But they work again if we wait a few minutes or seconds

Madriix avatar May 11 '23 05:05 Madriix