Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] Atahualpa Gets MySQL Error Message


  #1  
Old Nov 8, 2010, 06:21 PM
lcreid
 
13 posts · Nov 2010
I get the following error message when I try to use the Atahualpa theme on a brand-new Wordpress site (nothing done after the install but switch to Atahualpa). This happens on two commercial hosting services. When I run the site on my own box, it works fine. The hosts that don't work are the newest and oldest versions of PHP and MySql. My own box, which works, has versions of PHP and MySql in between.

The message in the error log is:

[08-Nov-2010 17:07:13] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC' at line 1 for query SELECT * FROM wp_sb_posts WHERE (post_type = 'page' AND post_status = 'publish') ORDER BY ASC made by require, require_once, include, get_header, locate_template, load_template, require_once, bfa_header_config, bfa_hor_pages, wp_list_pages, get_pages

Any hints as to what might be wrong?
  #2  
Old Nov 8, 2010, 07:25 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Does the default theme work?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 8, 2010, 08:39 PM
lcreid
 
13 posts · Nov 2010
Yes, the default theme works in all three situations.
  #4  
Old Nov 9, 2010, 03:37 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What are the versions of atahualpa, wp, mysql and php?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Nov 9, 2010, 06:47 AM
lcreid
 
13 posts · Nov 2010
Host 1 (MySql Error)
MySql version: 5.1.48
PHP version: 5.2.14
WP version: 3.0.1
Atahualpa version: 3.4.9


Host 2 (MySql Error)
MySql version: 4.1.11
PHP version: 4.4.8-0.dotdeb.0
WP version: 3.0.1
Atahualpa version: 3.4.9


Host 31 (No MySql Error)
MySql version: 5.0.51a
PHP version: 5.2.4-2ubuntu5.3
WP version: 3.0.1
Atahualpa version: 3.4.9
  #6  
