Version 2.4.19, PHP error because of an undefined index (Bugs)

by Juanma @, Monday, February 04, 2019, 22:04 (197 days ago)

Hello, I have the following error after updating to this new version.
My version of PHP is 5.4.31. Can the problem lie there?

Thank you.
PD: Excellent tool - ;-)

[image]

Avatar

Version 2.4.19, PHP error because of an undefined index

by Auge ⌂ @, Monday, February 04, 2019, 22:33 (197 days ago) @ Juanma

Hello

Hello, I have the following error after updating to this new version.
My version of PHP is 5.4.31. Can the problem lie there?

[image]

Even the PHP-version 5.4.31 is truly outdated, this is not the cause of your error. This is the code of the line 93 of functions.inc.php in MLF version 2.4.19:

 if ($current_time > intval($nda[0]['value'])) {

The variable $nda contains the result of a database request, the request for the value of mlf2_temp_infos.next_daily_actions that ssems not to exist in your database table.

Did you install the version 2.4.19 or did you an update from a previous version of My Little Forum? If you have access to your database with a tool like phpMyAdmin (in doubt ask your hosting company) please read the value of the row with the name "next_daily_actions" in the database table "mlf2_temp_infos" and show us the result of your investigation. The begin of the name can differ, if you changed the database prefix (in my example: "mlf2_" in "mlf2_temp_infos") during the installation.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Version 2.4.19, PHP error because of an undefined index

by Juanma @, Alicante (Spain), Monday, February 04, 2019, 23:00 (197 days ago) @ Auge

Hello again and thanks for the reply.
Do not change anything, I just did an update as I always do. The version I had installed was 2.4.18.1.
I attached capture of mlf2_temp_infos

[image]

Avatar

Version 2.4.19, PHP error because of an undefined index

by Auge ⌂ @, Tuesday, February 05, 2019, 11:05 (196 days ago) @ Juanma

Hello

Do not change anything, I just did an update as I always do. The version I had installed was 2.4.18.1.

I attached capture of mlf2_temp_infos

[image]

Ok, the table exists, the relevant dataset exists in the table, but nevertheless the database request for the dataset got no result.

$rNDA = mysqli_query($connid, "SELECT value FROM " . $db_settings['temp_infos_table'] . " WHERE name = 'next_daily_actions'");
$nda = mysqli_fetch_assoc($rNDA);
if ($current_time > intval($nda[0]['value'])) {

Undefined offset 0 of your error message says, that there is no element $nda[0], what equals to "there is no first dataset". When you run the following database query in the SQL-tab of phpMyAdmin, what is the result?

SELECT VALUE FROM mlf2_temp_infos WHERE name = 'next_daily_actions';

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Version 2.4.19, PHP error because of an undefined index

by Juanma @, Alicante (Spain), Tuesday, February 05, 2019, 14:41 (196 days ago) @ Auge

Good afternoon and thank you very much for your interest in helping me solve my problem.
I made a new clean installation and I kept giving the same problem and I think it will be because of my local server which is very outdated. What I did next was to make a clean installation but with the "install.sql" of version 2.4.18.1 and everything works perfect, but of course, in "mlf2_temp_infos" the tables "next_daily_actions" and "last_version_check" no longer exist access_permission_checks ".
May I have to update my mysql from version 5.6.20 to a more advanced one? Or I do not know if it's something from the configuration of my local server.
I apologize if my English is not very readable because I use the google translator and only God knows what that translator will be saying.

Thank you again.:ok:

Avatar

Version 2.4.19, PHP error because of an undefined index

by Auge ⌂ @, Wednesday, February 06, 2019, 10:20 (195 days ago) @ Juanma

Hello

I made a new clean installation and I kept giving the same problem and I think it will be because of my local server which is very outdated. What I did next was to make a clean installation but with the "install.sql" of version 2.4.18.1 and everything works perfect, but of course, in "mlf2_temp_infos" the tables "next_daily_actions" and "last_version_check" no longer exist "access_permission_checks".

The translation clutters your text. I assume you meant:

What I did next was to make a clean installation but with the "install.sql" of version 2.4.18.1 and everything works perfect, but of course, in the table "mlf2_temp_infos" the rows "next_daily_actions", "last_version_check" and "access_permission_checks" no longer exists.

Yes, before version 2.4.19 the table mlf2_temp_infos should be empty directly after the installation. The rows last_version_check and last_version_uri should get added with the first check for a newer version. The other rows (access_permission_checks, last_changes, next_daily_actions and version) was moved from the settings table with the update to version 2.4.19. So with the install.sql from version 2.4.18.1 these rows are not present in this table.

May I have to update my mysql from version 5.6.20 to a more advanced one? Or I do not know if it's something from the configuration of my local server.

The forum requires PHP in the version 5.4.x or higher and MySQL in Version 5.0 or higher. With MySQL 5.6 you are on the way and also your mentioned PHP version of 5.4.30 is good enough to run the forum. On the other hand a can't say anything about your server configuration.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

Version 2.4.19, PHP error, solved

by Auge ⌂ @, Thursday, February 07, 2019, 15:40 (194 days ago) @ Juanma

Hello

I found the reason for this and another bug. I made false assumptions about the availability of a function and – that's relevant for your problem – about the structure of the return value of another function. I provided and presented a fix for your report (relevant content begins with "And there is a further code change.") and also for the other issue, reported by Magma. A new version will be ready on todays evening (central european time/CET).

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Version 2.4.19, PHP error, solved

by Juanma @, Alicante (Spain), Thursday, February 07, 2019, 21:34 (194 days ago) @ Auge

Hello again, I am very happy that it could be solved, because it is an application of the best that I have tried and I am delighted with it. Thank you very much for your effort and dedication.
A greeting...

RSS Feed of thread
powered by my little forum