Recovering from a catastrophic hardware failure
Posted: 03 August 2008 04:53 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

My server crashed hard a day or so ago (sounded quite like a car crash, actually) so I’m trying to recover my Expression Engine installation. I’ve never had to do this before, but I have a recent backup (phpMyAdmin export; default settings).

Here’s what I’ve done.

1. Installed PHP and MySQL on a temporary machine (this is on a Vista SP1 installation and it’s not fair to laugh. I’ll be moving it to either a Mac or EngineHosting). Tested everything.

2. Moved the EE files into the appropriate directory structures within the wwwroot directory.

3. Changed the appropriate directory permissions.

4. Changed the appropriate lines in config.php

5. Created the EE database using phpMyAdmin.

6. Tried to import the backup .sql file using phpMyAdmin.

Failed with an 500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Uh oh. I’m lost. I notice that phpMyAdmin has a 2,048 KiB limit on file size; mine is 9.6Mb. I’m sure that’s part of the problem.

So, x questions:

1. Is there anything wrong with my approach?

2. How do I get the .sql backup file into MySQL (I looked at the file in BBEdit and it looks complete and intact to my novice eyes).

3. What’s the content of the path.php file in the root directory. I’m going to need that, I’m assuming.

4. What am I missing?

5. If I decide to go the EngineHosting route, can I get an estimate for taking my .sql backup file, waving your hands over it, and making it work.

Thanks.

Profile
 
 
Posted: 03 August 2008 05:57 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  543
Joined  02-02-2006

I would try importing that sql file into MySQL in a different way that doesn’t use PHP. Have you downloaded the MySQL Administrator Tools? Maybe they came with MySQL when you installed it on your Windows machine. You should be able to import the sql file using the “Restore” functionality in MySQL Administrator.

You can also use the command line to interact directly with MySQL.

I’m not a Windows expert and have tried neither of these methods on Windows, but theoretically they should work. My goal is to get you to import that database without using PHP or Apache. It’s much faster and more reliable to interact directly with MySQL.

 Signature 

Learn EE step-by-step with the ExpressionEngine Screencasts

EE Insider

Profile
 
 
Posted: 04 August 2008 08:09 AM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  25625
Joined  05-20-2002

Yep- probably want to do the import sans php.  Command line would be the way to go- if you have access.  Is it your temp server or is it hosted?

And note- I’m no expert on command line, but I recall it not being particular hard to do this.  If you have access.  If you don’t- whoever the host is should be able to do it for you no problem.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 04 August 2008 11:49 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

I tried using MySQL Administrator to restore the database. It returned the following error:

“The selected file was generated by mysqldump and cannot be restored by this application.”

I’m clueless about the command line.

Profile
 
 
Posted: 04 August 2008 12:34 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

It looks like I’ve managed to recover the database from the command line:

mysql -h “hostname” -u “username” “databasename” < database.sql

Apparently everything got restored except for the last two months. I can take losing two months of work as opposed to 16 years, so I can live with it.

However, I can’t login to the Administration control panel. I get the following error:

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Ah, crap, it’s returning that error for everything now.

