1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by guyinblack »

Hi, my CMSMS installation was working great on the old server , we had been using version 1.3.1 for more than a year. No problems at all.

My hosting company gave us a new server, and we had to transfer everything over.

After we moved the site, it stopped working saying "page not found"

Saw some errors about the mod_rewrite rules in the logs. no other apache errors.

Tried deleting the cache, still same error.

Tried changing the variables in config.php , because of the new location of the apache web root, and we were still getting the same error about page not found.

After everything else didn't work, I tried upgrading to the latest version, and the process stops at step 6 with the following error message:
Upgrade schema
Invalid query: SELECT version from cms_version
All requirements in terms of php/safemode/mysql are OK (http://abreuvoir.gr/phpinfo.php)

only messages i've found for that error so far are about changing to a more recent mysql, but we are on version 5 already..

Is there any way I can get it working again?

Thank you so much for your time.
Last edited by guyinblack on Thu Sep 10, 2009 10:40 am, edited 1 time in total.
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: site broken after trying to upgrade from 1.3.1 to 1.6.5 :(

Post by guyinblack »

would it make sense to upgrade to 1.4 first and then 1.5 and finally to 1.6?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: site broken after trying to upgrade from 1.3.1 to 1.6.5 :(

Post by RonnyK »

You could try to do it like that... Normally it shouldnt be a problem to take the leap at once, but good to be sure...

Also make sure that all files are transferred correctly


Ronny
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: site broken after trying to upgrade from 1.3.1 to 1.6.5 :(

Post by guyinblack »

Thanks Ronny! as I said, tried to upgrade to 1.6.5 and I can't go past step 6, with the following error:

Upgrade schema
Invalid query: SELECT version from cms_version

So I guess my only option is to find 1.4 and then upgrade step by step..
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: site broken after trying to upgrade from 1.3.1 to 1.6.5 :(

Post by guyinblack »

1.4 gives me the following screen after I point to domain.gr/install/upgrade.php

Code: Select all

You are now running schema version 1 and you need to be upgraded to version 31.

Please click here to complete the upgrade.

http://www.abreuvoir.gr/install/upgrade.php?doupgrade=true

Upgrading config.php...[done]
Cleaning cache dirs...[done]
Added item_order to existing items... [done]
Creating additional_users table... [done]
Updating schema version... [done]
Creating adminlog table...[done]
Creating userprefs table...[done]
Creating indexes...[done]
Updating sections table schema...[done]
Updating user table schema...[done]
Hashing passwords...[done]
Updating content types...[done]
Added item_order to existing sections... [done]
Reseting cache update time...[done]
Updating schema version... [done]
Creating sequences...[done]
Creating modules table...[done]
Adding parent_id to pages table...[done]
Removing section_id from pages table...[done]
Removing sections table...[done]
Adding module admin permission... [done]
Clearing cache and template directories... [done]
Updating schema version... [done]
Creating modify files permission...[done]
Adding page_alias to pages table...[done]
Clearing cache and template directories... [done]
Updating schema version... [done]
Creating userplugins table...[done]
Creating css table...[done]
Creating css_assoc table...[done]
Creating siteprefs table...[done]
Creating modify CSS permission...[done]
Creating modify CSS permission...[done]
Adding head_tags to pages table...[done]
Creating modify code blocks permission...[done]
Creating clear admin log permission...[done]
Clearing cache and template directories... [done]
Updating schema version... [done]
Adding fields to users table...[done]
Adding hierarchy position to pages table...[done]
Creating htmlblobs table...[done]
Creating additional_htmlblob_users table...[done]
Creating htmlblob permissions...[done]
Clearing cache and template directories... [done]
Updating schema version... [done]
Adding fields to pages table...[done]
Adding fields to templates table...[done]
Clearing cache and template directories... [done]
Updating schema version... [done]
Adding content table...[done]
Adding content_props table...[done]
Converting existing content...[done]
Adding module_deps table...[done]
Updating hierarchy positions...[done]
Changing dhtmlmenu to phplayers module on templates...[done]
"Installing" phplayers module (if necessary)... [done]
Updating additional_users to new content ids...[done]
Updating schema version... [done]
Adding module_templates table...[done]
Adding fields to content table...[done]
Removing field from content_props table...[done]
Setting a last_modified_by to something...[done]
Adding fields to template table...[done]
Setting a default template...[done]
Updating Permissions...[done]
Adding admin_bookmarks table...[done]
Adding admin_recent_pages table...[done]
Adding Primary Keys...[done]
Adding Indexes...[done]
Updating schema version... [done]
Adding fields to css table...[done]
Updating schema version... [done]
Adding fields to content table...[done]
Setting all content to collapsed...[done]
Updating schema version... [done]
Converting templates using headtags... [done]
Updating schema version... [done]
Adding fields to content table...[done]
Setting all content to collapsed...[done]
Updating schema version... [done]
Adding fields to content table...[done]
Updating hierarchy positions...[done]
Updating schema version... [done]
Adding fields to content table...[done]
Updating schema version... [done]
Adding fields to content table...[done]
Updating schema version... [done]
Making permission field bigger...[done]
Make active boolean in modules table...[done]
Fixing permission names...[done]
Updating hierarchy positions...[done]
Updating schema version... [done]
Adding hierarchy_path field to content table...[done]
Updating hierarchy positions...[done]
Updating schema version... [done]
Updating schema version... [done]
Adding Cross Reference tables...[done]
Setting up existing cross references...[done]
Updating schema version... [done]
Modifying Event Handler Table(s)...[done]
Updating schema version... [done]
Adding fields to modules table...[done]
Updating schema version... [done]
Making user preferences field bigger...[done]
Setting up core events...[done]
Updating schema version... [done]
Creating "Modify Page Structure" permission...[done]
Updating schema version... [done]
Deleting any duplicate events...[done]
Creating ChangeGroupAssign events...[done]
Updating schema version... [done]
Creating "Modify Events" permission...[done]
Updating schema version... [done]
Is it normal that after this is done, nothing happens?

If I run it again I see the same messages
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: site broken after trying to upgrade from 1.3.1 to 1.6.5 :(

Post by guyinblack »

successfully updated to version 1.5!

trying 1.6 now
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: site broken after trying to upgrade from 1.3.1 to 1.6.5 :(

Post by guyinblack »

OK , did each and every one update from 1.3.1 up to 1.5.4

no warnings, no errors, nothing - all went smooth.

Then tried to Upgrade from 1.5.4 to 1.6 -> and it wouldn't do it:

Step 5:

Upgrade schema

Code: Select all

Invalid query: SELECT version from cms_version
	Caution
" One or more upgrades have failed. Please correct the problem and click the button below to recheck. "

any way to correct my database from 1.5.4 to 1.6 ?

**Update - I have tried upgrading from 1.5.4 to 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, and 1.6.5, with no luck - every single time the process stops at step 5 (Upgrade Schema -- "invalid query: Select version from cms_version")

Wish I could find out how to fix it..

Thank you for your time.
Last edited by guyinblack on Thu Sep 10, 2009 10:50 am, edited 1 time in total.
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by guyinblack »

Also:


my old database when the site was running CMSMS 1.3, was MySQL v3.23

my new database is MySQL v5.0.45-7
guyinblack
Forum Members
Forum Members
Posts: 17
Joined: Sun Apr 20, 2008 9:22 pm

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by guyinblack »

hi guys, any ideas?
openmtl
Forum Members
Forum Members
Posts: 16
Joined: Sat Jul 07, 2007 11:26 am

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by openmtl »

guyinblack wrote: hi guys, any ideas?
That Invalid query: SELECT version from cms_version means that your database prefix is "cms_" (which is the default)
can you confirm this is correct i..e your config file has db_prefix set as cms_ ? The select query is
in install/lib/classes/CMSUpgradePage5.class.php and it's just,
$query = "SELECT version from " . cms_db_prefix() . "version";

which is a pretty basic SQL command so it must be a non-existent table - because of prefix - and it needs it at that time of the install.
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by pixelita »

I'm having the same problem and the default table prefix, cms_ is being used.  So what could the problem be? I'm stalled out trying to upgrade to 1.6.6. 
Submit your site to the We Love CMSMS showcase
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by pixelita »

I went into the database via PHPMyAdmin and when I clicked on the table cms_version, I got this error message from MySQL:
Error

SQL query: Edit

SHOW FIELDS FROM `cms_version` ;

MySQL said: Documentation
#1017 - Can't find file: './pcrsd_cmsms/cms_version.frm' (errno: 13)
How would I correct this? I have other installations of CMSMS using 1.6.6. Should I just steal the content from one of those tables?
Submit your site to the We Love CMSMS showcase
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by pixelita »

I tried importing a known working cms_version table from another site using CMSMS 1.6.6.  When I exported the working table, I made sure to check "Drop Table." 

But when I imported it into this problematic install, I get the same error message. Where is this document it's looking for?
cms_version.frm
Submit your site to the We Love CMSMS showcase
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by calguy1000 »

pixelita it looks like your cms_version table got corrupted somehow in mysql... strange that this would happen.

try doing a 'describe cms_version'  it should tell you if the table is there or not.... it needs to be there

if it isn't there at all, then I'd be thinking that some other tables have been corrupted, and try restoring from a known good backup before you try the upgrade again.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am

Re: 1.5.4 upgrade to 1.6+ : site broken ("Invalid query: SELECT version from..")

Post by pixelita »

Thanks, Calguy. I suspect it's less than competent web host. During all of this upgrading, when I was stalled out at that level with CMSMS complaining about the invalid query, I hit refresh, then I got a session error and was told to contact my "administrator." THEN the site appeared. And everything was fine.  This entire upgrade has been problematic but I don't honestly believe it has anything to do with CMSMS because, as I said earlier, I did four upgrades earlier this week and all went off without a hitch. 

So sorry I have nothing else to lend in the way of a solution to this issue.
Submit your site to the We Love CMSMS showcase
Locked

Return to “[locked] Installation, Setup and Upgrade”