Questions tagged [env]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
25 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
1answer
74 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
1answer
38 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
1answer
233 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
1answer
115 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 ...