PDA

View Full Version : Can't access to Arcade


gnrx
28 Jan 2019, 09:17
Today, one user indicate to me that are a problem,
In some posts of some threads, at the top of site appears this error:
PHP Warning: Illegal string offset 'type' in ..../includes/class_postbit.php(345) : eval()'d code on line 57

Only in some pages of some threads.

But now, I can't access to arcade, if click to access appears this error:
PHP Warning: mysqli_query(): (42000/1055): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mydatabase.c.champ_gid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in ..../arcade/functions/dbclass_mysqli.php on line 193

PHP Warning: mysqli_error() expects exactly 1 parameter, 0 given in ..../arcade/functions/dbclass_mysqli.php on line 512

There is a SQL error.
You can contact the board administrator by clicking here

Error Returned
mySQL query error: SELECT c.champ_gid AS GID, c.champ_mid AS MID, c.champ_name AS name, COUNT(c.champ_mid) AS total, g.opentag AS prefix, g.closetag AS suffix
FROM games_champs AS c
LEFT JOIN user AS m ON (m.userid=c.champ_mid)
LEFT JOIN usergroup AS g ON (g.usergroupid=m.usergroupid)
GROUP BY MID
ORDER BY total DESC LIMIT 3

mySQL error:
mySQL error code:
Date: Monday 28th 2019f January 2019 11:47:36 PM

mySQL query error: SELECT c.champ_gid AS GID, c.champ_mid AS MID, c.champ_name AS name, COUNT(c.champ_mid) AS total, g.opentag AS prefix, g.closetag AS suffix
FROM games_champs AS c
LEFT JOIN user AS m ON (m.userid=c.champ_mid)
LEFT JOIN usergroup AS g ON (g.usergroupid=m.usergroupid)
GROUP BY MID
ORDER BY total DESC LIMIT 3

mySQL error:
mySQL error code:
Date: Monday 28th 2019f January 2019 11:47:36 PM

We apologise for any inconvenience

I reupload the files of the product and reinstall the product, but continue the problem.

In admincp-arcade click in Game List, appears this error lines:
PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

Thanks and regards.

gnrx
29 Jan 2019, 14:30
Like I can't resolved the issue, I reupload all files, re-install product, and continue the issue.
Now, also in admincp-arcade, when click in some menu, appears the same error to connect database.

I was try to uninstall (for then, install from 0) but not uninstall, when click in uninstall, not made any change, not appears uninstalling, its like "stop".

How uninstall from database?

Regards.

stangger5
30 Jan 2019, 10:40
Mind if I have a look?

gnrx
30 Jan 2019, 11:40
Mind if I have a look?

