XF 2.3 Local install help please

Anatoliy

Well-known member
Hi,
I decided to build an add-on so I'm trying to install XF locally. I already had dev environment set up on my old computer but now it gone and I have a new one.
I installed XAMPP (as I used to work with it). Apache server starts fine. I created virtual host xf.localhost, uploaded xf files, edited src/config.php.

I already have installed MySQL (with homebrew) so I didn't turn on MySQL in XAMP.

I run
Code:
php cmd.php xf:install
, answered several questions and done. I can see with TablePLus that xf tables are created. However in a browser I get:
Code:
An exception occurred: [XF\Db\Exception] No such file or directory in src/XF/Db/Mysqli/Adapter.php on line 172

XF\Db\Mysqli\Adapter->makeConnection() in src/XF/Db/Mysqli/Adapter.php at line 31
XF\Db\Mysqli\Adapter->getConnection() in src/XF/Db/AbstractAdapter.php at line 62
XF\Db\AbstractAdapter->connect() in src/XF/Db/Mysqli/Adapter.php at line 116
XF\Db\Mysqli\Adapter->escapeString() in src/XF/Db/AbstractAdapter.php at line 518
XF\Db\AbstractAdapter->quote() in src/XF/Db/AbstractAdapter.php at line 496
XF\Db\AbstractAdapter->quote() in src/XF/DataRegistry.php at line 172
XF\DataRegistry->readFromDb() in src/XF/DataRegistry.php at line 102
XF\DataRegistry->get() in src/XF/DataRegistry.php at line 271
XF\DataRegistry->offsetGet() in src/XF/App.php at line 2165
XF\App->XF\{closure}() in src/XF/Container.php at line 33
XF\Container->offsetGet() in src/XF/App.php at line 2786
XF\App->setupAddOnComposerAutoload() in src/XF/App.php at line 2263
XF\App->setup() in src/XF/Pub/App.php at line 116
XF\Pub\App->setup() in src/XF.php at line 775
XF::setupApp() in src/XF.php at line 798
XF::runApp() in index.php at line 23

What went wrong and how to fix that? Please help.
 
Last edited:
This usually happens when you've configured the database host as localhost, which tries to connect via a socket, but PHP is configured with the wrong socket path. You might want to check the socket path, or use 127.0.0.1 instead.
 
This usually happens when you've configured the database host as localhost, which tries to connect via a socket, but PHP is configured with the wrong socket path. You might want to check the socket path, or use 127.0.0.1 instead.
thanks for quick reply!
and thank you for solution!!!

changed localhost to 127.0.0.1 and can see forum in a browser. thank you!
 
Back
Top Bottom