After playing with this a little further it seems the unixSocket setting is necessary to get this working so I added:
'unixSocket' => getenv('DB_SOCKET')
To config/db.php and then added:
To my .env file. After that, the installation will go through using the CLI. Perhaps there's still an option that ...
Have you tried running ./craft setup to double check if your setup is correct?
If ./craft setup completes successfully ./craft should find the existing installation and complete any required setup.
In my experience, this is usually related to a non-default /config/db.php or problematic .env file.
Note: Always do a backup before trying anything related ...
You can get this error message even if Craft installation is OK. If you work in MAMP environment and have this error message, check if your PHP and MySQL are available from command line (Terminal).
To check PHP, do following:
Open terminal and type: $ which php
If you see something like "/usr/bin/php" that means MAMP's PHP is not available from command ...
This just launches PHP's built in web server, documentation for it can be found here: https://www.php.net/manual/en/features.commandline.webserver.php
You can use php -s localhost:8000 instead
You can see available settings by running php -s
Yes you can run multiple versions on different ports
Hope this helps!
Craft-Scripts will do this for you: https://github.com/nystudio107/craft-scripts#clear_cachessh
You can see what it does via the source: https://github.com/nystudio107/craft-scripts/blob/master/scripts/clear_caches.sh
As for cache/clear this clear's Yii2's cache... which Craft CMS uses for almost nothing. Template Caches are always in the db, compiled ...
Alternatively, you could write your own yiic shell wrapper for each environment that defined CRAFT_ENVIRONMENT.
Something like yiicstaging:
For anyone from the future, this worked for me utilizing Ubuntu 16.0.4 with PHP7.2:
Try this command:
sudo phpenmod pdo_mysql
If it says it cant find the package, install this:
sudo apt-get install php7.2-mysql
Check your active php.ini file for this line(my active .ini was located n /etc/php/7.2/apache2/php.ini):
If it has a ...
queue/run - should be used if you're going to manually execute this command via a cron job or such, because it runs any pending queue jobs, then exits
queue/listen - should be used if you want it to constantly poll (with a reasonable cooldown interval) for new jobs, and run them, because it runs a listen process that spawns a sub-process to run queue jobs as ...
Thank you @Brandon Kelly for the solution:
That’s because @webroot is only reliable on web requests. To fix,
update your resourceBasePath config setting to a real path:
'resourceBasePath' => dirname(__DIR__) . '/web/cpresources'
How does craft know which migrations have been applied and which are new? I.e. Is it by comparing the craft_migrations table to the migration files found in '/vendor/craftcms/cms/src/migrations' folder (or plugin folders)?
Where does the information from running 'php craft migrate/new' and 'php craft migrate/history' come from?
Yes, looks like you'll need to look at the folder yiisoft and subfolders for permissions. Maybe set them to read, write until you're done and then change them to read only.
Just thinking off the top of my head about what the issue could be.
This is something I completely overlooked, but the Craft CLI is just a PHP wrapper that's executable on the CLI. So this will work:
/usr/bin/php73 craft help
/usr/bin/php73 craft update all
Will run the CLI with the PHP binary of your choice.
Explanation for answer
Since the craftcms supplied CLI file aka ./craft uses the following to identify it's location:
// Set path constants
// the above finds out the file path where the ./craft file is stored in
There's no need for any cd commands in your crontab, so all you have to do, is make sure that you either have ...
This is all very specific to the box you're using, and how it's configured. I realize Scotch Box is a historically popular setup; you might also consider Homestead as it is geared specifically for PHP development.
Anyway, according to the Scotch Box docs the setup should be:
Database Host: localhost
Database User: root
Database Password: root
Which I ...