Support Forum

Completely Random Error Started Happening causing a error 500 site-wide

RY Ryan
Ryan
Member

Hi,

I updated Wordfence and suddenly am getting the following error but even after uninstalling Wordfence it’s still happening, I also restored a backup but it’s still happening!

[18-May-2017 06:51:59 UTC] PHP Fatal error: Uncaught Error: Class 'SimpleXMLElement' not found in /home/WEBHOSTACC/public_html/MAINSITE/wp-content/plugins/simple-press/sp-startup/site/sp-site-support-functions.php:694
Stack trace:
#0 /home/WEBHOSTACC/public_html/MAINSITE/wp-content/plugins/simple-press/sp-startup/admin/spa-admin-updater.php(14): sp_load_version_xml()
#1 /home/WEBHOSTACC/public_html/MAINSITE/wp-includes/class-wp-hook.php(298): sp_update_check_sp_version('')
#2 /home/WEBHOSTACC/public_html/MAINSITE/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
#3 /home/WEBHOSTACC/public_html/MAINSITE/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /home/WEBHOSTACC/public_html/MAINSITE/wp-admin/admin.php(329): do_action('load-update-cor...')
#5 /home/WEBHOSTACC/public_html/MAINSITE/wp-admin/update-core.php(10): require_once('/home/WEBHOSTACC/...')
#6 {main}
 thrown in /home/WEBHOSTACC/public_html/MAINSITE/wp-content/plugins/simple-press/sp-startup/site/sp-site-support-functions.php on line 694

15 Answers

New Answer

MP Mr Papa
Mr Papa
Member

For detailed support, you will need to open a topic in the support forum vice pre membership queries.

But it appears that something on your server is blocking the http request to our server that checks if new versions of core, plugins or themes are available.

HAve to wonder if something from wordfence is still hanging on.

RY Ryan
Ryan
Member

Hi,

It even is effecting other installs… even though i never updated them. What is the update address so i can whitelist it.

MP Mr Papa
Mr Papa
Member

All on same server? Did you our host change php versions? Maybe simple xml is not included in current php?

RY Ryan
Ryan
Member

Yep, all on same server. Host didn’t change PHP versions and simple xml is included in the current PHP.

RY Ryan
Ryan
Member

It’s breaking my Updates via /wp-admin/update-core.php
It’s breaking plugin enabling/disabling via: /wp-admin/plugins.php

Disabling Wordfence doesn’t resolve it but disabling Simple Press does fix it… sure it’s not your end?

MP Mr Papa
Mr Papa
Member

Well all I can say there is that it’s not a general problem..  Working fine here and on couple other sites I checked.

Additionally, we are getting updates today. Have watched the counter and its increasing. So again generally working. And at least as of now, no other reports.

Looking at your error bit more it doesn’t seem to be comm related as I was thinking. It’s actually a php error that the class isn’t there which is odd. More like a file not found and don’t think related to any communication with our server. Rather confusing actually.

RY Ryan
Ryan
Member

Hi Papa,

Could I request Simple:Press to take a look because it should work at all because I know I haven’t changed anything in regards to Simple:Press the only change I made was Wordfence and I disabled and uninstalled that but it’s still happening.

MP Mr Papa
Mr Papa
Member

Take a look at what?

i did review our server and verified its working.  Here and multiple sites and verified uploads occurring.  If general problem it would occur here too. 

If you can post your server IP I can verify its not blocked for some reason. But at 38,000 feet now on plane so won’t be able to do that until after I land later this afternoon 

RY Ryan
Ryan
Member

Hi Papa,

I logged into my servers SSH and pinged your server and it appears fine, we can ping your server just fine, no packet loss and a response time of 101ms

Really quite confusing.

MP Mr Papa
Mr Papa
Member

one thing I am confused about..  is this happening on all page loads? or just when upgrading simple press??   not clear…

if the latter, could you download the software from here and upload via ftp?  see if we can get past this current issue…

MP Mr Papa
Mr Papa
Member

looked into this a bit more this morning…

this is the error you said you receiving:

[18-May-2017 06:51:59 UTC] PHP Fatal error: Uncaught Error: Class ‘SimpleXMLElement’ not found in /home/WEBHOSTACC/public_html/MAINSITE/wp-content/plugins/simple-press/sp-startup/site/sp-site-support-functions.php:694

like I have said in recent posts, this really doesnt have anything to do with communication with our server…  here is the line of code throwing the error:

$xml = new SimpleXMLElement($body);

its a php error that the class for the instantiation cannot be found… no comms, just a php error… but just an attempt to use a built in php class (http://php.net/manual/en/class.simplexmlelement.php)… but it cannot find it… why??

its built into php 5 and 7… what version do you run?  are you sure that php simplexml is compiled into your php???

I still think something awry on your server…  can you talk to your host?

RY Ryan
Ryan
Member

Hi Papa,

I spoke with the hosts and they too were a little confused as simplexml was installed, they ran a cPanel re-install and it fixed the issue so think the issue was that SimpleXML had somehow become corrupted which they are looking into finding out how/why but either way it fixed the issue! 🙂

On a side note, I checked the mysql slow log and found one for simple:press forums  in there, not sure where this is being called or why it’s slow (I assume because of the number of rows?):

# Time: 170518 2:01:47
# User@Host: root[root] @ localhost [] Id: 53282
# Query_time: 5.703360 Lock_time: 0.000051 Rows_sent: 57615 Rows_examined: 57615
use WEBHOSTACC_MYDATABASE;
SET timestamp=1495069307;
SELECT /*!40001 SQL_NO_CACHE */ * FROM `MYDATABASE_sfposts`;

# Time: 170518 18:42:08
# User@Host: root[root] @ localhost [] Id: 8818
# Query_time: 3.361169 Lock_time: 0.000027 Rows_sent: 57736 Rows_examined: 57736
use WEBHOSTACC_MYDATABASE;
SET timestamp=1495129328;
SELECT /*!40001 SQL_NO_CACHE */ * FROM `MYDATABASE_sfposts`;

Anything my end that can be done to help that?

MP Mr Papa
Mr Papa
Member

good news on the simple xml…  thanks for the update…

those are some weird queries and not one that we do…  yes, its our tables, but we dont execute use statements or timestamping like that…  nor do we out any queries with comments in it like that and typically dont use the backticks either…  do you use a non traditional db engine/frontend?

so leads me to believe you are perhaps running some sort of caching plugin that also does db caching?

RY Ryan
Ryan
Member

Hi,

The only plugins we run that I could see potentially doing anything like that could be with the Simple:Press tables is…

We run “Redis Object Cache” but surely that should effect other tables if this was the cause.

We also run “GWP Widget Cache (Cached!)” but that’s for widgets only, there is no SP widget.

We also use the SP API but are only using the functions:

$memberships = sp_get_user_memberships($member_id);
sp_remove_membership($level, $member_id);
sp_add_membership($level, $member_id);

So it shouldn’t be them either…

We’re using MySQL with default table type (MyISAM) and cPanel

do you use a non traditional db engine/frontend?