-2

On the command line, i'm getting a:

[PDOException] SQLSTATE[HY000] [2002] No such file or directory

after accidentally deleting composer.lock file. This happens after composer updates or when I run php artisan commands.

The site still works fine and it is reading data from the database. Tried deleting vendor folder and composer.lock file then running composer install/update, composer dumpautoload, restarted homestead and everything else I can think of, but still can't get rid of this error.

Thanks.

EDIT. Note, If I ssh into my Homestead vagrant box, the PHP artisan command works without errors.

Rob
  • 190
  • 2
  • 3
  • 11

1 Answers1

0

Short answer: Change "host" in the /app/config/database.php file from "localhost" to "127.0.0.1"

Related to:

PDOException SQLSTATE[HY000] [2002] No such file or directory

Community
  • 1
  • 1
Yada
  • 30,349
  • 24
  • 103
  • 144
  • Thanks for your response, but that doesn't work. Like I said, the application is running fine and making calls to the db with no problem. I haven't changed my db config and it was working earlier. It's only when i run php artisan on the command line, or after composer runs, that i get the error. – Rob May 04 '15 at 09:10