Issues migrating to PHP 8 (Bugs)

by ST68k2 ⌂ @, France, Tuesday, August 17, 2021, 01:00 (1150 days ago)

Hello
First of all, thank you very much for your great forum "my little forum" that i have been using for many years !
We plan to migrate our web site to PHP 8.
All as been migrated with success except the forum which is base on my little forum last version 2.4.24.
When we apply the PHP 8 configuration we have fatal errors on smarty templates libraries.
We saw comments about smarty compatibility but we saw that it seems to have been solved by smarty developers.
Do you plan to release a version of my little forum compatible with PHP 8 ?
Thank you for your answer and congratulations for you work.
Best regards.

J & A

Avatar

Issues migrating to PHP 8

by Auge ⌂, Thursday, August 19, 2021, 06:52 (1148 days ago) @ ST68k2

Hello

We plan to migrate our web site to PHP 8.
All as been migrated with success except the forum which is base on my little forum last version 2.4.24.
When we apply the PHP 8 configuration we have fatal errors on smarty templates libraries.

Not only there, you'll encounter additional errors with many of the comments in the code (Perl like comments (starting with #) are gone with PHP 8) and a few functions.

We saw comments about smarty compatibility but we saw that it seems to have been solved by smarty developers.
Do you plan to release a version of my little forum compatible with PHP 8 ?

Yes, we plan to release a new version, but currently we have no release time for it.

Tschö, Auge

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

MLF and PHP 8

by Tommy Nilsson ⌂, Wednesday, December 22, 2021, 01:12 (1023 days ago) @ Auge

Do you plan to release a version of my little forum compatible with PHP 8 ?


Yes, we plan to release a new version, but currently we have no release time for it.

Any news on this issue?
My host (One.com) is likely to drop support for PHP 7 in less than a year from now.

MLF and PHP 8

by John P @, Saturday, January 29, 2022, 09:40 (984 days ago) @ Tommy Nilsson

I have always received great comments about My Little Forum and really want to keep using it but my host (InMotionHosting) is also stopping support of PHP 7 within the next few months. How is the transition of MLF to PHP 8 going? Any chance it will be done in the next few months?

Avatar

MLF and PHP 8

by Auge ⌂, Monday, January 31, 2022, 02:59 (983 days ago) @ John P

Hello

Any chance it will be done in the next few months?

See my reply to Tommy.

Tschö, Auge

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

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Thursday, April 21, 2022, 11:27 (903 days ago) @ John P

Hello

my host (InMotionHosting) is also stopping support of PHP 7 within the next few months. How is the transition of MLF to PHP 8 going? Any chance it will be done in the next few months?

