News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF 2.1 RC3 goes into infinite loop when installing

Started by davidhs, February 14, 2021, 07:26:57 AM

Previous topic - Next topic

davidhs

I can not install (I want install, not upgrade) SMF 2.1 RC3 in my local server (Windows 8.1, Apache 2, PHP 5.6.31, MariaDB 5.0.11).
This install correctly in my server online. Can be the PHP version?
2.1 RC2 install correctly.

In Step 3: Database Settings I fill fields and system goes into infinite loop. When stopped, the browser error page is displayed, with url install.php?step=2

I saw the source code and the infinite loop is in /Sources/Subs-Admin.php, line 1284. I added some "echo" and if foreach is visited more than one time, goes to infinite loop.

<?php
/* 3.b: Loop through all our substitutions to insert placeholders, etc. */
echo "Passes through here. "$pass 2;
$last_var null;
$bare_settingsText $settingsText;
$force_before_pathcode = array();
foreach ($substitutions as $var => $substitution)
{
$pass--; echo "($pass)"; if (!$pass) exit;
$placeholders[$var] = $substitution['placeholder'];

?>

moyack

Hi davidhs!!

Long time no see!! well, you know I'm not as expert than you in PHP, but my bet in the bug is your PHP version. this SMF 2.1 works best in PHP 7.2 and up!!

HUGS!!!

Shambles

I'd change

if (!$pass) exit;

to

if ($pass == 0) exit;

There's something in the back of my mind about assuming a zero value will be interpreted as boolean 'false'.

shawnb61

I cannot reproduce this in my Windows 10 environment using either the RC3 download from this site or the current GitHub download.

My suspicion is actually the Maria DB ver 5.0.11 - which is extremely old.  (MariaDB split from MySQL and started numbering their versions from 10.0.x back in 2012...  5.0.x isn't available on the MariaDB site for download, even on their archived "all releases" page...  https://downloads.mariadb.org/mariadb/+releases/

SMF has a couple of challenges with MariaDB, and does not officially support it.

Can you try a different DB engine?  Or at least a newer version of MariaDB? 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

davidhs

Quote from: moyack on February 21, 2021, 11:24:23 AM
Hi davidhs!!

Long time no see!! well, you know I'm not as expert than you in PHP, but my bet in the bug is your PHP version. this SMF 2.1 works best in PHP 7.2 and up!!

HUGS!!!
Hi!

Yes, also I think is the PHP version of my local server (I installed in a online server with PHP 7.3.19, downloaded this, and copied to my local server... and works). I have this in my local server in order to test my mods.

I asked this here because in theory SMF 2.1 supports PHP 5.4 minimum. :o




Quote from: Shambles on February 21, 2021, 11:36:45 AM
I'd change

if (!$pass) exit;

to

if ($pass == 0) exit;

There's something in the back of my mind about assuming a zero value will be interpreted as boolean 'false'.
This code is not the problem. I added this line for see how functions the code, but it is not code of SMF.




Quote from: shawnb61 on February 21, 2021, 02:39:49 PM
I cannot reproduce this in my Windows 10 environment using either the RC3 download from this site or the current GitHub download.

My suspicion is actually the Maria DB ver 5.0.11 - which is extremely old.  (MariaDB split from MySQL and started numbering their versions from 10.0.x back in 2012...  5.0.x isn't available on the MariaDB site for download, even on their archived "all releases" page...  https://downloads.mariadb.org/mariadb/+releases/

SMF has a couple of challenges with MariaDB, and does not officially support it.

Can you try a different DB engine?  Or at least a newer version of MariaDB? 
I will try update MariaDB...

By other hand in an online server (Debian 10, Apache 2.4.38, PHP 7.3.19, MariaDB 5.0.12) works.

Advertisement: