Support Forum

Invalid database query in header on load

MR Mark Robinson
Mark Robinson
Member

I just moved my site to a new server.

Took a file dump of everything and moved the raw database via PHPmyAdmin

The site is working and the forum is working but everytime i go to the forum page it says  “Invalid database query” in the header – see here:

http://resilientlivelihoods.christianaid.org.uk/discussion/

 

Any ideas?

 

Update: it actually happens on every page.

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Please look in the error log (admin > toolbox > error log) and find the entry for the SQL error and copy and paste the message here…

MR Mark Robinson
Mark Robinson
Member

Here is the error log from when we moved the site a few days ago:

Date # Type Description
04/11/2013
6:54 pm
4 php file: s/simple-press/sp-api/sp-api-plugins.php
line: 611
function: unlink
Warning | unlink(D:CTAWWWresilientlivelihoods.christianaid.org.uk/wp-content/sp-resources/forum-cache//sp-plugin-styles-all.css) [function.unlink]: Permission denied
04/11/2013
6:47 pm
1 php file: WWW/resilientlivelihoods.christianaid.org.uk/wp-content/sp-resources/forum-plugins/captcha/sp-captcha-upgrade.php
line: 15
function: sp_captcha_do_upgrade_check
Notice | Undefined index: dbversion
04/11/2013
7:01 pm
127 database file: D:CTAWWWresilientlivelihoods.christianaid.org.ukwp-contentpluginssimple-presssp-apisp-api-error.php
line: 57
function: sp_update_error
error: Out of range value for column ‘error_count’ at row 26

UPDATE carl_sferrorlog SET error_date = ‘2013-11-04 18:22:18’, error_count = 128 WHERE keycheck = “1127-presssp-apisp-api-error.php”

04/11/2013
5:56 pm
1 php file: s/simple-press/sp-startup/admin/spa-admin-updater.php
line: 46
function: sp_core_plugin_info
Notice | Trying to get property of non-object
04/11/2013
6:22 pm
127 database file: D:CTAWWWresilientlivelihoods.christianaid.org.ukwp-contentpluginssimple-presssp-apisp-api-error.php
line: 127
function: sp_update_error
error: Out of range value for column ‘error_count’ at row 1

UPDATE carl_sferrorlog SET error_date = ‘2013-11-04 13:57:17’, error_count = 128 WHERE keycheck = “Notice31-press/sp-api/sp-api-auths.php”

YS Yellow Swordfish
Yellow Swordfish
Member

Ohhh. I think I see the problem and that comes down to us. I will make sure that is corrected in the next update.

Meanwhile could you please go to the errorlog panel again and this time clear it out (button at the bottom).

See if this resolves the error display issue. If it comes back clear it out again. If it comes back too quickly I can give you a fix but it does mean a small change to a table structure in the database.

I couldn’t help noticing that the top error there does not give SP permission to delete a file that it created in the first place. That seems to be a server permissions issue and it would be useful to get that resolved.

MR Mark Robinson
Mark Robinson
Member

Clearing the log cleared it.

It’s not appearing anymore! Great Stuff!

The permissions issue has been resolved. We moved the site form a linux to a Windows server so there have been several permissions issues but all getting sorted as we go!

YS Yellow Swordfish
Yellow Swordfish
Member

All sounds good. I have opened a ticket on the error log issue so it will get fixed up.
Thanks for the update.