Profile
 
 
Posted: 04 August 2008 01:01 PM   [ Ignore ]   [ # 5 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

The 500 error remains unresolved.

Additionally, when I attempt to access the Control Panel, I get the familiar username/password dialog, enter them, and then get these errors:

PHP Notice:  Undefined index:  total_entries in C:\inetpub\wwwroot\q9gnbl\cp\cp.home.php on line 913
PHP Notice:  Undefined index:  total_comments in C:\inetpub\wwwroot\q9gnbl\cp\cp.home.php on line 894
PHP Notice:  Undefined index:  total_trackbacks in C:\inetpub\wwwroot\q9gnbl\cp\cp.home.php on line 875
PHP Notice:  Undefined index:  last_cache_clear in C:\inetpub\wwwroot\q9gnbl\core\core.system.php on line 944

Profile
 
 
Posted: 05 August 2008 08:36 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  25625
Joined  05-20-2002

For the 500… you may want to ask the host if they can point you in the right direction.  And if you have htaccess in use, take it out until you get back up and running.  The notice above shoudn’t bring the site down- but it suggests something is up.  I’d go look at exp_members.  You’re member id is probably ‘1’- do you have values for the above fields?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 05 August 2008 08:59 AM   [ Ignore ]   [ # 7 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

I’m starting to suspect this is related to a PHP session problem.

To clarify, this is on a temporary box in one of our offices that’s running Vista/IIS. Emphasis on temporary.

Profile
 
 
Posted: 05 August 2008 09:44 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  25625
Joined  05-20-2002

Ouch.  Yes- the 500 definitely suggests something server related.  Which is not to say EE isn’t involved.  But ... how fast are you getting the new home?  I’d wait on that if I had any choice in the matter.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 05 August 2008 07:27 PM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

Here’s a perplexing update and it’s really weird. Please bear with me…

So I set up a temporary server on my wife’s laptop running Vista SP1 and restored the database dump. It appears to be mostly intact from what I can tell, although the last two months of posts are missing. That’s mystery one.

Here’s the big mystery:

I changed the IP address on the laptop to that of the dead server (all on the same subnet).

I changed the machine name of the laptop to that of the dead server.

http://www.farces.com, farces.com, http://www.michaelfraase.com, http://www.karenfraase.com, michaelfraase.com, and karenfraase.com all resolve to the IP address mentioned. All resolve to moriarty.farces.com

Okay here’s where it gets weird.

Any of the domain names work if I access a phpinfo.php file or even the EE server wizard (i.e., anything that doesn’t hit MySQL; although the EE server wizard reports the database is fine). However, when I try to access EE’s index.php file, I get a 500 error:

500—internal server error
There is a problem with the resource you are looking for, and it cannot be displayed.

HOWEVER, if I replace http://www.farces.com with moriarty (the machine name), it works. Only on the LAN, of course, and only until I click the first link that wants to go to http://www.farces.com/xxx and I get another 500 error.

Any ideas?

Profile
 
 
Posted: 12 August 2008 11:08 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  25625
Joined  05-20-2002

Sorry mfraase, playing a bit of catch-up today.  This has about got to be a server related issue.  I think I’d hold off and get it up on the destination server before poking it too hard.  Doable?  And make sense?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 12 August 2008 11:13 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

The site has been moved to EE hosting. I’m having serious problems with the database that are being addressed in another thread. This particular problem seems to have been resolved with the move.

Profile
 
 
Posted: 12 August 2008 11:23 AM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  21037
Joined  04-29-2002

So are we good to close this thread then?

 Signature 

EE 2.01PB - 2.x Bug Tracker | Docs | Upgrade from 1.x to 2.x | Build Update Instructions | 1.6.x Update Info

Most recent 2.x version: Build 20100215
Don’t forget to upgrade MSM and Forum as needed!

Profile
MSG
 
 
Posted: 12 August 2008 11:24 AM   [ Ignore ]   [ # 13 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  03-20-2002

Yes.

Profile
 
 
Posted: 12 August 2008 12:12 PM   [ Ignore ]   [ # 14 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  21037
Joined  04-29-2002

Closing thread..

 Signature 

EE 2.01PB - 2.x Bug Tracker | Docs | Upgrade from 1.x to 2.x | Build Update Instructions | 1.6.x Update Info

Most recent 2.x version: Build 20100215
Don’t forget to upgrade MSM and Forum as needed!

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120547 Total Logged-in Users: 76
Total Topics: 126600 Total Anonymous Users: 34
Total Replies: 665564 Total Guests: 354
Total Posts: 792164    
Members ( View Memberlist )
Newest Members:  ClarkKentBaoHeredamferDr.JohnRamin.Hossainikreesmheatbluemonstasweeper240andrew n