Published

Dev environment issue related to MySQL and missing OpenSSL v1.0.0 symlink

I woke up early this morning to get some work done before a call and suddenly my local dev environment stopped working without warning and with seemingly no reason. The root issue was that MySQL wouldn’t work, /usr/local/opt/openssl/lib/libssl.1.0.0.dylib was not loading.

TL;DR: This may have been related to some automatic cleanup on Homebrew’s part. But regardless, a simple restart sorted it. If this happens again and restarting doesn’t sort it, try uninstalling and reinstalling MySQL.

The rest of the detail is below for posterity if I run in to this in the future.

Read more

Published

Sorting out WordPress error “Updating failed. Error message: The response is not a valid JSON response”

I moved a brand new WordPress site on to new hosting recently and was confronted by an “Updating failed. Error message: The response is not a valid JSON response” error. Seemed kind of inexplicable, not a lot of info in the console either. I’ve done the same thing a bajillion times with this and other hosting providers and have never run in to this error, so it seems kind of weird.

This issue on GitHub outlines a lot of the potential causes, but this comment specifically sorted out my problem. Turns out you just need to flush the permalinks? Another off-then-on-again type of fix.

I think the WordPress devs might eventually create a more helpful error message for this, but in the meantime this is worth keeping in mind.

Published

Resolving Craft 3 Setup Wizard error

I keep encountering issues when running Craft’s setup command locally. Note that I use MAMP Pro for this sort of thing. I entered all the database creds correctly, and then got a SQLSTATE[HY000] [2002] No such file or directory error. This StackExchange answer sorted it for me. Add 'unixSocket' => getenv('DB_SOCKET') to /config/db.php and DB_SOCKET="/Applications/MAMP/tmp/mysql/mysql.sock" to .env.

Still encountering database connection issues on staging for one site currently under development. All of the credentials are set correctly in .env, but getenv() in /config/db.php retrieves the wrong DB_USER value. Ended up explicitly adding the problematic value to the /config/db.php file as a quick workaround, but it’s not ideal.