Support Forum

errorlog shows something about mysql_ping()

GO Gomlers
Gomlers
Member

After I updated to the latest version of simple-press and WP, I have an errorlog of 15 megabytes, with start date: 19. jan, end date 21. jan. I have NOT done any coding/tweaking myself!

I have about 60.000 lines of this:

[19-Jan-2014 02:51:00 UTC] PHP Warning:  mysql_ping() [<a href=’function.mysql-ping’>function.mysql-ping</a>]: Access denied for user ‘my_user’@’localhost’ (using password: NO) in /problem-with-post-edit-buttonome/my_user/public_html/my_domain/wp-content/plugins/simple-press/sp-api/sp-api-error.php on line 79

[19-Jan-2014 02:51:00 UTC] PHP Warning:  mysql_ping() [<a href=’function.mysql-ping’>function.mysql-ping</a>]: A link to the server could not be established in /problem-with-post-edit-buttonome/my_user/public_html/mydomain/wp-content/plugins/simple-press/sp-api/sp-api-error.php on line 79

 

And about 40.000 lines of this:

[19-Jan-2014 02:52:24 UTC] PHP Notice:  Undefined property: spUser::$user_login

[19-Jan-2014 02:52:30 UTC] PHP Notice:  Undefined index: sfpmremove

 

All help would be appreciated, before I need to buy another VPS for space of errorlog :)

22 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Wow… 15MB? That’s crazy.

It looks to me like your host is not allowing calls to MySQL using the full MySQL php library – or – your database really is getting lost. Let me give you some background…

We have seen one or two users – usually on lower end hosting options – who experienced repeated ‘Server gone away’ errors because their mySQL settings were not reliable. The trouble with this is that the ‘gone away’ error would itself then spawn an error which would trigger another ‘gone away’ error which would spawn another… well you get the idea.

Adding the mysql_ping() check first, while not solving their underlying unstable server issue, did prevent the cascade of error log entries. The function mysql_ping() really speaks for itself. It simply checks that the mySQL server is still there at the end of the connection.

Now – this is the first report we have had that mysql_ping() itself is causing an issue. My worry would be that if it were removed it might simply be masking a ‘server gone away’ issue that will still generate lots of error log entries as you would expect when no queries can be run.

I think the first thing to do would be, obviously, to remove the file daily until the issue is sorted. Meanwhile ask your hosting support why mysql_ping() calls are failing. And perhaps if all else fails preface each call with an @ character to prevent it returning an error – but that just masks whatever the problem is.

As to the notices – ‘user_login’ is the WordPress column name of your users user_name and as such has to be defined. I would suspect that this is tied in with the database failing which really needs to be sorted first.

GO Gomlers
Gomlers
Member

OK – yeah, I thought it became really big, really fast :p

As of now, I have the forum and wp-install on my own VPS.

I’m actually moving over to shared hosting on a “litespeed” server tonight, and maybe that solves the issue!

I’m not the biggest VPS-guru around, so it’s too hard to manage, so maybe there is something wrong in my setup there. Let’s hope it solves it self when everything is moved over to a shared hostingplan.

Thank you for explaining it! :)

YS Yellow Swordfish
Yellow Swordfish
Member

Well please do let us know if all goes well and things calm down.

GO Gomlers
Gomlers
Member

Moved to another server last night, and now this error seems to be gone :)

 

But I get another error now…

There is a difference in the paths from the last server, so do you know where I should go to fix this:

 

[23-Jan-2014 03:42:21 Europe/Berlin] PHP Fatal error:  require_once() [<a href=’function.require’>function.require</a>]: Failed opening required ‘/problem-with-post-edit-buttonome/oldusername/public_html/wp-load.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /problem-with-post-edit-buttonome/newusername/public_html/phpbbredir.php on line 3

[23-Jan-2014 02:43:10 UTC] PHP Notice:  Undefined property: spUser::$user_login

[23-Jan-2014 02:43:13 UTC] PHP Notice:  Undefined property: spUser::$user_login

YS Yellow Swordfish
Yellow Swordfish
Member

I would have expected that if it failed to open wp-load.php then nothing would work as that is pretty important. So… does the file exist at that location? It should do…

GO Gomlers
Gomlers
Member

I think I found the error!

I use some info from the old forum (phpbb) so in phpbbredir.php, there was a wrong path. I would think that was the error.

GO Gomlers
Gomlers
Member

Thanks :)

Still not great though – I still get these errors:

 

[23-Jan-2014 13:31:58 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:31:58 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:31:58 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:31:58 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:31:58 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 12:31:58 UTC] PHP Notice:  Undefined index: forumname
[23-Jan-2014 12:31:58 UTC] PHP Notice:  Undefined index: forumname
[23-Jan-2014 12:31:58 UTC] PHP Notice:  Undefined index: forumname
[23-Jan-2014 12:32:08 UTC] PHP Notice:  Undefined property: spUser::$user_login
[23-Jan-2014 13:32:17 Europe/Oslo] PHP Notice:  Undefined property: spUser::$user_login
[23-Jan-2014 13:32:26 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:32:26 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:32:26 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:32:26 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread
[23-Jan-2014 13:32:26 Europe/Oslo] PHP Notice:  Undefined property: stdClass::$unread

YS Yellow Swordfish
Yellow Swordfish
Member

Most of those are Notices which are not strictly ‘errors’. They are really just a nuisance which we clean up when we find them. Some will be fixed in the next update.

The ‘unread’ one is puzzling as I have not seen that one before but again – may be fixed in the next update. It might also refer to some data item that has not been set up yet because things are quite new (I believe?).

I am however, a little concerned about the ‘user_login’ one because this just should not be possible. This is a WordPress core property that should not be able to not exist.

You might want to turn off the reporting of Notices perhaps? It is not uncommon to do so. Should be possible in the php ini file although i suppose your host would have to do it for you.

DR Debra Reed
Debra Reed
Member

I am getting the same warnings (and lots of them):

[28-Jan-2014 01:34:39 UTC] PHP Warning:  mysql_ping() [<a href=’function.mysql-ping’>function.mysql-ping</a>]: Access denied for user ‘root’@’localhost’ (using password: NO) in …/wp-content/plugins/simple-press/sp-api/sp-api-error.php on line 79
[28-Jan-2014 01:34:39 UTC] PHP Warning:  mysql_ping() [<a href=’function.mysql-ping’>function.mysql-ping</a>]: A link to the server could not be established in …/wp-content/plugins/simple-press/sp-api/sp-api-error.php on line 79

I have sent your previous comments to our host to see what he says.  We have VPS Cloud hosting but are experiencing other issues as well with WP … random 404 and 500 errors that cannot be tracked via the server error log.  Not sure these ping warnings are related to these 404/500 errors, but trying to track down all problems in case.

Just wanted to chime in since this is the exact topic I came looking for today.

Thanks.

YS Yellow Swordfish
Yellow Swordfish
Member

It could prove very useful to hear what your host has to say so please do come back on this.

You could try commenting out the mysql_ping() calls in that file to see what happens. I am still thinking you may then get a lot of ‘MySQL gone away’ entries although that depends on why it is failing in the first place. Let’s see what comes back from the host on this first.

DR Debra Reed
Debra Reed
Member

Developers are monitoring our server for the other noted issues with random 404/500 errors.  I will report back when I have more info.  Thank you.