guzart
Forum Replies Created
-
Forum: Plugins
In reply to: [Cloudflare] GuzzleHttp Conflict (Php scoping?)Forum: Plugins
In reply to: [Cloudflare] Fatal caused by upgrade to 4.7.0Same here. I use GuzzleHttp for customization in my theme. I noticed other plugins use something like https://github.com/humbug/php-scoper when using 3rd party dependencies. For example: https://github.com/deliciousbrains/wp-offload-ses-lite/blob/master/vendor/Aws3/GuzzleHttp/Utils.php#L3-L7
Thank you!
Forum: Plugins
In reply to: [W3 Total Cache] Redis configuration from EnvironmentSome feedback after implementing it.
It does work but it’s slow because I have to run four WP CLI commands, and the WP CLI has to load all of WordPress each time a command is run, that is, WP is loaded and discarded four times.
I think in the next iteration I’ll create my own WP CLI command that calls
w3-total-cache
CLI functions. So that all four actions can run in a single command, and this way I can also use PHP to parse out the environment variable, instead of having to parse the Redis URL using bash and pass them as WP CLI arguments.Forum: Plugins
In reply to: [W3 Total Cache] Redis configuration from EnvironmentUnfortunately I don’t think modifying
w3tc-config/master.php
directly will work for this scenario, because AFAIU the plugin automatically prefixes the file with<?php exit; ?>
so that it’s not executable by PHP. This behavior prevents me from setting runtime configuration inside that file. Any configuration in the file needs to be static.I think using the CLI is my best path moving forward. I should be able to run a script when the app initializes. And have the script use WP CLI to configure W3TC based on environment variables.
Thank you for the suggestions, Marko.
Forum: Plugins
In reply to: [W3 Total Cache] Redis configuration from EnvironmentYes. Heroku gives me the Redis server connection URL in the form of a
getenv('REDIS_URL')
. So I don’t have a permanent Redis Server Address and Password. They expect my application to adjust the Redis configuration at Runtime.This was super easy to do for the configuration database because it’s possible to configure the Database connection at runtime using the
W3TC_CONFIG_CACHE_*
constants.$redisURL = parse_url(getenv('REDIS_URL')); define('W3TC_CONFIG_CACHE_ENGINE', 'redis'); define('W3TC_CONFIG_CACHE_REDIS_SERVERS', $redisURL['host'] . ':' . $redisURL['port']); define('W3TC_CONFIG_CACHE_REDIS_PASSWORD', $redisURL['pass']); define('W3TC_CONFIG_CACHE_REDIS_PERSISTENT', true); define('W3TC_CONFIG_CACHE_REDIS_DBID', 0);
Any suggestions on how to configure database connection for the Page Cache, Object Cache, and Database Cache either at runtime or dynamically?
Forum: Plugins
In reply to: [EWWW Image Optimizer] Debug log turned onNo bug there. When the debug setting is disabled it does not create a
debug.log
file.I don’t think I have an issue. It’s only that I found the new location of the
debug.log
file odd, so I assumed it could’ve been a mistake in the release, not a design choice. AFAIK it’s unusual for plugins to store files directly under thewp-content/
folder, but not unheard of.Anyway, thank you for your help!
Forum: Plugins
In reply to: [EWWW Image Optimizer] Debug log turned onThank you for the quick reply.
Something must have changed tho. I have the WordPress site in git and the file didn’t exist before and I did not make changes to the settings.
I do have an EWWW debug.log in my .gitignore, and the location was
/wp-content/plugins/ewww-image-optimizer/debug.log
and the new location is at/wp-content/ewww/debug.log
.Tested in PHP versions 7.1.1 and 7.1.13.
Like @chillifish, it does not happen without the “_embed” query parameter.Thanks for looking into this @wfalaa