I've uploaded my Laravel app to a cpanel host . The problem is that Laravel does not read the contents of the .env file and show me a "Whoops, looks like something went wrong." page ( twice In one page ) This error is displayed because the program can not receive the APP_KEY variable . can not read .env file at all . I searched a little for this problem, but the solutions did not work . I tried all these:
- 'php artisan cache:clear' command
- 'php artisan config:clear' command
- 'php artisan config:cache' command
- change permission for .env file (755)
- run all 'composer update' , 'composer install' , 'composer dump-autoload' commands
- I did not use env function anywhere
- There are no spaces in the values stored in the env file
But none of the above did not work out. However, My program runs well in local ( windows ) and there is no problem But it does not run on the server ( cpanel )
note : I realized that when I execute the 'php artisan config:cache' command on server , all cache files are made in 'bootstrap/cache' folder, except for the config.php file note2 : I uploaded several times in different ways. Once all the files in the folder in the root and the public files in the public_html folder . and once all the files in the public_html folder. Both not working
Does anyone know where the problem is?