Closed Madriix closed 1 year ago
Thank you for your report. Please can you provide any relevant error logs from your apache/nginx error log?
@ValwareIRC Ah it's good I see, I left the default configuration of Php 8.2, I just made sure to check things like fopen and to display the error logs and I increased the upload size as d Usually, I had forgotten all that.
It's ok I get an error, and in fact I have to activate this module in php: Fatal error: Uncaught Error: Call to undefined function sodium_crypto_aead_xchacha20poly1305_ietf_keygen() in
It is not noted that in https://www.unrealircd.org/docs/UnrealIRCd_webpanel
@ValwareIRC it is solved. Under Cpanel I must activate the "mod_sodium".
@ValwareIRC The list of users is not displayed in the "Users" section, but it works when I remove this code in common_api.php:
// Flush and stop output buffering (eg fastcgi w/NGINX)
/*while (1)
{
try {
$ret = @ob_end_flush();
if ($ret === false)
break;
} catch(Exception $e)
{
break;
}
};*/
I'm on apache
All lists are displayed on the other pages. On the other hand I have to look for the problem for "Channels" because it does not appear
It's good I found, it's line 38 of the /api/channels.php file that is wrong
<b>Deprecated</b>: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in <b>/home/.../unrealircd-webpanel/api/channels.php</b> on line <b>38</b><br />
The line 38 is:
usort($out, "custom_sort");
The problem is solved, I replaced this:
function custom_sort($a,$b)
{
return ($b["Users"] > $a["Users"]) ? true : false;
}
by :
function custom_sort($a, $b) {
if ($b["Users"] > $a["Users"]) {
return 1;
} else if ($b["Users"] < $a["Users"]) {
return -1;
} else {
return 0;
}
}
I asked ChatGPT why I was getting this error with this function, and it gave me this function which fixes the problem
Both issues fixed now. Thanks!
By the way, @Madriix i believe you have PHP display_errors
turned on. We talked about this before. It is good for developing stuff but will cause issues on production or indeed things like this webpanel where it would print a HTML warning in the middle of JSON output.
As they say in the PHP documentation:
Note: This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet).
Hello,
I did a fresh installation of UnrealIRCd-webpanel, so I deleted the directory from my FTP and removed all SQL tables. I also updated my PHP server to 8.2 and installed:
(I am using cPanel and CentOS, so no need to set special permissions for the database)
On the first page, I filled out the form with my database information, and the connection was successfully established. Then, on the next page for the admin password and email, as soon as I submit it, I receive a blank page and cannot continue.
What could be causing this problem?
Best regards.