2 Critical Site Health Errors Due to Plugin
-
Dear @techsupportrazorpay
I use the plugin on my wordpress website, delhirock.com, and got the following two critical site health errors:
2 critical issues
1) An active PHP session was detected
Performance
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.2) The REST API encountered an error
Performance
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)`When I deactivated the Razorpay plugin, the site health errors went away. I found this suggested fix online:
As it suggested, I changed the following line in razorpay-quick-payments.php:
session_start();
To the following:
if ( !session_id() ) {
session_start( [
‘read_and_close’ => true,
] );
}This fixed the site health errors in wordpress. I tested the plugin, which seemed to work fine (payment button on my page loaded, went through, deducted money) but at the very end threw an error page on my website (the confirmation page). Instead of showing a successful transaction, it said the transaction had failed (even though it hadn’t, and showed up just fine on my Razorpay dashboard). So basically a false alarm.
Could you please fix this? I don’t think it’s correct that your plugin is responsible for not one but two critical site health errors, and the fix looks quite simple, but requires some testing and plumbing all the way through to the final confirmation page shown on users’ websites.
Kindly intimate here when this is done! Thanks.
- The topic ‘2 Critical Site Health Errors Due to Plugin’ is closed to new replies.