Questions tagged [env]
The env tag has no usage guidance.
7
questions
1
vote
1
answer
21
views
DevMode set to true, but doesn't appear to work locally
I'm having trouble getting DevMode to work locally. I'm using nitro.
I have this set in my .env file...
ENVIRONMENT=dev
... and my general.php file looks like...
<?php
/**
* General Configuration
...
0
votes
0
answers
88
views
craft\web\Request::cookieValidationKey must be configured with a secret key
For a while our Craft CMS webshop show errors in the control panel.
This happens 25%-50% of the requests. Looking in the phperror log a lot of this errors are logged:
[13-Dec-2021 23:00:05 UTC] An ...
1
vote
1
answer
121
views
Unable to use credentials.json from .env file for Google Cloud Storage
Setup
Craft CMS: 3.5.19.1
PHP: 7.2.24
This setup is in process of being updated to the latest version. I'm thinking the issue reported here may already be solved but I can't find any information on it....
1
vote
1
answer
97
views
Siteurl - craft.app.request.absoluteUrl() output missing "www"
How can I add "www" to the output of {{ craft.app.request.absoluteUrl }}?
In my .env file I have
DEFAULT_SITE_URL="https://www.mysite.com"
but
{{ craft.app.request.absoluteUrl() }}...
1
vote
1
answer
54
views
Access env variables in custom php files
Craft Version 3.2
PHP Version 7.2
Below is my folder structure:
Root
- Other Craft Folder
- Web
- Services
- Db.php
- env file
I want to read the connection string of the SQL ...
2
votes
1
answer
347
views
Site url is not generated correctly when using environment variables
I'm working on a multi-site setup (for a localized website). In my .env file, I have defined a SITE_BASE_URL variable. Then, in the control panel, I set up each site's base url with that environment ...
1
vote
1
answer
200
views
.env parsing error on Windows server
Has anyone had issues with Craft parsing a .env on Windows Server? Dotenv is throwing an exception (FileException - invalid name) when parsing the first line of my .env, which is just a comment. I ...