Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to register your site using WPML and encountered a cURL error 28.
Solution:
First, ensure that SELinux is disabled, as its status will not impact the httpd_can_network_connect setting. Next, to diagnose the issue further, attempt to connect to a third-party host using custom code. You can use the

wp_remote_get

function as shown below:

/** @var array|WP_Error $response */<br />$response = wp_remote_get( 'http://www.example.com/index.html' );<br /><br />if ( is_array( $response ) && ! is_wp_error( $response ) ) {<br />  $headers = $response['headers']; // array of http header lines<br />  $body    = $response['body']; // use the content<br />  var_dump($headers); //output the headers<br />  var_dump($body); //output the body<br />}

This test will help determine if the issue is specific to our domains or a broader problem affecting all domains.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by Lauren 1 month, 2 weeks ago.

Assisted by: Lauren.

Author Posts
January 22, 2025 at 11:40 am #16622577

kappnerC

Again, need to get this resolved ASAP. I am concerned that our request is being denied based on IP or host name. Can you confirm this is not happening. Thank you

January 22, 2025 at 4:11 pm #16624232

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

This has been escalated to our systems team and I'm asking them to review the IP and check for any blockages from our side. As soon as I hear back from them I will let you know what we have found.

January 23, 2025 at 1:16 pm #16628047

kappnerC

Please do not let this issue linger, need to get a resolution today. Thank you Lauren

January 23, 2025 at 10:48 pm #16629991

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

I'm doing my best to get you an update from my systems team and as soon as I hear, I will update here.

January 24, 2025 at 4:02 pm #16632051

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Our systems team did a check on our end. From our Logs I saw a couple times where the user's site was able to connect to our API.

However, I did notice that the IP address that was being used in this case was 92.204.137.202. Not the mentioned 192.169.176.142 in the ticket. Which suggests that you may have switched servers for their site - do you know if that is the case?

The last ping we got from your site was on January 1, 2025, which means the issue would've started any time after that. Please confirm the following:

1. Have you switched hosting for the site?
2. Double check to ensure that httpd_can_network_connect is indeed enabled i.e. set to 1
3. Inspect SELinux logs for related denials: sudo ausearch -m AVC,USER_AVC -ts recent
4. Check the SELinux status:: sestatus

After January 1, 2025 no connections were seen in the logs. Our systems team confirms that the issue is on the server side, and not on ours, but we want to do everything we can to help identify the issue and get it resolved.

Screenshot 2025-01-24 at 6.56.03 AM.png
January 24, 2025 at 5:16 pm #16632267

kappnerC

1. Have you switched hosting for the site?
Yes, this site has changed servers, new IP address and hostname

2. Double check to ensure that httpd_can_network_connect is indeed enabled i.e. set to Yes, this is enabled

3. Inspect SELinux logs for related denials: sudo ausearch -m AVC,USER_AVC -ts recent

4. Check the SELinux status:: sestatus
SELinux status: disabled

January 24, 2025 at 5:21 pm #16632281

kappnerC

There are no logs for SELinux. These are the settings in the config file. Do these settings need to be changed?

SELINUX=permissive
SELINUXTYPE=targeted

January 24, 2025 at 5:42 pm #16632322

kappnerC

I am unable to enable SELinux and therefore httpd_can_network_connect. Do you have any suggestions how to enable this? I tried setsebool -P httpd_can_network_connect 1 then restarted Apache, still disabled.

January 27, 2025 at 7:51 pm #16639188

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

If SELinux is disabled, then the httpd_can_network_connect does not matter if it is enabled or not.

Another suggestion from our systems team is to try and connect to a 3rd party host via custom code with wp_remote_get function
e.g. (obtained from https://developer.wordpress.org/reference/functions/wp_remote_get/ )

/** @var array|WP_Error $response */
$response = wp_remote_get( '<em><u>hidden link</u></em>' );

if ( is_array( $response ) && ! is_wp_error( $response ) ) {
	$headers = $response['headers']; // array of http header lines
	$body    = $response['body']; // use the content
  var_dump($headers); //output the headers
  var_dump($body); //output the body
}

In that way, we can rule out our domains being blocked or having the problem globally for all domains.