I have finished the work on the last piece of server side code I wanted to get ready (PR #575) before the release of a first PHP-8-aware version of MLF2. To be clear, the feature to set a target frame for links in forum entries (to break out of an Iframe), that PR #575 introduces, is not ready yet. It needs counterpart code at the JS-side but the non-existing JS-code does not break anything. It only prevents the feature from working.

So we are ready to release a first PHP-8-aware version of MLF2. The code in the master branch (currently the development branch for version 2.5) is in general well tested because Micha operates his forum with the current development state (with exception of the changes from PR #575) since "ages" and he fixed several issues of the 2.5-development-branch during the latest two years.

I will contribute a last commit that changes the doctype declaration for the default theme to HTML5 and will afterwards release a new version. Therefore I will change the version number scheming to be date based (i.e. "20220421" (does not exist in reality)) as stated in another forum entry. The version number, using the old scheme (will be v2.5.0), will be added to the release notes only, so one is able to compare it to an older release/code status.

Tschö, Auge

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

Avatar

MLF and PHP 8: it will come contemporary

by Micha ⌂, Thursday, April 21, 2022, 12:24 (903 days ago) @ Auge

Hello,

To be clear, the feature to set a target frame for links in forum entries (to break out of an Iframe), that PR #575 introduces, is not ready yet. It needs counterpart code at the JS-side but the non-existing JS-code does not break anything. It only prevents the feature from working.

The JS code is already finished - in my opinion. A first try today was successfully in my forum. Sometimes, it needs a browser refresh to activate the new setting. I believe, it is a caching issue of the browser. Great job, Auge!

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Thursday, April 21, 2022, 12:53 (903 days ago) @ Micha

Hello

The JS code is already finished - in my opinion.

This is the code for the users own preference but not for the different forum wide setting (that can only set the target to _self, _parent, _top or an arbitrary name beginning with a latin letter). I can't see any code, that works with the directly provided attribute values of the forum wide settings instead working with the key words, that are used in the function setLinkTarget.

Am I missing something?

A first try today was successfully in my forum. Sometimes, it needs a browser refresh to activate the new setting. I believe, it is a caching issue of the browser.

… as discussed in the PR-comments. :-D

Great job, Auge!

Thank you.

Tschö, Auge

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

Avatar

MLF and PHP 8: it will come contemporary

by Micha ⌂, Thursday, April 21, 2022, 12:58 (903 days ago) @ Auge

Hello,

Am I missing something?

Give me a minute. I will read the target name from settings["forum_based_link_target"]. This is missing, isn't it?

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Thursday, April 21, 2022, 01:09 (903 days ago) @ Micha

Hello

Am I missing something?


Give me a minute. I will read the target name from settings["forum_based_link_target"]. This is missing, isn't it?

That sounds plausible. :-)

Tschö, Auge

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

Avatar

MLF and PHP 8: it will come contemporary

by Micha ⌂, Thursday, April 21, 2022, 01:56 (903 days ago) @ Auge

Hello,

Give me a minute. I will read the target name from settings["forum_based_link_target"]. This is missing, isn't it?


That sounds plausible. :-)

Okay, I modified the code and merged the files.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Thursday, April 21, 2022, 02:23 (903 days ago) @ Auge

Hello

Soliloquy: We have to check, if the external scripts (stored in modules), we are using, are PHP-8-aware in itself.

These are:

- Akismet
- B8 (latest release I found is version 1.1.0 from 2020-07-11)
- Bad Behavior (latest release 2.2.23 from 2019-08-07 (really latest release 2.2.24 does only affect users of WordPress))
- GesHi (latest release 1.0.9.0 from 2017-05-15)
- phpMailer
- Smarty (we need Smarty 4.0.x for PHP-8.0-support and Smarty 4.1 for PHP-8.1-support)
- stringparser_bbcode (no development since ages, only checking for compatibility)

@Micha: are you able to say something at least about B8 and phpMailer? You included these modules and commited several updates.

Tschö, Auge

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

Avatar

MLF and PHP 8: it will come contemporary

by Micha ⌂, Thursday, April 21, 2022, 03:06 (903 days ago) @ Auge

Hi,

I integrated PHPMailer about 3 years ago. Moreover, I don't use this module because php mail runs well. Currently version 6.0.7 is used but 6.6.0 is available. We can try to update.

B8 (not from github) should work with PHP8, afaik.

The most warnings and errors results from Akismet. Here, we need an update. There is also a problem in function.inc.php using strftime(), i.e.

[21-Apr-2022 14:50:25 UTC] PHP Deprecated:  Function strftime() is deprecated in /forum/includes/functions.inc.php on line 1672
[21-Apr-2022 14:50:25 UTC] PHP Warning:  Trying to access array offset on value of type bool in /forum/includes/thread.inc.php on line 66
[21-Apr-2022 14:50:25 UTC] PHP Warning:  Undefined array key "subnav_location" in /forum/templates_c/589995f7aa63ac0c1cdde6e900ef07909c7e1765_0.file.main.tpl.php on line 26
[21-Apr-2022 14:50:25 UTC] PHP Deprecated:  implode(): Passing null to parameter #1 ($separator) of type array|string is deprecated in /forum/modules/smarty/plugins/shared.mb_str_replace.php on line 49

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Thursday, April 21, 2022, 06:26 (903 days ago) @ Micha

Hello

Currently version 6.0.7 [of PHPMailer] is used but 6.6.0 is available. We can try to update.

Yes, I think we should.

