I am trying to update a site that had been running EE Core 1.4.1 to the full version of 1.6. I followed the “Upgrading from ExpressionEngine Core to Full Version” instructions and then the standard update instructions.
When I ran update.php, the first few upgrade steps went fine and then I got an error:
At this point, I tried to restore the db from my backed up file, but i got an error in phpMyAdmin. I was able to restore from my ISP’s backup file, and then reverted back to my original config.php file, but when I ran update.php again, I am still getting the MySQL errors.
If I try to visit my site, or log in to the CP, i get this error:
Query: SELECT es.* FROM exp_sites AS es WHERE es.site_id = ‘1’
My question is, where do I go from here? My db backup file that I made before I started is corrupt, though I can still use my ISP’s backup. Is there anything that can be done, or do have I completely lost the site?
I discovered that I had an archived version of 1.4 lying around, so I was able to replace the system folder from there, and restore the database, so now I’m back to running a working version of 1.4.1. I’ll try the upgrade again later.
Query: CREATE TABLE `exp_member_search` ( `search_id` varchar(32) NOT NULL, `search_date` int(10) unsigned NOT NULL, `keywords` varchar(200) NOT NULL, `fields` varchar(200) NOT NULL, `member_id` int(10) unsigned NOT NULL, `ip_address` varchar(16) NOT NULL, `total_results` int(8) unsigned NOT NULL, `query` text NOT NULL, PRIMARY KEY (`search_id`), KEY `member_id` (`member_id`) )
I’m not sure if the archived ee version that I reverted the site to was different from the original version that it was running before I started this process or what. At this point, the site works if I revert to the 1.4.1 system folder and restore the database, but I can’t get it to upgrade past 1.4.2.
It’s borking because the exp_member_search table is the first change to the db 1.5 makes. Looks like at least a partial upgrade to 1.5 must have happened and then on the second attempt to upgrade to 1.5 it runs into pre-existing changes.
Do you have phpmyadmin or something to take a look at the db? Does exp_member_bulletin_board table exist? If so- take a look at exp_actions- see if there’s a row with class = ‘Member’, method = ‘member_delete’. That’s the last alteration in the 1.5 upgrade.
Why are thumbnails not opening for me today? Blarg. But I take your word for it. Basically- the addition to the actions table was the last db alteration. The addition of the exp_member_bulletin_board table was the very next query after the search addition. So- we know somewhere in there, the upgrade failed.
What I’d generally do is go in and pinpoint where- by comparing the current db to the db changes in system/updates/ud_150.php. Depending on what I spotted, I’d either roll back a few additions or I’d manually make a few. Depends on which would be easier to do.
I’m not sure how comfy you are poking the db- so if you want me to go in and take a look for myself, pm me over phpmyadmin login info and I’ll do it. Won’t make any changes before clearing things with you. On the other hand, if you are comfortable taking a look and what I said made sense? You could likely do the poking yourself.
Either is good by me- just depends on what you’d prefer. If you want me to go in there- just pm me the info.
Well, I thought I removed all of the remnants of the 1.5 upgrade from the database, but I guess not. I tried running the upgrade again, and the first couple steps went okay, but then I got this error:
Notice: Undefined index: prv_msg_send_limit in /var/www/html/pi/piddleloop.com/admin/updates/ud_150.php on line 116
Notice: Undefined index: prv_msg_storage_limit in /var/www/html/pi/piddleloop.com/admin/updates/ud_150.php on line 117 Error: The following error was encountered MySQL ERROR:
Query: CREATE TABLE `exp_member_search` ( `search_id` varchar(32) NOT NULL, `search_date` int(10) unsigned NOT NULL, `keywords` varchar(200) NOT NULL, `fields` varchar(200) NOT NULL, `member_id` int(10) unsigned NOT NULL, `ip_address` varchar(16) NOT NULL, `total_results` int(8) unsigned NOT NULL, `query` text NOT NULL, PRIMARY KEY (`search_id`), KEY `member_id` (`member_id`) )
So now I’ve reverted back to 1.4 again. I tried just exporting the contents of the blog, but since this installation is from before the embed tag allowed variables, I am unable to export comments. I’m beginning to think I should just give up on salvaging this site and start over with no content and a fresh install.
That first warning is coming because the prv_mssg config variables aren’t set in config.php- which it’s just a warning so if you skipped it it wouldn’t be a crisis. Or- just add in the two config variables:
// Use existing settings $Q[] = "UPDATE exp_member_groups SET prv_msg_send_limit = '".$DB->escape_str($conf['prv_msg_send_limit'])."'"; $Q[] = "UPDATE exp_member_groups SET prv_msg_storage_limit = '".$DB->escape_str($conf['prv_msg_storage_limit'])."'";
Spot what’s up? Second error- exp_member_search is already in there- it needs to be dropped.
I think this was likely borked before you got in there. But it’s bound to be salvageable from an upgrade perspective. Messy, but salvageable. If you want me to go in, say the word and I’ll tell you what I need.
Before we go in, could you try logging into phpmyadmin (or some other database tool) and manually dropping the exp_member_search table for us? As always, be sure you have a full backup first.
Just a comment to ExpressionEngine. Why don’t you include a separate update.php file for those who are jumping versions from 1.5.2 to 1.6.1, for example?
I have a 1.5.2 EE that I need to upgrade to 1.6.1, but it is borkin because of the missing exp_sites table. I’m now poking around the db to see if I can manually add it.
Another option is to upgrade from 1.5.2 to whatever the next version was, then upgrade from there to 1.6.1. Cumbersome, but it probably will address the errors along the way.
Thanks ASLFilms. In fact, the updates between each build are different. The updates folder has separate files for each “jump”, and the update process takes you through them one at a time. So you should be able to go from 1.5.2 to 1.6.1, as the updates will move you through all the relevant point releases.