XF 2.2 DB Errors on Fresh Install

yor14

Member
Hi there, I've been running xenforo forums for a while now and I have never encountered any errors before, especially during installation. A few hours ago I began a fresh installation - - I verified all the prerequisites were met using the downloadable tool, and also had a MariaDB user and xf database created prior to beginning the installation. Once I got the files uploaded, I navigated to /install and was met with this lovely wall of text: xf.webp

I have spent the last several hours looking for the solution throughout numerous threads both on xf community threads and the internet as a whole, and have gotten nowhere. I've attempted numerous clean installations, dropped the database, recreated the user, etc nothing has fixed it. I will mention that I am running php8.1, which I have read is not officially supported despite numerous users seemingly to suggest it works quite well. For the sake of being thorough, I completely removed php8.1 and installed php8.0, all this did was break Pterodactyl (which prefers 8.1) and instead of receiving an error message at the xf install page, I received a completely blank white page.

I have truly exhausted every idea and solution I could come up with and that has been suggested to others encountering this problem. So please, I am all ears.
 
Solution
I see. Looking closer at the stack trace, this appears to be because MySQLi error reporting is enabled. It was disabled by default in PHP <8.1, but this changed in PHP 8.1+ and was fixed in XF 2.2.8. What version are you trying to install?
Php 8.1 is not a problem.

Somehow that table is not created. Did you use the official installation files?
Also check which tables are created (phpmyadmin is easy to use) to see if that's the only table missing.
 
Php 8.1 is not a problem.

Somehow that table is not created. Did you use the official installation files?
Also check which tables are created (phpmyadmin is easy to use) to see if that's the only table missing.
Yep. Uploaded the official download directly to the server and then was immediately met with this. I would love to use phpmyadmin to look into the issue, however the guys at Pterodactyl have discouraged installing them both as they occasionally lead to issues - - I'll go ahead and give it a try, though.

UPDATE:
Just setup phpmyadmin and verified, there are no tables within the xf database + both database privileges and file ownership settings are correct.

Any other ideas?
 
Last edited:
Make sure internal_data/install-lock.php does not exist. This should not be the case for fresh installations unless the installation package was uploaded/unpacked into a non-empty directory.
 
Check that your DB user has the correct permissions. That's the only thing I can think of. If you are 100% sure they are correct, contact your host.
What DB user does xenforo use automatically to generate these tables? I was never even able to input any database or login information as these errors populated the second I uploaded xenforo and opened /install. I've never had issues in the past with setting up xenforo, the only thing I did differently with this installation than past ones would be using the mysql_secure_installation for added security, though with how common it is, I doubt this should be affecting it.

As for contacting my host, I seriously doubt it should have anything to do with them. This is a bare metal server and I've used dedis from this company for the last 3 years.

Make sure internal_data/install-lock.php does not exist. This should not be the case for fresh installations unless the installation package was uploaded/unpacked into a non-empty directory.
This was one of the common suggestions mentioned numerous times on other thread's about this error, unfortunately this isn't the issue.


UPDATE:
Let me also mention that since I am running Pterodactyl, there shouldn't be any permissions issues, as Pterodactyl is actively accessing and writing to MariaDB without error.
 
Last edited:
What DB user does xenforo use automatically to generate these tables? I was never even able to input any database or login information
Part of the installation is providing DB information. If you don't get to this part your initial installation is not done right. Sure you're not having an /src/config.php file (so not a default clean install)?
 
Are you being redirected to /install/index.php?upgrade or /install/index.php?install?

It might also be worth checking if src/config.php exists. It's possible the internal data mount is configured for a different filesystem adapter (S3, etc.) and the lock file exists there.
 
Part of the installation is providing DB information. If you don't get to this part your initial installation is not done right. Sure you're not having an /src/config.php file (so not a default clean install)?
On the clean install, ie with an unmodified config.php.default , the following error displays
[mysqli_sql_exception] Access denied for user ''@'localhost' (using password: NO) in src/XF/Db/Mysqli/Adapter.php on line 161

While sifting through numerous other people who have reported this error on these forums, the popular solution suggested by a few xF developers was to put the login credentials into config.php.default and rename it before accessing the actual config.php step in the installation process. Doing this is how I was able to gain access, though this is when the error I reported (no table generation) occurred.
Are you being redirected to /install/index.php?upgrade or /install/index.php?install?

It might also be worth checking if src/config.php exists. It's possible the internal data mount is configured for a different filesystem adapter (S3, etc.) and the lock file exists there.
I am going to /install , the URL is not updating to /install/index.php?install, just /install.

---
While I was typing my response I wiped xF once more and was reuploading to see if fresh install might magically work, and I am once again back to
An exception occurred: [mysqli_sql_exception] Access denied for user ''@'localhost' (using password: NO) in src/XF/Db/Mysqli/Adapter.php on line 161
 
I see. Looking closer at the stack trace, this appears to be because MySQLi error reporting is enabled. It was disabled by default in PHP <8.1, but this changed in PHP 8.1+ and was fixed in XF 2.2.8. What version are you trying to install?
 
Solution
I see. Looking closer at the stack trace, this appears to be because MySQLi error reporting is enabled. It was disabled by default in PHP <8.1, but this changed in PHP 8.1+ and was fixed in XF 2.2.8. What version are you trying to install?
You won't believe it, but my xF updates expired with version 2.2.7 Patch 1...
 
That's frusting, but unfortunately that version is likely only compatible with PHP 8.0 at best (though I did read that you tried that and it caused a different issue, and was incompatible with your other software). In any case, it certainly won't work well on PHP 8.1+.
 
That's frusting, but unfortunately that version is likely only compatible with PHP 8.0 at best (though I did read that you tried that and it caused a different issue, and was incompatible with your other software). In any case, it certainly won't work well on PHP 8.1+.
Yeah, unfortunately Pterodactyl all but requires PHP 8.1+, but yes even when I intentionally broke Ptero by switching to PHP 8.0 the install page returned a blank white screen.
 
Sometimes when that happens you can find a more detailed error message by viewing the source, or if that fails it should log something in your server error log.
 
Sometimes when that happens you can find a more detailed error message by viewing the source, or if that fails it should log something in your server error log.
Yeah, I suppose I might just have to extend my xF license. I would prefer to not break Ptero as the issues that will cause are going to be a lot more difficult to fix than anything xF causes, especially as Ptero explicitly doesn't support PHP 8, their stance is that it might work.

Anywho, appreciate both of y'alls help!
 
I see. Looking closer at the stack trace, this appears to be because MySQLi error reporting is enabled. It was disabled by default in PHP <8.1, but this changed in PHP 8.1+ and was fixed in XF 2.2.8. What version are you trying to install?
I'm doing a clean install on my VPS, I came across the same error, ubuntu 20.04 php7.4/ 22.04 - PHP8.1 - my old XF2.2 doesn't work, now I have to buy a new XF.

Screenshot_39.webp
 
Older versions of XF have compatibility issues with newer versions of PHP. If you can't upgrade to a newer version of XF, you will have to downgrade to a previous version of PHP.
 
Back
Top Bottom