B8 (not from github) should work with PHP8, afaik.

o.k.

The most warnings and errors results from Akismet. Here, we need an update.

o.k.

There is also a problem in function.inc.php using strftime(), i.e.

[21-Apr-2022 14:50:25 UTC] PHP Deprecated:  Function strftime() is deprecated in /forum/includes/functions.inc.php on line 1672
[21-Apr-2022 14:50:25 UTC] PHP Warning:  Trying to access array offset on value of type bool in /forum/includes/thread.inc.php on line 66
[21-Apr-2022 14:50:25 UTC] PHP Warning:  Undefined array key "subnav_location" in /forum/templates_c/589995f7aa63ac0c1cdde6e900ef07909c7e1765_0.file.main.tpl.php on line 26
[21-Apr-2022 14:50:25 UTC] PHP Deprecated:  implode(): Passing null to parameter #1 ($separator) of type array|string is deprecated in /forum/modules/smarty/plugins/shared.mb_str_replace.php on line 49

While I was in functions.inc.php I came across the function create_backup_file. If I remember correct, we decided to remove the backup functionality and I wa sure, that you removed it for true. But when searching the repository I can't find any commit, that removed the functions, pages and so on. Do I remember of things that never happened?

Tschö, Auge

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

Avatar

MLF and PHP 8: it will come contemporary

by Micha ⌂, Friday, April 22, 2022, 09:53 (902 days ago) @ Auge

Hello,

Yes, I think we should.

I will try it.

While I was in functions.inc.php I came across the function create_backup_file. [...] Do I remember of things that never happened?

I don't have any idea. I don't remember deleting anything either. But we wanted to do it.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Friday, April 22, 2022, 01:00 (902 days ago) @ Micha

Hello

I'll remove the relevant code on sunday.

Tchö, Auge

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

Avatar

MLF and PHP 8: strftime

by Auge ⌂, Sunday, April 24, 2022, 07:47 (899 days ago) @ Micha

Hello

perfect. Please use the last version of the functions.inc.php, because I fixed the strftime issue.

I'm on it and I saw your several changes. Thank you very much.

Tschö, Auge

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

Avatar

Question about the removal of the backup feature

by Auge ⌂, Monday, April 25, 2022, 07:36 (898 days ago) @ Micha

Hello

perfect. Please use the last version of the functions.inc.php, because I fixed the strftime issue.

I'm more or less done with the removal of the backup function and I made sure to pull your changes before branching in preparation of the removal work. There are a few strings remaining and the code in admin(.min).js.

The admin.js contains – as far as I see – only the event listener to call the function for the backup and the (not admin specific) drag'n'drop table sorting algorithm. Am I right, that when I remove the function in the variable initBackupControls and its call inside the function MyLittleAdmin there remains nothing more than the call for DragAndDropTable in the event listener?

Tschö, Auge

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

Avatar

Question about the removal of the backup feature

by Micha ⌂, Tuesday, April 26, 2022, 07:19 (898 days ago) @ Auge

Hello,

Am I right, that when I remove the function in the variable initBackupControls and its call inside the function MyLittleAdmin there remains nothing more than the call for DragAndDropTable in the event listener?

I think this file content can be reduced to

document.addEventListener("DOMContentLoaded", function(e) {
 new DragAndDropTable(document.getElementById("sortable"), "admin", "action");
});

Moreover, the i18n files can be reduced due to the reduction, i.e.,

lang["delete_backup_confirm"]
lang["delete_sel_backup_confirm"]
lang["check_all"]
lang["uncheck_all"]

In js_defaults.inc.php, the block becomes obsolete, too

<?php if(isset($user_type) && $user_type==2): ?>
 lang["check_all"] =                        "<?php echo addslashes($lang['check_all']); ?>";
 lang["uncheck_all"] =                      "<?php echo addslashes($lang['uncheck_all']); ?>";
 lang["delete_backup_confirm"] =            "<?php echo addslashes($lang['delete_backup_confirm']); ?>";
 lang["delete_sel_backup_confirm"] =        "<?php echo addslashes($lang['delete_sel_backup_confirm']); ?>";
