News:

Join the Facebook Fan Page.

Main Menu

Can't Finish Installation

Started by AndalayBay, November 22, 2021, 10:13:20 PM

Previous topic - Next topic

AndalayBay

I'm trying to install 2.0.18 locally and it fails at step 6 - setting up the admin account. It claims it can't connect to the database. I've tried this three times now, so I'm sure I'm putting in the right password. I'm running XAMPP, which is technically MariaDB, but haven't had any problems installing other software until now. How do I get it past this step? I stopped the install and visited the forums anyway, but it only has a guest account. I could create an account using the database, but I'm not sure what else would be messed up after an incomplete install.

Diego Andrés

The password is usually empty when installing XAMPP and user is root, did you try that?

SMF Tricks - Free & Premium Responsive Themes for SMF.

AndalayBay

I set up a password for root. I also set up multiple hosts, so root at localhost and a couple of other options work and all require a password. The password was saved to the settings.php file and it is correct. The installer set up all the tables properly, so it can connect to the database server. It just fails when it tries to create the admin account.

I also have IPS installed under XAMPP. I want to see if I can migrate my old forums.

shawnb61

First thing I'd check is that the DB user has all the necessary privileges.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

AndalayBay

It's root. All privileges. One thing I do wonder about is that the password has a reserved character. It has to be escaped in settings.php. Invision had no problem with this, but SMF seems to be having a problem, given that I can't finish. As I said, it created the tables with no issues. It's just when it wants the confirmation of the root password to create the admin account that it fails. Invision also has a plain text configuration file and the password is recorded in that file the same way that it's recorded in settings.php.

shawnb61

You could test your theory by changing the pw.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

AndalayBay

There's something seriously wrong with your installation script if it cares about what the password is! I've got other stuff installed that needs and uses the password as well.

Aleksi "Lex" Kilpinen

I would agree there would be something wrong if a password is able to break functionality. All the more reason to seek confirmation if this is indeed what is causing the issue - and if so, what character exactly.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

shawnb61

It would also help to know the basics:
- mysql version
- php version

Some of the more recent versions of mysql allow different authentication plugins.  You can see all the privileges and the plugin being used if you can execute a:
SELECT * FROM mysql.user;
The only plugin supported by SMF at the moment is mysql_native_password. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

AndalayBay

I got around the problem by registering an account for myself and then changing my group to administrator in the database. I'm only doing this to migrate from IPS.

The only users are root at various hosts, like localhost and 127.0.0.1. All are mysql_native_password.

The database is MariaDB, version 10.4.21. PHP is 7.4.25.

I suspect the misbehaving character is backslash \.

shawnb61

Glad you got past it.

The backslash is the escape character in php, so yes, you would have needed to treat that special.  It should work fine as long as you honor php's rules.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

AndalayBay

As I said, the SMF installer is the only one that has a problem with it. IPS works. So does Wordpress. They both escape the backslash in the configuration files. And the really weird thing is that the first 5 steps in the process had no problems with it either. It's just the prompt to confirm the password as you finish the installation.

I might have to install SMF over again, so having a fix for this would have been nice.

shawnb61

To be clear:  The \ was a character within the password?  Or was used to escape another character?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

AndalayBay

It was in the password. The password was 8 characters, consisting of letters, numbers and symbols. The \ was the second last character. When it was written to the config files for SMF and IPS, it was escaped, so there were two \\, but I never had a problem with the forums working once I got them installed.

I decided to see what would happen with 2.1 and the installation failed right off the bat. It didn't get as far as 2.0. I finally changed the root password. The installation worked just fine after that.

Advertisement: