Questions tagged [env]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

.env / config data not loading on repeated / simultaneous requests

I'm having this strange issue on php7.4 and php8.1 on windows11 (apache2.4) where my craft sites loose or fail to load the .env data on some requests and only when under load / handling requests in ...
Rick Kukiela's user avatar
3 votes
1 answer

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 ...
cringe002's user avatar
1 vote
0 answers

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 ...
Mark Olijslagers's user avatar
1 vote
1 answer

Unable to use credentials.json from .env file for Google Cloud Storage

Setup Craft CMS: 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....
cballenar's user avatar
  • 1,399
1 vote
1 answer

Siteurl - output missing "www"

How can I add "www" to the output of {{ }}? In my .env file I have DEFAULT_SITE_URL="" but {{ }}...
Jake1293's user avatar
  • 159
1 vote
1 answer

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 ...
Deepak Kale's user avatar
2 votes
1 answer

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 ...
idix's user avatar
  • 165
1 vote
1 answer

.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 ...
carbonjoetunis's user avatar