0
votes

I have a local Laravel installation that works fine on Windows, but when I move the project to Linux, I get this error:

Illuminate \ Database \ QueryException (2002) SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from users where email = [email protected] and status = 1 limit 1)

Previous exceptions:

SQLSTATE[HY000] [2002] No such file or directory (2002) SQLSTATE[HY000] [2002] No such file or directory (2002)

What could be the reason?

Note: Linux system is newly set up.

1
Have you made sure that the permissions are set correctly on the storage and logs folder?Petay87
your project is not setup properly. did you run composer ,migration and generate key etc ?Niklesh Raut
@Petay87 i have give 777 permissionManish Kumar Pathak
How did you move it from Windows to Linux, by copying folder or with Git?Elisha Senoo

1 Answers

1
votes

I have clone project from github fresh and run

-- composer update -- php artisan cache:clear -- php artisan view:clear -- php artisan route:clear -- php artisan clear-compiled -- php artisan config:cache -- php artisan config:clear

-- php artisan migrate:refresh -- php artisan migrate:refresh --seed -- php artisan db:seed

-- composer dump-autoload

-- php artisan key:generate

and it work fine for me Thank all for your valuable time