XF 2.2 Error 500: Website not working

Sprisa

Active member
Hello! I can't access my xenforo installation after some time not checking it out. My os is Ubuntu 20.04 and webserver Nginx.
 
You will need to investigate then, starting with the server error log.
Found the error:
2022/11/17 22:22:51 [error] 548158#548158: *4394 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php:152 Stack trace: #0 /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array) #1 /var/www/valorhut/src/XF/Error.php(87): XF\Db\Mysqli\Adapter->getConnection() #2 /var/www/valorhut/src/XF/App.php(2364): XF\Error->logException(Object(Error), true, '') #3 /var/www/valorhut/src/XF.php(202): XF\App->logException(Object(Error), true) #4 [internal function]: XF::handleException(Object(Error)) #5 {main} thrown in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php on line 152PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php:152 Stack trace: #0 /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array) #1 /var/www/valorhut/src/XF/Error.php(87): XF\Db\Mysqli\Adapter->getConnection() #2 /var/www/valorhut/src/XF/App.php(2364): XF\Error->logException(Object(ErrorException), true, '') #3 /var/www/valorhut/src/XF.php(242): XF\App->logException(Object(ErrorException), true) #4 [internal function]: XF::handleFatalError() #5 {main} thrown in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php on line 152" while reading response header from upstream, client: 162.158.238.238, server: valorhut.net, request: "GET /admin HTTP/2.0", upstream: "fastcgi://unix:/var/r>2022/11/17 22:22:52 [error] 548158#548158: *4394 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php:152 Stack trace: #0 /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array) #1 /var/www/valorhut/src/XF/Error.php(87): XF\Db\Mysqli\Adapter->getConnection() #2 /var/www/valorhut/src/XF/App.php(2364): XF\Error->logException(Object(Error), true, '') #3 /var/www/valorhut/src/XF.php(202): XF\App->logException(Object(Error), true) #4 [internal function]: XF::handleException(Object(Error)) #5 {main} thrown in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php on line 152PHP message: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php:152 Stack trace: #0 /var/www/valorhut/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array) #1 /var/www/valorhut/src/XF/Error.php(87): XF\Db\Mysqli\Adapter->getConnection() #2 /var/www/valorhut/src/XF/App.php(2364): XF\Error->logException(Object(ErrorException), true, '') #3 /var/www/valorhut/src/XF.php(242): XF\App->logException(Object(ErrorException), true) #4 [internal function]: XF::handleFatalError() #5 {main}
 
Are you running a cPanel (or any panel) interface and did an upgrade to a new version of PHP recently?
I have seen similar happen when the appropriate PHP PECL's were not bundled into the upgrade of the PHP processor.
Did you set up the Ubuntu instance yourself and then "roll your own" with nginx/php-fpm?
Depending on answers provided, I might be able to help with this as I have time (at no cost).
It's been a while since I've used Ubuntu (I do have 2 instances running at a local medical clinic in VM's, one for TimeTrex and another for NexCloud) as I normally use CentOS (and CentMin Mod) but have moved over to AlmaLinux and the BETA of CentMin on my current sites.
 
@Sprisa You learned something important today! And don't forget your files on the server (especially /data and /internal_data)... I hope you can recover your database and that this time it's nothing serious.
It is something serious, i wrote some big articles and guides on my forum and that got us some users, and now thats lost :(
 
Top Bottom