Old Nov 9, 2010, 06:52 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
from the wordpress page (http://wordpress.org/about/requirements/)
Quote:
To run WordPress your host just needs a couple of things:
PHP version 4.3 or greater
MySQL version 4.1.2 or greater
your host2 is at 4.1.11
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Nov 9, 2010, 06:39 PM
lcreid
 
13 posts · Nov 2010
Fair enough. But Host 1 is the most up-to-date, and it gets the same error.

I grepped all the code, but it appears the SQL queries are built up in pieces, so it's hard to identify exactly where the query is being built and executed. If you recognize where that query comes from and give me a file and line number, I can put some debugging statements in and trace back to hopefully find the error.
  #8  
Old Nov 9, 2010, 07:22 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what is the database table prefix? is it wp_sb?

I've been trying to find out where this is being created also...

try turning debug on in wp-config.php

I could be the code in post.php about line 3171 where it builds a query
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Nov 9, 2010 at 07:40 PM.
  #9  
Old Nov 9, 2010, 07:40 PM
lcreid
 
13 posts · Nov 2010
I set the prefix to wp_sb_ because on one of the hosts I don't have the luxury of creating another database. I'll check if the prefix is different on the machine that works a little later. The machine that works isn't accessible from where I am right now.

I tried turning on debug in the wp-config.php but to my untrained eye it didn't give me enough info to narrow down the search.

I appreciate your help. Let me know if I can send any more information.
  #10  
Old Nov 9, 2010, 08:23 PM
lcreid
 
13 posts · Nov 2010
Okay. This may be my bad. Both Host 1 and Host 3 produce the same output when run without debug messages. However, when I run them with debug messages turned on, the host with the new versions of PHP and MySql does not give the database error. So the PHP version may be the issue for one of the hosts, but the other host still has some issue.

I'll try to confirm and provide a bit more information later this evening.
  #11  
Old Nov 9, 2010, 08:24 PM
lcreid
 
13 posts · Nov 2010
Sorry again. In the previous message I meant both Hosts 1 and 2. The working host always works. Only one of the two non-working hosts appears to produce the MySql error message.
  #12  
Old Nov 9, 2010, 09:43 PM
lcreid
 
13 posts · Nov 2010
So, on Host 1, which doesn't display the default WordPress install with Atahualpa correctly, I get the following in the error log if I run the "preview" of the Atahualpa theme:

Code:
[10-Nov-2010 04:38:59] PHP Notice:  Undefined variable: logo_icon_text in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_theme_options.php on line 528
[10-Nov-2010 04:38:59] PHP Notice:  Undefined variable: header_image_text in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_theme_options.php on line 652
[10-Nov-2010 04:38:59] PHP Notice:  Undefined variable: widget_form_string in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_theme_options.php on line 1921
[10-Nov-2010 04:38:59] PHP Notice:  register_sidebar_widget is <strong>deprecated</strong> since version 2.8! Use wp_register_sidebar_widget() instead. in /home/jade3201/public_html/swan/wp-includes/functions.php on line 3237
[10-Nov-2010 04:38:59] PHP Notice:  register_widget_control is <strong>deprecated</strong> since version 2.8! Use wp_register_widget_control() instead. in /home/jade3201/public_html/swan/wp-includes/functions.php on line 3237
[10-Nov-2010 04:38:59] PHP Notice:  register_sidebar_widget is <strong>deprecated</strong> since version 2.8! Use wp_register_sidebar_widget() instead. in /home/jade3201/public_html/swan/wp-includes/functions.php on line 3237
[10-Nov-2010 04:38:59] PHP Notice:  register_widget_control is <strong>deprecated</strong> since version 2.8! Use wp_register_widget_control() instead. in /home/jade3201/public_html/swan/wp-includes/functions.php on line 3237
[10-Nov-2010 04:38:59] PHP Notice:  register_sidebar_widget is <strong>deprecated</strong> since version 2.8! Use wp_register_sidebar_widget() instead. in /home/jade3201/public_html/swan/wp-includes/functions.php on line 3237
[10-Nov-2010 04:38:59] PHP Notice:  register_widget_control is <strong>deprecated</strong> since version 2.8! Use wp_register_widget_control() instead. in /home/jade3201/public_html/swan/wp-includes/functions.php on line 3237
[10-Nov-2010 04:39:00] PHP Notice:  Undefined index:  javascript_compress in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/js.php on line 9
[10-Nov-2010 04:39:00] PHP Notice:  Undefined index:  javascript_compress in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/js.php on line 235
[10-Nov-2010 04:39:00] PHP Notice:  Use of undefined constant gallery_styles - assumed 'gallery_styles' in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions.php on line 149
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: page_menu_bar in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 360
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: page_menu_bar in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 361
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: page_menu_bar in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 362
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: cat_menu_bar in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 363
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: cat_menu_bar in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 364
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: cat_menu_bar in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 365
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: logo_area in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 366
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: header_image in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 367
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: horizontal_bar1 in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 368
[10-Nov-2010 04:39:00] PHP Notice:  Undefined variable: horizontal_bar2 in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/functions/bfa_header_config.php on line 370
[10-Nov-2010 04:39:00] PHP Notice:  Undefined index:  postcount in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/index.php on line 6
[10-Nov-2010 04:39:00] PHP Notice:  Undefined index:  postcount in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/index.php on line 13
[10-Nov-2010 04:39:00] PHP Notice:  Undefined index:  center_content_bottom in /home/jade3201/public_html/swan/wp-content/themes/atahualpa/index.php on line 38
Note, no MySql error.
  #13  
Old Nov 9, 2010, 11:05 PM
lcreid
 
13 posts · Nov 2010
On the hosts that aren't working, the Atahualpa css isn't getting put on the page. On the host that is working, a large part of the css is being put on one line. I see this by doing view source on the page. I'll give a better description tomorrow.
  #14  
Old Nov 10, 2010, 06:03 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
None of those PHP notices are an issue

can you send me (in a PM if you want) the url of host1?
the css on one line is normal and based on the settings at ato->Configure CSS & JS

Did you try putting some debug code near where I said I thought the SQL statement is being built? in wordpress/wp-includes/post.php about line 3171 where it builds a query.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #15  
Old Nov 10, 2010, 06:54 AM
lcreid
 
13 posts · Nov 2010
I found several post.php files, but only one was big enough to have a line 3171. I put an error_log statement there, but nothing appeared in the log.
  #16  
Old Nov 10, 2010, 08:14 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Can you give me acces to take a look?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #17  
Old Nov 10, 2010, 06:11 PM
lcreid
 
13 posts · Nov 2010
I can give you the URL of the host that doesn't work, but I can't give you access to the code behind it. I can't give you access to the host that works, either. Sorry. The host that doesn't work is at http://jadesystems.ca/swan.
  #18  
Old Nov 10, 2010, 06:23 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Go to the backend ato->export/import settings at the bottom of the page you will see a button labeled 'delete bfa_ata4' -press the button and see what happens

Oh and turn off debug mode
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #19  
Old Nov 11, 2010, 08:08 AM
lcreid
 
13 posts · Nov 2010
I can't find such a button on the page you mentioned (I assume you mean Atahuala Theme Options, Export/Import Settings).

I've turned off debug.
  #20  
Old Nov 11, 2010, 08:26 AM
lcreid
 
13 posts · Nov 2010
I should have done this before, but... I did a clean install of Wordpress in another directory and database on the "good" host and Atahualpa works fine. I built the non-functioning site by copying the site from the other host, which had the old, unsupported, version of PHP. I suspect there was a cached file that was broken because of the old version of PHP, that I copied to the other host.

Thanks for all your help. It was your comment about deleting bfa_ata4 that got me thinking about cached files. We can call this closed, with the root cause being trying to run WordPress on an unsupported version of PHP.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ERROR MESSAGE: Parse error: syntax error, unexpected T_STRING in /hsphere/lo Candy Atahualpa 3 Wordpress theme 1 Oct 31, 2010 03:00 PM
After switching from Atahualpa 3.4.9 to Atahualpa 3.5.3 error message shalem_06_2010 New Versions, & Updating 10 Aug 10, 2010 05:07 PM
[SOLVED] Yikes! Upgraded to wp 2.8.3 &amp; got MySQL error lhanft New Versions, & Updating 1 Aug 3, 2009 10:50 PM
Error Message paulharrisjr Atahualpa 3 Wordpress theme 1 May 23, 2009 10:11 AM
What does this error message mean? chiaxiong Atahualpa 3 Wordpress theme 1 Mar 31, 2009 12:05 AM


All times are GMT -6. The time now is 11:30 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.