GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress: RestAPI/loopback request are needed? (https://gfy.com/showthread.php?t=1368278)

Paul&John 09-07-2023 05:42 AM

Wordpress: RestAPI/loopback request are needed?
 
Hi!

Just upgraded PHP7.3 to 7.4 for one of my wordpress sites and now I'm getting these two 'critical issues' under site-health:

Code:

The REST API encountered an error Performance

The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.

When testing the REST API, an error was encountered:

REST API Endpoint: https://www.domain.com/wp-json/wp/v2/types/post?context=edit
REST API Response: (http_request_failed) stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure stream_socket_client(): Failed to enable crypto stream_socket_client(): unable to connect to ssl://www.domain.com:443 (Unknown error)

Code:

Your site could not complete a loopback request Performance

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: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure stream_socket_client(): Failed to enable crypto stream_socket_client(): unable to connect to ssl://www.domain.com:443 (Unknown error) (http_request_failed)

Checkec openssl and it wasn't enabled even on 7.3 so I guess the issue is with some kind of ssl certificate? (got it via Cloudflare).. but my question is - are these two things really needed, or can I just ignore this?

Thanks :)

NoWhErE 09-07-2023 07:21 AM

Not sure if needed, but have you tried opening the URL in the first message to see if SSL is indeed working?

In your post it's: https://www.domain.com/wp-json/wp/v2...t?context=edit

so replace "domain.com" with your site and see if SSL works. If not, contact your host

Mr Pheer 09-07-2023 08:17 AM

I had that issue and I had to click "Force HTTPS" for my domain in my server's control panel.

fuzebox 09-07-2023 08:19 AM

Are you using cloudflare for ssl?

Paul&John 09-07-2023 09:27 AM

Quote:

Originally Posted by NoWhErE (Post 23174005)
Not sure if needed, but have you tried opening the URL in the first message to see if SSL is indeed working?

In your post it's: https://www.domain.com/wp-json/wp/v2...t?context=edit

so replace "domain.com" with your site and see if SSL works. If not, contact your host

Loads fine via secure connection

Quote:

Originally Posted by fuzebox (Post 23174020)
Are you using cloudflare for ssl?

Yes I'm on CF.

Mr Pheer 09-07-2023 09:33 AM

Quote:

Originally Posted by Paul&John (Post 23174032)
Loads fine via secure connection



Yes I'm on CF.

Try setting SSL to Flexible

Paul&John 09-07-2023 09:37 AM

Already on Flexible, also using a plugin for it: Flexible SSL for CloudFlare (Fix For CloudFlare Flexible SSL Redirect Loop For WordPress)

Paul&John 09-07-2023 10:37 AM

PS: this issue wasnt reported by Wordpress before the upgrade from PHP 7.3 to PHP 7.4 so I guess it has something to do with it.

Colmike9 09-07-2023 11:32 AM

Someone mentioned before that a plugin named Rocket does this after a PHP upgrade. Might be that or some other plugin.

Paul&John 09-08-2023 12:51 AM

I dont have that one, the list of plugins I'm using:

Easy WP Meta Description
Flexible SSL for CloudFlare
Official StatCounter Plugin (not sure why I added this, I always just manually add the code into the footer on my other blogs)
Widget Options
Select XML Sitemap Generator for Google
XML Sitemap Generator for Google

fuzebox 09-08-2023 07:59 AM

Quote:

Originally Posted by Paul&John (Post 23174032)
Yes I'm on CF.

Are you also running ssl on your server? 99% of Wordpress + SSL issues are because of cloudflare and the fact that the site can't access itself as it doesn't go through the SSL proxy.

jamezon 09-08-2023 08:29 AM

if you dont use rest api , its not a bad idea trying to disable it and see if things work. as far is know, its anyway mostly used by sneaky bots and hackers to brute force . not sure about newer versions of wp, i allways use classic editor and older versions of wp to keep things fast and simple..for newer plugins rest api might be necessary

Freedom6995 09-08-2023 08:31 AM

Quote:

Originally Posted by Paul&John (Post 23174274)
I dont have that one, the list of plugins I'm using:

Easy WP Meta Description
Flexible SSL for CloudFlare
Official StatCounter Plugin (not sure why I added this, I always just manually add the code into the footer on my other blogs)
Widget Options
Select XML Sitemap Generator for Google
XML Sitemap Generator for Google

Disable your plugins and see what happens.

fris 09-08-2023 02:47 PM

should be it at least 7.4 for wp, 8.0 really.

which host is still at 7.3?

Colmike9 09-08-2023 02:54 PM

Quote:

Originally Posted by Paul&John (Post 23174274)
I dont have that one, the list of plugins I'm using:

Easy WP Meta Description
Flexible SSL for CloudFlare
Official StatCounter Plugin (not sure why I added this, I always just manually add the code into the footer on my other blogs)
Widget Options
Select XML Sitemap Generator for Google
XML Sitemap Generator for Google

What's the difference between "Select" XML Sitemap Generator for Google vs the non-select version?

Paul&John 09-09-2023 11:30 PM

Quote:

Originally Posted by Freedom6995 (Post 23174381)
Disable your plugins and see what happens.

Too afraid to fuck up something, my guess is that none of those has to do anything with it except 'Flexible SSL for CloudFlare'.. but without that one the site wont work.

Quote:

Originally Posted by fris (Post 23174503)
should be it at least 7.4 for wp, 8.0 really.

which host is still at 7.3?

Thats an unmanaged VPS at OVH.. but I got a managed one at a big adult host and my php there is even on a lower version (7.2) :)

Quote:

Originally Posted by Colmike9 (Post 23174506)
What's the difference between "Select" XML Sitemap Generator for Google vs the non-select version?

Accidentally put the 'select' on the list, there is only one xml plugin.

fris 09-10-2023 08:31 AM

Quote:

Originally Posted by fuzebox (Post 23174366)
Are you also running ssl on your server? 99% of Wordpress + SSL issues are because of cloudflare and the fact that the site can't access itself as it doesn't go through the SSL proxy.

yes if you are using ssl on your server stop.

cloudflare uses the http url on your server, so if you have ssl enabled, and you have cloudflare you might either get massive redirect loops, or stuff breaking.

Mr Pheer 09-11-2023 08:31 PM

Just out of curiosity... are you using an adblocker in your browser?

If so, disable it for your site. I had an issue yesterday with certain plugins not working, wordpress was throwing errors, and it was my adblocker the whole time.

And I can duplicate it.

Error connecting to WordPress REST API. Disable ad-blocker for this page or unblock /wp-json/wp-statistics/v2/metabox in the ad-blocker configuration.

fris 09-11-2023 11:02 PM

Quote:

Originally Posted by Paul&John (Post 23174869)
Too afraid to fuck up something, my guess is that none of those has to do anything with it except 'Flexible SSL for CloudFlare'.. but without that one the site wont work.



Thats an unmanaged VPS at OVH.. but I got a managed one at a big adult host and my php there is even on a lower version (7.2) :)



Accidentally put the 'select' on the list, there is only one xml plugin.

no host should be using an out of date version like 7.2, i thought vacares was bad enough for only 7.3

Paul&John 09-12-2023 02:37 AM

Quote:

Originally Posted by Mr Pheer (Post 23175521)
Just out of curiosity... are you using an adblocker in your browser?

I have adblock disabled on my own sites.. I think the issue will be with the CF flexible thingy and not having a certificate on my server. So will setup lets encrypt via virtualmin then switch to FULL mode at CF.

Paul&John 09-14-2023 01:46 AM

Seems like the solution was easier after all. So at first I requested a lets encrypt certificate, enabled FULL mode at Cloudflare then disabled the Flexible plugin but didn't helped. Did a little more googling and installing php-curl module for 7.4 solved it. Interestingly curl wasn't installed for php 7.3.

fris 09-15-2023 09:49 AM

curl module should really be on all php installs

Paul&John 09-16-2023 06:22 AM

To tell you the truth I always thought it comes already with php :)


All times are GMT -7. The time now is 07:43 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc