Questions tagged [environments]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
36 views

Using @webroot in templates returns a different path, can't override in config

I'd like to use @webroot in my templates using the {{ alias('@webroot') }} tag. However, when I do this it returns a longer path than what is returned when I use @webroot in the control panel. For ...
1
vote
1answer
54 views

Are there any benefits to using Yii's Aliases vs getenv?

As part of a refactor on our code base, we have been looking into our use of Yii 2's aliases and PHP's getenv function. Here's a code example: Alias <link rel="icon" sizes="96x96" type="image/png"...
1
vote
1answer
171 views

Upgrade C2 to C3 Uncaught TypeError involving Dotenv

I am just trying to upgrade and get the following error message: Fatal error: Uncaught TypeError: Argument 1 passed to Dotenv\Dotenv::__construct() must be an instance of Dotenv\Loader, string given ...
3
votes
2answers
801 views

Craft 3.0 - Recommended development environment for Windows?

I was wondering what people who are developing on Windows 10 are using as webserver environment in 2018? I have had ok results previously using ampps, but I'm having a lot of problems with Craft 3.0 ...
1
vote
1answer
709 views

Clarification how staging site works

We have a single installation of Craft that is live and with lots of users and lead generation going. Now the client would like to have a staging environment where we can prepare new pages, or add ...
4
votes
1answer
1k views

MAMP: Craft can’t connect to the database with the credentials in craft/config/db.php

I'm using MAMP to setup a local environment for CraftCMS on Windows 10. I have followed all necessary procedures and have my local host and my database setup but I'm still receiving the error ...
3
votes
1answer
507 views

500 Error with no details on site migration

I'm trying to migrate my site from a PHP5.6 host to a PHP 7 host in preparation for Craft 3. I've copied everything across and am trying to load an exact copy of the production site on a different ...
2
votes
1answer
602 views

How do I configure multiple environments for console commands?

I have built a plugin with some console commands for automating some regular tasks that will be run by a cron job for my site. In order to get the commands working, I had to replicate my database ...
2
votes
1answer
301 views

devMode, phpdotenv variable ignored

I'm using dotphpenv for environment specific config. This works perfectly for my db config. I added another 2 environment vars for devMode and allowAutoUpdates DEV_MODE=false AUTO_UPDATE=false and ...
1
vote
1answer
969 views

Using a virtual host result in internal error

I'm trying to setup a virtual host to access my craft project through ontherocks.dev, without any success yet. www.ontherocks.dev : correct response www.ontherocks.dev/admin : Apache 404 www....
0
votes
1answer
123 views

Multi-environment config issue

I'm trying to set up Craft and on deployment to a staging server am getting the following error message: An exception has been thrown during the rendering of a template ("Craft can't connect to ...
6
votes
5answers
3k views

Running Craft with Docker (or something similar)

Has anyone had success with setting up Craft using Docker? I've stumbled across some Dockerfiles for WordPress and other CMS's but couldn't find much in the way of Craft. I'll be exploring this a bit ...
1
vote
1answer
1k views

Craft directory 403 Access Forbidden with XAMPP

I've been using xampp for a long time and have never encountered a 403 error. I have many projects in my xampp/htdocs/ folder, none of them have ever had any problems until now. I have the craft files ...
2
votes
1answer
906 views

Is using craft.config to access siteUrl possible?

In the past I would comment out analytics code on my dev and staging sites then uncomment the code when it went live. I ran across this page in the Craft docs the other day and started thinking, can I ...
5
votes
8answers
2k views

Multi-environment database config being ignored

The 'localhost' array is not being recognized. If I add :3307 to the '*' array's server attribute, it works. Here's the contents of my db.php: return array( '*' => array( 'server' => '...
33
votes
3answers
3k views

What's the best practice for upgrading a versioned Craft site?

It's thrilling to click The Button and watch Craft update itself. I take advantage of multi-site configurations with every deploy, and my practice thus far is to... Upgrade Craft in production. ...
101
votes
8answers
13k views

What's the best practice for handling data migration and organization across development environments?

This issue becomes especially difficult when there are multiple environments, with multiple developers working on different features that affect the data structure. The holy grail is a git-style ...