PHP

All posts tagged PHP

Going through and updating systems to newer versions of PHP8.1 and mariadb on a newly installed FreeBSD 13.1 system. When attempting to connect to the default “localhost”, I was being greeted with:

mysqli_real_connect(): (HY000/2002): No such file or directory

Any php database connection attempts to localhost were failing, which is the default for a variety of code out there, including phpMyAdmin and WordPress. Changing the connection host to “127.0.0.1” instead of “localhost” allowed it to connect, but I didn’t find this to be an acceptable solution as it should work for both. After doing some searching, I found the following solution to be the best option:

Continue Reading