On the contrary, I am grateful for that, because I do not know what to do anymore.
I must indicate that, in my tests (I did not mind losing the user data of their games) I did some tests that I will comment. Even removing a table from the database and then installing the mod again, I see that you did not create it.
To get a look, do you mean the URL of my website? Currently I have the mod disabled seeing this problem, if you want to see it on the web, let me know and I enable it (and I'll provide you with url) if you mean access to admincp, I also give it to you if you want it.

Regards!

gnrx
05 Feb 2019, 20:27
At the moment, I can solved the issue for can install and uninstall, the problem...
A few weeks ago, I convert all my database tables to innodb (all except that necessary in myisiam and also, not of the tables of mods).
Today, I reconvert all tables to myisiam, and now, can install and uninstall, but continue with the issue, when access to arcade zone, have this problem:
When access to admincp-arcade-game list:
PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589

PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589


And when access to arcade (in forum) appears this:
PHP Warning: mysqli_query(): (42000/1055): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'mydatabase.c.champ_gid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in ..../arcade/functions/dbclass_mysqli.php on line 193

PHP Warning: mysqli_error() expects exactly 1 parameter, 0 given in ..../arcade/functions/dbclass_mysqli.php on line 512


There is a SQL error.
You can contact the board administrator by clicking here

Error Returned


We apologise for any inconvenience

Regards!

MrZeropage
06 Feb 2019, 10:59
It seems you really messed something up, why converting database and then again and back... huuhhh

What is your exact environment now?
database, mySQL-version, PHP-version ect

stangger took a look at your site?

gnrx
06 Feb 2019, 11:21
It seems you really messed something up, why converting database and then again and back... huuhhh
It was a bad idea, I know, although I really knew it later ...
I had some performance problems, I contacted vbulletin.com, we saw that I had some tables (without any explanation in innodb) I was advised to change all to innodb except 3 that must be myisam and 2 that are memory.
But I only converted the vb tables, not the mods.
From that moment, I had more problems, some errors that I did not know why, mods (new) that I could not install and / or that gave errors, others that I could not uninstall.
Unstable server performance, peaks of low CPU load peaks of high cpu load (and I have a VPS with leftover resources for my site).
And then I saw the problem in arcade and some other more as indicated above.
After several days / weeks with innodb and see the instability, in a certain way, produced in server, I decide to reconfigure the tables as by default they would be in a 0 installation, I mean, myisam.
From that moment, all my problems disappeared, everything worked perfectly again, both on the server (cpu loads) and on my site.
Although I see that, the installation of a mod or uninstall, for example, the arcade one, takes a long time, before it did not take that long, but now it does it correctly, installs and uninstalls without errors.
The only problem I have is the arcade one.

What is your exact environment now?
database, mySQL-version, PHP-version ect
PHP 7.1.26, mysql 5.7.25
stangger took a look at your site?
stangger and I, we contact via mp

Thanks and regards.

gnrx
11 Feb 2019, 00:16
Hi,
Finally, I was able to solve the problem!
stangger5 (from here thank you) could not solve the problem, but a comment he made about what he detected, left me on track in what to look for (and previously I did not realize looking for that kind of error .. .).
I started searching the internet and detected the problem.
I have mysql 5.7.25, but to not extend, here is the link to the problem:
https://stackoverflow.com/questions/37951742/1055-expression-of-select-list-is-not-in-group-by-clause-and-contains-nonaggr
The explanation its:
The full_group_by mode basically makes you write more idiomatic SQL. You can turn off this setting if you'd like. There are different ways to do this that are outlined in the MySQL Documentation. Here's MySQL's definition of what I said above:

MySQL 5.7.5 and up implements detection of functional dependence. If the ONLY_FULL_GROUP_BY SQL mode is enabled (which it is by default), MySQL rejects queries for which the select list, HAVING condition, or ORDER BY list refer to nonaggregated columns that are neither named in the GROUP BY clause nor are functionally dependent on them. (Before 5.7.5, MySQL does not detect functional dependency and ONLY_FULL_GROUP_BY is not enabled by default. For a description of pre-5.7.5 behavior, see the MySQL 5.6 Reference Manual.)
And the fix this:

Edit my.cnf of the server and add:
[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

In others words, remove: ONLY_FULL_GROUP_BY in WHM/cPanel of mysql

When I made the migration of the server, it coincided that I made the conversion to innodb of the tables of the database.
I blamed that reason for the failure, although it had no logic, but I thought it was for that reason.
I was wrong.
In my new server, that function comes by default, only affects ibproarcade, the rest of the forum and mods does not give any problem.
It was to make that change, restart mysql and .... to get back to work!
That yes, with all the tests I did I had eliminated all the ibproarcade data (scores ...) luckily, I keep the full backup of my previous server, restored that database, exported the ibproarcade tables, imported them in the new database of the new server, and everything returned as before, no loss of data (how important it is to keep a complete backup from time to time ... :))

But after all these tests, I could verify that ibproarcade is not 100% compatible with php 7.1.
I have enabled to show error messages, it shows 2 different messages in two different options with php 7.1.
If I set php 7.0 no error appears.
With php 7.1 everything works, but it shows these errors:

Go to admincp->arcade->Game List.
Appears this:
PHP Warning: A non-numeric value encountered in ..../admincp/arcade.php on line 589
One line for each game that I have installed, as I have 14 games installed, 14 lines appear, if I have 5 games installed, 5 lines appear with that error.

Among the various pages that I have consulted this information, here, a user who has the same message and the explanation that this function as programmed, is not compatible with php 7.1.
It happens to me, if you set your site to php 7.0, it disappears:
https://forums.cpanel.net/threads/root-ownership-problem.588279/#post-2380427

Without going further, after thinking that the fault was coming from one cause, it was from another, thanks to stangger5 that left me on the track of what could happen and from there, I started looking.

Regards!!

stangger5
11 Feb 2019, 20:20
To fix the error "PHP Warning: A non-numeric value encountered in..." with PHP 7.1.26

admincp/arcade.php

Find:
if (substr($bbuserinfo['tzoffset'],1,0) == "+")
{

$temptime = $temptime + strval(substr($bbuserinfo['tzoffset'],1)) * 3600;
}
else
{

$temptime = $temptime - strval(substr($bbuserinfo['tzoffset'],1)) * 3600;
}

change to
if (substr($bbuserinfo['tzoffset'],1,0) == "+")
{

$temptime = $temptime + strval((int)substr($bbuserinfo['tzoffset'],1)) * 3600;
}
else
{

$temptime = $temptime - strval((int)substr($bbuserinfo['tzoffset'],1)) * 3600;
}

gnrx
12 Feb 2019, 07:15
Hi stangger5,

I made the changes that you indicate and now, yes, work fine in php 7.1.26, not appears the error.

Again, thank you!

MrZeropage
15 Feb 2019, 22:35
Fine, thanks to stangger!

...and gnrx: don't touch the database again and mess it up :D ;)

gnrx
18 Feb 2019, 16:29
That I thought at the beginning, that the problem was that "touch" the database, but no ... that was not the problem.
Coincidentally coincided with server migration, and this mod is the only one I have installed (as well as vb) which is, in the configuration of mysql on the server, incompatible with sql_mode = only_full_group_by
So I had to make the appropriate modifications to the mysql configuration for this mod to work.
That's right, until I found out that the problem was that ... I thought it was what I "had touched", xD