I’m currently using the WebP Converter plugin and have encountered an issue with proxy configurations. My WordPress setup uses proxy settings defined in the wp-config.php
file, like this:
if (!empty($_SERVER['http_proxy'])) {
@list($proxy_host, $proxy_port) = explode(':', $_SERVER['http_proxy']);
define('WP_PROXY_HOST', $proxy_host);
define('WP_PROXY_PORT', $proxy_port ?? 3128);
}
These settings work seamlessly for WordPress’s HTTP API calls via wp_remote_get()
and similar functions. However, the plugin’s PassthruExecutionDetector
class uses raw cURL requests (e.g., in the if_passthru_execution_allowed()
method), which bypass these proxy settings.
Issue:
The plugin does not use the proxy settings for its cURL requests, resulting in blocked outbound connections in environments that require a proxy.
Proposed Solution:
Please consider updating the if_passthru_execution_allowed()
method (or similar parts of the plugin) to include support for proxy settings. For instance:
if (defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT')) {
curl_setopt($ch, CURLOPT_PROXY, WP_PROXY_HOST);
curl_setopt($ch, CURLOPT_PROXYPORT, WP_PROXY_PORT);
if (defined('WP_PROXY_USERNAME') && defined('WP_PROXY_PASSWORD')) {
curl_setopt($ch, CURLOPT_PROXYUSERPWD, WP_PROXY_USERNAME . ':' . WP_PROXY_PASSWORD);
}
}
Request:
Thanks in advance for your help! Let me know if you need more information about my setup.
]]>update_user_meta()
when the form processes, but my checkboxes aren’t updating. update_user_meta()
:
public function zto_membergroup_members()
{
$zto_helpers = new Zto_Helpers();
if (isset($_REQUEST['updated'])) {
$membergroups_from_db = get_user_meta($user_id, 'zto_membergroup');
$membergroups = \wp_parse_args($membergroups_from_db, $zto_helpers->zto_membergroup_defaults());
$membergroups['zto_membergroup_one'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_one']);
$membergroups['zto_membergroup_two'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_two']);
$membergroups['zto_membergroup_three'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_three']);
$membergroups['zto_membergroup_four'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_four']);
$membergroups['zto_membergroup_five'] = sanitize_text_field($_REQUEST['zto_membergroup']['zto_membergroup_five']);
} else {
$membergroups = $zto_helpers->zto_membergroup_defaults();
}
update_user_meta($user_id, 'zto_membergroup', $membergroups);
}
The HTML for the form for the User Profile fields:
<th><label for="mobile_number">Mobile Number:</label></th>
<td><input type="text" name="mobile_number" id="mobile_number" placeholder="9876543210" value="<?php echo $mobile_number ? $mobile_number : ''; ?>" class="regular-text"></td>
</tr>
<?php
$user_membership = get_user_meta($user_id, 'zto_membergroup');
$user_membership = wp_parse_args($user_membership, $zto_helpers_general->zto_membergroup_defaults());
$html_concat .= '<tr><td><label for="';
$html_concat .= esc_html('zto_membergroup').'[zto_membergroup_one]" id="zto_membergroup_one">Group One Member</label>';
$html_concat .= '<input class="cm-toggle" type="checkbox" name="';
$html_concat .= esc_html('zto_membergroup').'[zto_membergroup_one]" id="';
$html_concat .= esc_html('zto_membergroup').'[zto_membergroup_one]" value="1" ';
$html_concat .= checked($user_membership['zto_membergroup_one'], '1', true).'>
</td></tr>
';
Thank you!
Well, the problem is that for all the sites where I used RSSL after AAM was installed, I experienced this annoying issue with AAM (got its HTTP requests blocked) resulting in no CSS loaded for this plugin in the backend, making its UI unusable (see this other thread): HTTPS and AAM CSS files: mixed contents issue | www.remarpro.com
To make its UI work again I have to disable RSSSL, and in case remove the forced SSL lines from my wp-config.php.
Could you please investigate the compatibility of your RSSL plugin with AAM installed? Both are precious and useful WP plugins to have installed.
P.S. I tried also “One Click SSL” and got no trouble whatsoever with AAM instead.
]]>I don’t think this file is being used on the page, so I must block this request. But AssetCleanup is not detecting this request.
Any help?
]]>Accompanied by this error are errors on the REST API.
“The REST API encountered an error” The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.
The REST API request failed due to an error.
Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)
Also, error with loopback requests.
“Your site could not complete a loopback request” Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.
The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 28: Operation timed out after 10004 milliseconds with 0 bytes received (http_request_failed)
Disabling this plugin fixes all these errors. Disabling any other installed plugin does not disable these error.
Please review and provide an update as this is a useful plugin for us.
Thanks.
A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.
Is that something to worry about?
]]>“A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.”
I don’t know what that means, really. What can I do to fix this?
]]>This plugin is amazing, but it adds many HTTP requests and increases my page size.
wpDiscuz disabled (running 18 plugins)
HTTP requests: 26
Size page: 403 KB
wpDiscuz enabled (running 19 plugins)
HTTP requests: 35
Size page: 490 KB
It would be great if we had an option to load Font Awesome and not essential JavaScript files only if the user scrolls down to see the comments section.
Thanks!
First I want to thank you for developing and maintaining this great plugin!
Since the latest update of WP Statistics I noticed that my website performs one additional http request: https://www.mydomain.nl/wp-json/wpstatistics/v1/hit
– What is the purpose of this http request?
– Is there a way to disable this additional http request?
Thank you so much for your reply.
Marco
]]>