<?php endif; ?>

Do you modify these files?

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

A Question about the removal of the backup feature

by Auge ⌂, Tuesday, April 26, 2022, 09:24 (898 days ago) @ Micha

Hello

Am I right, that when I remove the function in the variable initBackupControls and its call inside the function MyLittleAdmin there remains nothing more than the call for DragAndDropTable in the event listener?


I think this file content can be reduced to

document.addEventListener("DOMContentLoaded", function(e) {
new DragAndDropTable(document.getElementById("sortable"), "admin", "action");
});

That validates my assumption. Thank you.

Moreover, the i18n files can be reduced due to the reduction, i.e.,

lang["delete_backup_confirm"]
lang["delete_sel_backup_confirm"]
lang["check_all"]
lang["uncheck_all"]

I see, that the strings/variables lang["check_all"] and lang["uncheck_all"] are only in use along with the backup function. I expected them to be in use in the admin area whereever one can select entries with checkboxes (namely in the lists of users). I would like to keep those strings and use them in the named admin page, but not only there. IMHO the feature to select all displayed entires at once should also be available in the lists of categories, smilies and pages.

Do you modify these files?

Yes I will with the exception of the named strings lang["check_all"] and lang["uncheck_all"]. IMHO their further use is disputable.

PS: ist it really necessary to keep a separate JS-ressource for only the one event listener? Why not putting it to main(.min).js and to separate it from the other functions by adding a class or ID to the body of the admin area and to use that class or ID in an if-statement in the event handler? Or do you plan to reenhance the separate JS-functions for the admin area?

Tschö, Auge

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

Avatar

A Question about the removal of the backup feature

by Micha ⌂, Tuesday, April 26, 2022, 09:48 (898 days ago) @ Auge

Hello,

PS: ist it really necessary to keep a separate JS-ressource for only the one event listener?

No, it isn't. We can also remove the files and modify the main.(min).js as well

 document.addEventListener("DOMContentLoaded", function(e) {
  var mlf = new MyLittleJavaScript();
  var ajaxPreviewStructure = typeof settings != "undefined" && typeof settings["ajaxPreviewStructure"] == "string"?settings["ajaxPreviewStructure"]:false;
  if (mlf && typeof lang == "object") 
   mlf.init(ajaxPreviewStructure);
  new DragAndDropTable(document.getElementById("sortable"), "bookmarks", "mode", "admin", "action");
 });

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

A Question about the removal of the backup feature

by Auge ⌂, Tuesday, April 26, 2022, 11:45 (898 days ago) @ Micha

Hello

PS: ist it really necessary to keep a separate JS-ressource for only the one event listener?


No, it isn't. We can also remove the files and modify the main.(min).js as well

 document.addEventListener("DOMContentLoaded", function(e) {
var mlf = new MyLittleJavaScript();
var ajaxPreviewStructure = typeof settings != "undefined" && typeof settings["ajaxPreviewStructure"] == "string"?settings["ajaxPreviewStructure"]:false;
if (mlf && typeof lang == "object") 
mlf.init(ajaxPreviewStructure);
new DragAndDropTable(document.getElementById("sortable"), "bookmarks", "mode", "admin", "action");
});

To answer in an emoji-like manner: :tick:

Tschö, Auge :-D

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

Avatar

MLF and PHP 8: PHPMailer

by Micha ⌂, Friday, April 22, 2022, 04:32 (902 days ago) @ Auge

Hello,

Currently version 6.0.7 [of PHPMailer] is used but 6.6.0 is available. We can try to update.


Yes, I think we should.

I replaced the PHPMailer files and it was possible to received mails. It should work.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
PHP8, PHPMailer

Avatar

B8 Problems using PHP 8.1

by Micha ⌂, Thursday, April 28, 2022, 09:39 (896 days ago) @ Auge

Hallo,

B8 (not from github) should work with PHP8, afaik.

There is a problem and I'm currently not able to detect the source. B8 works with PHP 8.1. I was able to check it using the example provided by the developer. However, it doesn't work with PHP 8.1 in MLF. If I try to flag an entry as HAM, I get an error, i.e.,

Duplicate entry 'Testword' FOR KEY 'PRIMARY'

(call of function learn() and unlearn() )

The token column in $db_settings['b8_wordlist_table'] is the primary key. The key "Testword" exists of course and is used to count the classification HAM or SPAM. So, B8 trys to insert the value instead of updating the table. The question is: Why does it works with PHP 7.4 but not with PHP 8.1?

Is the collocation a problem? Currently, we are using utf8_general_ci instead of utf8_bin.

Any ideas?

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

B8 NO problems using PHP 8.1

by Micha ⌂, Thursday, April 28, 2022, 09:57 (896 days ago) @ Micha

Update:

Is the collocation a problem? Currently, we are using utf8_general_ci instead of utf8_bin.

This is the problem. I have to switch the collation of the token column to utf8_bin or utf8mb4_bin (as suggested by the B8 developer). Seems to be a local problem in my installation because it is correct at github.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: GesHi

by Micha ⌂, Friday, April 22, 2022, 09:51 (902 days ago) @ Auge

Hello,

- GesHi (latest release 1.0.9.0 from 2017-05-15)

[22-Apr-2022 11:01:55 Europe/Berlin] PHP Deprecated:  Function create_function() is deprecated in /forum/modules/geshi/geshi.php on line 4698

We should try to update this lib, too.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
GesHi

Avatar

MLF and PHP 8: GesHi

by Micha ⌂, Friday, April 22, 2022, 11:38 (902 days ago) @ Auge

Hello,

- GesHi (latest release 1.0.9.0 from 2017-05-15)

I took a look to the sources,

define('GESHI_VERSION', '1.0.9.0');

this version is already installed.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
PHP8, GesHi

Avatar

MLF and PHP 8: GesHi

by Micha ⌂, Friday, April 22, 2022, 12:50 (902 days ago) @ Micha

Hello,

FYI: I fixed this issue in GeSHI 1.0.9.0, cf. #581

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
PHP8, GesHi

Avatar

MLF and PHP 8: GesHi

by Auge ⌂, Friday, April 22, 2022, 12:58 (902 days ago) @ Micha

Hello

FYI: I fixed this issue in GeSHI 1.0.9.0, cf. #581

Thank you. FYI: I'll be afk until sunday afternoon.

Tschö, Auge

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

Tags:
PHP8, GesHi

Avatar

MLF and PHP 8: it will come contemporary

by Auge ⌂, Thursday, April 28, 2022, 07:22 (895 days ago) @ Auge

Hello

… we are ready to release a first PHP-8-aware version of MLF2. The code in the master branch (currently the development branch for version 2.5) is in general well tested …

I performed the last tests of the forum with activated PHP 8.1 and fell into a few traps. I overhauled the installation script some time ago, tested it at that time with PHP 7.2 or 7.3 and it worked. Now, with PHP 8.1 I had to rework the first attempt to connect to the database because the placeholders ("localhost" and the empty strings for user, database and password) caused a PHP error with a blank page.

So I changed the code, beginning with line #52 from


// try to connect to the database …
if ($connid = mysqli_connect($db_settings['host'], $db_settings['user'], $db_settings['password'])) {
 if (mysqli_select_db($connid, $db_settings['database'])) {
  mysqli_query($connid, 'SET NAMES utf8');
  if (table_exists($db_settings['forum_table'])) {
   // the forum seems to be installed
   header('Location: ../');
   exit;
  }
 }
}

to

// try to connect to the database …
if (!empty($db_settings['database']) && $connid = mysqli_connect($db_settings['host'], $db_settings['user'], $db_settings['password'])) {
 if (mysqli_select_db($connid, $db_settings['database'])) {
  mysqli_query($connid, 'SET NAMES utf8');
  if (table_exists($db_settings['forum_table'])) {
   // the forum seems to be installed
   header('Location: ../');
   exit;
  }
 }
}

because to provide the database name is mandatory and when installing the forum it is not part of the data in config/db_settings.php.

