« Project home page
my little forum
Log in
Register
Search:
Back to the entry by Auge
Post reply
Reply to the message by
Auge
Name:
E-mail:
(optional, won't be displayed directly)
Leave this field empty:
Homepage:
(optional)
Leave this field empty:
Location:
(optional)
Remember me (cookie)
Category:
General
Project organisation
Technics
Design/Themes
Features
Development
Todo
Bugs
German / Deutsch
Spanish / Español
French / Français
Accessibility/UX
Subject:
Formatting help
skip to input
format text bold
[b]bold text[/b]
format text italic
[i]italic text[/i]
insert hyperlink
[link=http://example.com/]link text[/link] / [link]http://example.com/[/link]
set text color
[color=#rgb]colored text[/color]
font size
[size=small]small text[/size]
[size=large]large text[/size]
insert list
[list][*]list item[/list]
insert image
[img]http://example.com/image.jpg[/img]
left: [img=left]http://example.com/image.jpg[/img]
right: [img=right]http://example.com/image.jpg[/img]
thumbnail: [img=thumbnail]http://example.com/image.jpg[/img]
thumbnail left: [img=thumbnail-left]http://example.com/image.jpg[/img]
thumbnail right: [img=thumbnail-right]http://example.com/image.jpg[/img]
upload image
upload image ...
insert TeX code
[tex]TeX code[/tex]
insert code
[inlinecode]code[/inlinecode]
[code]code[/code]
[code=css]code[/code]
[code=html]code[/code]
[code=javascript]code[/code]
[code=perl]code[/code]
[code=php]code[/code]
[code=sql]code[/code]
[code=xml]code[/code]
:-)
;-)
:-P
:-D
:-|
:-(
:yes:
:no:
:ok:
:lol:
:lol2:
:lol3:
:cool:
:surprised:
:angry:
:crying:
:waving:
:confused:
:lookaround:
:clap:
:love:
:tick:
Message:
> 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 [link=https://github.com/ilosuna/mylittleforum/pull/453]the installation script[/link] 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 > > > [code=php]// 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; > } > } > }[/code] > > to > > [code=php]// 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; > } > } > }[/code] > > because to provide the database name is mandatory and when installing the forum it is not part of the data in [inlinecode]config/db_settings.php[/inlinecode]. > > When this was solved, the creation of the database tables failed because in the userdata table the column [inlinecode]user_name[/inlinecode] should get an index of the same name what ended in an error message about the double use of the name [inlinecode]user_name[/inlinecode]. This could possibly be an issue of the database configuration of my webspace. Anyway, I solved it with renaming the index/key from [inlinecode]user_name[/inlinecode] to [inlinecode]k_user_name[/inlinecode]. > > 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 [inlinecode]$errors[/inlinecode] 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
E-mail notification on reply of this posting
OK - Submit
Preview