stechstudio / laravel-env-security

Securely manage Laravel .env files for different deployment environments
MIT License
75 stars 9 forks source link

RuntimeException : Error creating the cipertext directory - #28

Closed prasadguptapankaj closed 1 year ago

prasadguptapankaj commented 1 year ago

When i am installing the package i am getting this error

prasadguptapankaj commented 1 year ago

My Laravel Version is 6

jszobody commented 1 year ago

Sounds like a permissions issue, it can't create the folder on disk.

This is where that takes place:

https://github.com/stechstudio/laravel-env-security/blob/dc555c3ccfac8a083d207927d316fe2d839002f2/src/EnvSecurityServiceProvider.php#L59-L73

By default it tries to create a env folder in your root project directory. You can customize this with the ENV_STORAGE_PATH variable.

All that said, I have no idea if this package will work with Laravel 6. That is seriously old. I have only used this on Laravel 8-10 apps.

prasadguptapankaj commented 1 year ago

Yes i know it is not able to create a directory but why is that happening??

jszobody commented 1 year ago

If PHP can't create a directory, you'll have to troubleshoot that yourself. It's not an issue with this package.

Likely your app doesn't have permission to write to your root project folder. You could try creating it manually, or you can troubleshoot your directory permissions and why the app can't write to it.

prasadguptapankaj commented 1 year ago

i found the problem. Actually from package configuration it is getting the relative path and the name of directory but it is not able to access any config from the package configuration due to which everything is returning null and this issue is appearing