When this was solved, the creation of the database tables failed because in the userdata table the column user_name should get an index of the same name what ended in an error message about the double use of the name user_name. This could possibly be an issue of the database configuration of my webspace. Anyway, I solved it with renaming the index/key from user_name to k_user_name.

After solving this problem, the installation script run without further errors, created all tables, inserted the default settings and updated the settings, provided in the installation form and last but not least, created the administrator user with the data from the installation form. Afterwards it followed the last instruction to redirect to the main view if the array $errors was empty.

I expected to see the main page but I got only a blank page. Even with reloading the page it remained blank. This can be an indication of a syntax error like a not closed bracket (or something similar). So I updated the files in another testing installation and this installation works! At the moment I have no clue how to solve this issue so the release have to wait a bit.

Tschö, Auge

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

Avatar

MLF and PHP 8: Installation

by Micha ⌂, Friday, April 29, 2022, 06:55 (895 days ago) @ Auge

Hello,

I'll try to install a fresh version this weekend and report any issue.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: Installation

by Micha ⌂, Friday, April 29, 2022, 03:09 (895 days ago) @ Auge

Hi,

I can confirm all your problems. I've corrected the sources and, finally, was able to install the forum. Can you check the sources of the master branch?

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: Installation

by Auge ⌂, Friday, April 29, 2022, 03:26 (895 days ago) @ Micha

Hello

I can confirm all your problems. I've corrected the sources and, finally, was able to install the forum. Can you check the sources of the master branch?

:ok:

Thank you for your work. I'll start a new installation attempt.

Tschö, Auge

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

Avatar

MLF and PHP 8: Installation

by Auge ⌂, Sunday, May 01, 2022, 01:10 (893 days ago) @ Micha

Hello

I can confirm all your problems. I've corrected the sources and, finally, was able to install the forum.

Again: Thank you for your work.

Can you check the sources of the master branch?

I can confirm, that your solutions are a par with my own changes that I made during debugging the installation script. I also can confirm that I was able to install the forum with your code changes. In the light of my last observation that the forum responded with a blank page after the successful installation (see the latest two paragraphs in my last posting) the question remains, what you changed outside the installation script to make your code work while mine failed. :confused:

Anyway. I will perform now a few last tests and will release a new version if encounter no surprise.

Tschö, Auge

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

Avatar

MLF and PHP 8: Installation

by Micha ⌂, Sunday, May 01, 2022, 03:01 (893 days ago) @ Auge

Hello,

the question remains, what you changed outside the installation script to make your code work while mine failed. :confused:

I sligtly changed the index.php, too. I changed the $smarty->error_reporting because this function should be matched with the PHP function - as far as I understand the documentation.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

MLF and PHP 8: state of the mission

by Auge ⌂, Monday, May 02, 2022, 10:28 (892 days ago) @ Auge

Hello

So we are ready to release a first PHP-8-aware version of MLF2.

After my report about a failing installation attempt, Micha inserted the necessary fixes into the repository. I installed the forum with his changes and succeeded. With enabled error reporting to the browser window, I found a leftover occurence of strftime (a deprecated function) in the script user.inc.php which I solved and a message about the deprecated use of trim with an empty (NULL) string. So I searched for "trim" and found a bunch of occurences without a previous check for content in the processed variables.

After that I tried to install the version 2.4.23 to perform an update afterwards, what failed in a first step because I had to change from PHP 8.1 back to 7.4 before. :-D Then I checked which changes we need for the update script (SQL-queries, list of files to create and overwrite) and found a few inconsistences between the update script and the SQL-file for the installation. That's the time when yesterday ended. I will continue the work today in the evening.

Tschö, Auge

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

Avatar

MLF and PHP 8: mission accomplished 💥

by Auge ⌂, Sunday, May 08, 2022, 08:20 (885 days ago) @ Auge

Hello

We've done it. There is a first release that is compatible with PHP up to version 8.1.5 (tested).

Tschö, Auge

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

Avatar

MLF and PHP 8

by Auge ⌂, Monday, January 31, 2022, 02:58 (983 days ago) @ Tommy Nilsson

