XF 2.2 I don't seem to be getting any help on my installation issue...

Jwrbloom

Active member
Clean install isn't accessing the install module (or whatever it's called). I just get the following errors:

An exception occurred: [mysqli_sql_exception] Access denied for user ''@'localhost' (using password: NO) in src/XF/Db/Mysqli/Adapter.php on line 159

  1. mysqli->real_connect() in src/XF/Db/Mysqli/Adapter.php at line 159
  2. XF\Db\Mysqli\Adapter->makeConnection() in src/XF/Db/Mysqli/Adapter.php at line 28
  3. XF\Db\Mysqli\Adapter->getConnection() in src/XF/Db/AbstractAdapter.php at line 60
  4. XF\Db\AbstractAdapter->connect() in src/XF/Db/Mysqli/Adapter.php at line 113
  5. XF\Db\Mysqli\Adapter->escapeString() in src/XF/Db/AbstractAdapter.php at line 516
  6. XF\Db\AbstractAdapter->quote() in src/XF/Db/AbstractAdapter.php at line 494
  7. XF\Db\AbstractAdapter->quote() in src/XF/DataRegistry.php at line 138
  8. XF\DataRegistry->readFromDb() in src/XF/DataRegistry.php at line 83
  9. XF\DataRegistry->get() in src/XF/DataRegistry.php at line 226
  10. XF\DataRegistry->offsetGet() in src/XF/Install/App.php at line 74
  11. XF\Install\App->XF\Install\{closure}() in src/XF/Container.php at line 28
  12. XF\Container->offsetGet() in src/XF/App.php at line 2280
  13. XF\App->setupAddOnComposerAutoload() in src/XF/Install/App.php at line 160
  14. XF\Install\App->setup() in src/XF.php at line 437
  15. XF::setupApp() in src/XF.php at line 460
  16. XF::runApp() in install/index.php at line 14


Host says it's not their issue. I've been with them for 16 years, give or take, and I have a Xenforo install on another site. IIRC, I type in the URL/forum/install, and it opens up prompts to fill in database credentials.

Now, I can go in populate the config.php file, but all that does is reduce the errors by one line.
 
I'm a bit baffled.
By design, it should fire off the install script by default when there's no existing install present.

Because it's a Sunday afternoon, I have nothing better to do...

I can confirm that this error appears with XF 2.2.0 and PHP 8.3 series.
1740896797447.webp
 
HostGator asked "You've had a Xenforo running since 2016?"

Yes.

Should I just switch hosts?

I write a lot of code -- PHP, MySQL queries and CSS. I know NADA about the server side of things.
 
This was on a list from my host:

View attachment 319651

The red X is for Shared space (which is what I have).
Ok, so caching won't be an issue I guess.

Should I just switch hosts?
That's up to you, they wouldn't be my first choice. Well, in that case, any shared hosting because of the limitations imposed.
I'm really not familiar with their shared hosting configuration... there could be some other limitation we don't see or understand.
But if even PHP 7.4 doesn't work to fix this install issue, then I'd be looking elsewhere.

I'm testing other PHP versions, will follow-up here again once done.
 
I was able to use XF2.2.0 with PHP 8.0.30 and below. So, if your effective PHP version is below 8.0.30, it should work.
If it doesn't, there's something wrong at the server level.
 
I guess I don't understand why suddenly it doesn't work.

I migrated from one hosting space to another on HostGator, and suddenly Xenforo doesn't work.

How can I check to see which version I was using on my old space? I'm not 100% sure I had 2.2 installed.
 
How can I check to see which version I was using on my old space? I'm not 100% sure I had 2.2 installed.
To check XF version, go to your XF ACP and scroll down to the bottom right, it will have a version number there.
I'd also check to see what PHP version you have on that same page.

The last thing that I can think of is that the effective PHP version on the site may be different than what you are actually configuring.

If you can create a basic PHP file on your server (i.e. php_info.php) and put this in the file:

Code:
<?php

phpinfo( );

?>
It will show the effective PHP version operating in that area where you're trying to use XF.
 
I'm flaming out for the night. It's 2AM where I am.

I appreciate your time.

I am curious about what I found on another topic from someone who had the same issues I'm having...



Screenshot 2025-03-02 at 1.23.59 AM.webp
 
Was that the final solution?

If so, what host are you using and what type of server space?

I've been using Xenforo since 2016 on a HostGator shared hosting space, and now suddenly, I can't use Xenforo on a HostGator shared hosting space. It's a different space, but it's the same 'product' I was using before.
 
OK...so now I update the config.php file, and like I said above, all it does is get rid of one line of errors.
You should not create or edit the config.php file before or during a fresh installation. With a fresh install, you want no config.php at all.

The installer is supposed to take my credentials then populate the database with its tables.

It's not doing that.

Its because because it has a config.php file. To run the installer, there should be no config.php file and you also need to make sure there is no install-lock.php file in the internal_data directory.

APCu has nothing to do with this.
Opache almost never has anything to do with this, except the remote possibility the 10-opcache.ini configuration file has file timestamp checking turned off.

What do you mean by a "different space?" If you mean a different server, and you're using database credentials from the old server, that's going to be a problem if that user, password, database name and permissions combination has not been recreated on the new server.
 
You should not create or edit the config.php file before or during a fresh installation. With a fresh install, you want no config.php at all.

Its because because it has a config.php file. To run the installer, there should be no config.php file and you also need to make sure there is no install-lock.php file in the internal_data directory.

There isn't a config.php as we've worked through this. There is no install-lock.php file. I get you're trying to help, but we've moved well past that.

Different space? I have tried installing Xenforo on, as of this afternoon, two server spaces from two separate companies. It won't install.
 
We have progress. The new hosting space, the installer worked on PHP 7.4. Keep in mind, I'm using 2.2.

I guess when I get around to upgrading to 2.3, I'll move PHP to 8.3.

@ENF especially, I appreciate your input. The others...thank you for your help.
 
Back
Top Bottom