XF 2.0 Forum Down! Adapter.php at line 121

AudiTT

Member
Hi, i was using xf 2.0.1 and my forum went down with this message:
XF\Db\Exception: No such file or directory in src/XF/Db/Mysqli/Adapter.php at line 121

whats the problem?
 
This is happening when XF is trying to connect to your MySQL server.

If there have been no changes to the MySQL server or your config file to cause this, then we'd recommend that you contact your host for assistance.
 
There's not really much more we can suggest. The issue is with the MySQL server not being able to connect. The "No such file or directory" error usually suggests the server is offline or that the mysql.sock file is missing. Sometimes you can get around that by using the server IP (likely 127.0.0.1 if it's on the same server) rather than its hostname (likely currently localhost, again, if it's on the same server). But, really, you'd need to troubleshoot what went wrong in the first place to ensure it doesn't happen again.
 
OK, websites are back, a wordpress website is running just fine

but when i try to upgrade the forum i get error in the upgrade page
XF\Db\Exception: Connection refused in src/XF/Db/Mysqli/Adapter.php at line 160
  1. XF\Db\Mysqli\Adapter->makeConnection() in src/XF/Db/Mysqli/Adapter.php at line 28
  2. XF\Db\Mysqli\Adapter->getConnection() in src/XF/Db/AbstractAdapter.php at line 51
  3. XF\Db\AbstractAdapter->connect() in src/XF/Db/AbstractAdapter.php at line 73
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 91
  5. XF\Db\AbstractAdapter->fetchOne() in src/XF/Session/DbStorage.php at line 30
  6. XF\Session\DbStorage->getSession() in src/XF/Session/Session.php at line 53
  7. XF\Session\Session->start() in src/XF/App.php at line 676
  8. XF\App->XF\{closure}() in src/XF/Container.php at line 28
  9. XF\Container->offsetGet() in src/XF/Install/App.php at line 38
  10. XF\Install\App->XF\Install\{closure}() in src/XF/Container.php at line 28
  11. XF\Container->offsetGet() in src/XF/App.php at line 2208
  12. XF\App->session() in src/XF/Install/App.php at line 173
  13. XF\Install\App->setupUpgradeSession() in src/XF/Install/Controller/Upgrade.php at line 20
  14. XF\Install\Controller\Upgrade->preDispatchController() in src/XF/Install/Controller/AbstractController.php at line 11
  15. XF\Install\Controller\AbstractController->preDispatchType() in src/XF/Mvc/Controller.php at line 117
  16. XF\Mvc\Controller->preDispatch() in src/XF/Mvc/Dispatcher.php at line 248
  17. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
  18. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  19. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1889
  20. XF\App->run() in src/XF.php at line 328
  21. XF::runApp() in install/index.php at line 14
 
Your MySQL server is refusing the connection that XF is trying to make.

We’re not in a position to be able to provide advice as to why that is as the issue can only exist between XF and MySQL and there’s nothing we can do to impact that if MySQL is rejecting the connection.
 
OK, websites are back, a wordpress website is running just fine

but when i try to upgrade the forum i get error in the upgrade page
XF\Db\Exception: Connection refused in src/XF/Db/Mysqli/Adapter.php at line 160
  1. XF\Db\Mysqli\Adapter->makeConnection() in src/XF/Db/Mysqli/Adapter.php at line 28
  2. XF\Db\Mysqli\Adapter->getConnection() in src/XF/Db/AbstractAdapter.php at line 51
  3. XF\Db\AbstractAdapter->connect() in src/XF/Db/AbstractAdapter.php at line 73
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 91
  5. XF\Db\AbstractAdapter->fetchOne() in src/XF/Session/DbStorage.php at line 30
  6. XF\Session\DbStorage->getSession() in src/XF/Session/Session.php at line 53
  7. XF\Session\Session->start() in src/XF/App.php at line 676
  8. XF\App->XF\{closure}() in src/XF/Container.php at line 28
  9. XF\Container->offsetGet() in src/XF/Install/App.php at line 38
  10. XF\Install\App->XF\Install\{closure}() in src/XF/Container.php at line 28
  11. XF\Container->offsetGet() in src/XF/App.php at line 2208
  12. XF\App->session() in src/XF/Install/App.php at line 173
  13. XF\Install\App->setupUpgradeSession() in src/XF/Install/Controller/Upgrade.php at line 20
  14. XF\Install\Controller\Upgrade->preDispatchController() in src/XF/Install/Controller/AbstractController.php at line 11
  15. XF\Install\Controller\AbstractController->preDispatchType() in src/XF/Mvc/Controller.php at line 117
  16. XF\Mvc\Controller->preDispatch() in src/XF/Mvc/Dispatcher.php at line 248
  17. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
  18. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  19. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1889
  20. XF\App->run() in src/XF.php at line 328
  21. XF::runApp() in install/index.php at line 14
I've found that this occurs when you accidentally forget a ' or " or < or > or something small in a php file somewhere.
 
Back
Top Bottom