Hello

Do you plan to release a version of my little forum compatible with PHP 8 ?


Any news on this issue?

In one word: yes, ... but not as we once planned it (with a fixed number of features). There are a few half baked features that will it not make into the next releases and possibly will never see the light of a being part of a stable release. I'm in a deep motivation hole and so I work only every few months on the code base and also Micha seems to be not motivated enough to work on it.

I worked on the link-target-feature in the latest few weeks (not everything is pushed to Github and therefore not publicly visible). If the work on that feature has finished (needs further work by Micha) I will release a next release with the then up-to-date code base. I know, Micha did the whole work to make MLF PHP-8-aware and he uses a forum with a quite up-to-date code base. So I hope I can assume the current code base to be fairly stable (beside the currently not commited code). If he had found issues, he would have solved them.

After that, that was the arrangement, we will change the version scheme to a date based scheme and every new feature or independent working subfeature will lead to a new version. Everyone will be able to see in the first sight, when the latest version was released.

This has the advantage of being able to release features independent from other work. As experience shows is a fixed plan advantageous in the sense of having a defined goal but without the motivation to put the plan into effect *in a straight manner* it is more a deterrent wall than anything else.

So we would be able to say "let's implement and test this one thing" and to release a version without any interference with anything else, that have been left undone. The pull request history shows (especially in the latest two to three years) that there are several fixes that could be published since ages.

Tschö, Auge

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

Avatar

MLF and PHP 8

by Micha ⌂, Monday, January 31, 2022, 06:17 (983 days ago) @ Auge

Hello Auge,

needs further work by Micha

Oh, I didn't know that I had to add something to the code. Can you give me a hint whats missing in the JavaScript part?

I haven't done anything in the last time, because I want us to draw a line under a final release. In my opinion, it was not a good idea to collect and to implement features by features by features without providing a new release as new starting point.

I'm already worried that I won't be able to find a way back to the official version. So, in short, I will not contribute any code to the forum until the official version 2.5 is available. Otherwise I dig my own grave by handling different versions etc.

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
release, javascript, PHP8

Avatar

MLF and PHP 8

by Auge ⌂, Monday, January 31, 2022, 09:47 (982 days ago) @ Micha

Hello

Oh, I didn't know that I had to add something to the code. Can you give me a hint whats missing in the JavaScript part?

There is only the implementation of adding the target attribute with JS because of the ready-for-delivery cached entries. That's all. As far as I remember you halted the JS-side implementation until the server sided code is ready.

I haven't done anything in the last time, because I want us to draw a line under a final release. In my opinion, it was not a good idea to collect and to implement features by features by features without providing a new release as new starting point.

I support your sight on the decision to collect feature wishes and to wait with publishing a next version for a complete implementation of all wished features. As I stated to it was a completely wrong decision mainly made by me.

I'm already worried that I won't be able to find a way back to the official version.

Did you patch your forum so heavily?

So, in short, I will not contribute any code to the forum until the official version 2.5 is available. Otherwise I dig my own grave by handling different versions etc.

I completely understand your decision.

Tschö, Auge

PS: I had to reconstruct your entry because I edited it in a first attempt instead of replying to you (once again).

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

Avatar

MLF and PHP 8

by Micha ⌂, Tuesday, February 01, 2022, 08:56 (982 days ago) @ Auge

Hello Auge,

There is only the implementation of adding the target attribute with JS because of the ready-for-delivery cached entries. That's all. As far as I remember you halted the JS-side implementation until the server sided code is ready.

Hmm, I belive it is ready to use because there is a condition, i.e.,

if (typeof user_settings == "object" && typeof user_settings["open_links_in_new_window"] == "string") {

that checks if user_settings exists, and the php code generates such array. So, I'll come back to this point, if there is a problem. Up to now, I don't know, what I can do to push the release.

I'm already worried that I won't be able to find a way back to the official version.


Did you patch your forum so heavily?

Honestly, I don't know and I will notice it when updating. The time-span was to long...

/Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Tags:
release, javascript, PHP8

RSS Feed of thread