I am running into a
VERY SIMILAR (same?) issue. I spent the last day debugging the hell out of this, and am starting to think it is a
PERMISSIONS issue.
Issue: NEW Ci4 Application works perfectly on local drive, but NOT on mapped NAS drive.
Environment:- Windows 10
- PHP 7.4.20
- Local Drive: C:\Users\Sergio\www\
- NAS Drive: D:\www\
Steps to reproduce:
Local Drive
- CMD as Administrator - C:\Users\Sergio\www\
- composer create-project codeigniter4/appstarter project
- cd project
- php spark serve
- http://localhost:8080
- So far, so good
- copy env .env
- Still WORKS
NAS Drive
- CMD as Administrator - D:\www\
- composer create-project codeigniter4/appstarter project
- cd project
- php spark serve
- http://localhost:8080
- So far, so good
- copy env .env
- PHP FATAL ERROR
Code:
PHP Fatal error: Uncaught InvalidArgumentException: The .env file is not readable: D:\www\project\.env in D:\www\project\vendor\codeigniter4\framework\system\Config\DotEnv.php:60
Stack trace:
#0 D:\www\project\vendor\codeigniter4\framework\system\Config\DotEnv.php(43): CodeIgniter\Config\DotEnv->parse()
#1 D:\www\project\vendor\codeigniter4\framework\system\bootstrap.php(130): CodeIgniter\Config\DotEnv->load()
#2 D:\www\project\spark(45): require('D:\\www\\project\\...')
#3 {main}
thrown in D:\www\project\vendor\codeigniter4\framework\system\Config\DotEnv.php on line 60
Any thoughts and suggestions would be greatly appreciated.
Thanks!