Closed turnstylerj closed 1 year ago
Hi
the linked issue is definitely in the right direction. The issue is not related to Craft Copy at all, but to outdated dependencies of your Craft site.
To fix the problem you need to change the version of the dotenv lib in your composer.json
"vlucas/phpdotenv": "^5.4.0"
and update the web/index.php AND the craft file https://github.com/craftcms/craft/blob/1.1.7/craft
Issue
On an existing Fortrabbit site running in a local environment (ddev), craft-copy commands such as
ddev exec php craft copy/db/down
work, but I'm seeing the following error from a craft-copy dependency on the command line after runningcomposer install
and on the front end/CP of the website:This error is not shown on the Fortrabbit version of the site, though the same PHP/plugin versions are used in both environments. Out of curiosity, I also tried spinning the site up in MAMP and was getting the same error.
Details
The current server setup/versions in both environments are as follows:
PHP | 8.1 Database | MySQL 8.0 Craft CMS | 3.7.67 Copy | 1.2.4
vlucas/phpdotenv
|^2.4.0
I can resolve this error locally by doing the following:
vlucas/phpdotenv
to^3.4.0
web/index.php
syntax to the version mentioned in this similar issue.With those changes, I can load the site front end and CP with no issues locally, but
ddev exec php craft copy/db/down
now fails with:I'm unsure how to proceed here. Is there a way to resolve the original error without updating the PHP/
vlucas/phpdotenv
versions?