Support

Site Restoration

#15718 Can't restore to local MAMP server

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by nicholas on Thursday, 11 April 2013 12:46 CDT

duanemitchell
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 2.5.9
PHP version: 5.3.6
MySQL version: 5.5.9
Host: localhost MAMP
Akeeba Backup version which took the backup: 3.7.4
Kickstart version used to extract the backup: 3.6.0

Description of my issue: I cannot restore any of my backups to my local MAMP server. I often do this to test the backup of client sites and it no longer works. The Kickstart runs normally with no errors reported. I get a 400 error on my front page and a 500 error for the administrator page. I've tested two sites and neither work.

Thank you.

Duane Mitchell

nicholas
Akeeba Staff
Manager
A white page or a page with a 500 Internal Server Error is, in fact, either a .htaccess issue to a PHP fatal error in disguise.

First, let's see if it is a .htaccess issue. Try renaming the .htaccess file in your site's root to htaccess.bak If there is a .htaccess file in the site's administrator directory, try renaming it as well. If that solves the problem, the issue was with a directive in your .htaccess file. We'd like to recommend you to try removing directives from your .htaccess until you find the one which causes the problem.

If that doesn't help, the error you are receiving is in fact a PHP error in disguise. First, check your server's error logs (not the access logs) immediately after visiting the page which throws the error. There should be an exact description of the PHP fatal error which occurred. Sometimes you can find the error messages in files called error_log or error.log inside the site's root and/or administrator directories. If unsure about the error log location, please consult your host. Most likely the error logs are available in your site's cPanel, Plesk control panel or similar hosting account management facility.

If your host does not give you access to the error logs and you have access to the Joomla! administrator area, please log in to your site's back-end, go to Global Configuration, click on the Server tab and set the Error Reporting to Maximum (Joomla! 1.5) or Development (Joomla! 2.x and later). Try visiting the problem page again.

If you still get a blank page, edit your configuration.php file and put the following code right after the final closing curly brace ( this is what a curly brace looks like --> } ) but before the closing PHP tag (it looks like ?> that is a question mark and a greater-than sign):
ini_set( 'display_errors', true );
error_reporting( E_ALL ); 
Try visiting the problem page again.

If you still get a white page, please remote the two lines from your configuration.php file. Edit the .htaccess file in your site's root. If you don't have a file named .htaccess create a new one. Beware that htaccess.txt is a DIFFERENT FILE and will NOT work! Add the following to the end of the file:
php_flag display_errors On
php_value error_reporting 32767
and retry loading the problem page.

If you still get a white page, remove the two lines from your .htaccess file. Now, create a file called php.ini with the following content:
display_errors=on
error_reporting=E_ALL
and upload it into your site's root and your site's administrator directory. Retry loading the problem page.

IMPORTANT: Sometimes the error won't show. Edit your configuration.php and find the line starting with public $error_reporting and set it to:
public $error_reporting = 'development';

This instructs Joomla! to enable maximum error, warnings and notices verbosity. In 99.9% of cases it will result in the error messages being shown on the browser.

If you still get a white page, delete the php.ini files your created and choose a different host. If your host doesn't allow you to debug any PHP-related issues there is no point paying them.

Please note that if you can not understand what the PHP error message means, just copy and paste it here verbatim so that we can take a look and point you to the right direction.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
I tried renaming the .htaccess to htaccess.bak and that did not work. I thought that would be it.

I am installing on a local MAMP server so some of your response does not apply. I tried to install (restore) a backup and that yielded a partial home page and no admin page. I reinstalled a few times and then tried another site that I had backed up today. That second site shows a white page on the home page and a 500 error on the admin page.

I fixed the first one by going into configuration.php and changing the live site variable to '' as in:

public $live_site = '';

Removing the URL to the live site fixed it. I also had the admin directory password protected so I changed the .htaccess file to htaccess.bak and that fixed that. So that site is working fine.

Now the second site. I went into the admin folder and renamed the .htaccess as above. Now this site is showing a white page for both the homepage and the admin page. I am using Admin Tools on this site and it has a secret word on the admin URL so I know there is some redirecting going on.

I could not find anything in the logs.

Duane Mitchell

nicholas
Akeeba Staff
Manager
Hello Duane,

The part in my instructions talking about adding the two lines in the configuration.php is known to work on MAMP (I am a Mac user myself and do use MAMP,among other packages, for local development). when you try that on the second site don't you see anything? If not, please also set public $error_reporting = 'development'; inside the configuration.php file. This always leads to the error messages showing up. If not on the browser, at least in the logs. That's the simplest and quickest way I debug my software locally and I've yet to see a case where an error message is not recorded either in the browser or the error log file of MAMP this way.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
OK, sorry I didn't read your reply thoroughly. I guess I got too excited when I got on problem solved.

I added the lines to my configuration.php file and am getting some output. 4 "Notices", 1 "Warning", and 1 "Fatal Error". Here is the fatal error:

Fatal error: Call to a member function get() on a non-object in /Applications/MAMP/htdocs/NextGenerationSolutions/templates/beez_20/index.php on line 119

I don't get a fatal error on the admin page but I can't log in either.

Well this is odd, none of the user tables got created. Hmmm.

Duane Mitchell

nicholas
Akeeba Staff
Manager
Can you try taking a new backup and restoring it on your site? Do you get the missing tables created this time?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
I just did a fresh backup. I have 104 tables on my live site but only 86 seem to be getting backed up. Same as the previous backup.

Duane Mitchell

nicholas
Akeeba Staff
Manager
Hello Duane,

Can you please try installing the latest dev release and retry taking a backup? I'm quite sure the dev release works just fine. It is able to successfully restore this site's database with over 130 tables.

If this doesn't work, you have a stuck installer session. That's easy to fix. In the installer's first page please click on the red "Start over" button at the top. This kills all the saved installer session data and re-reads the list of database files to restore, fixing the problem you are reporting.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

duanemitchell
I installed the DEV version you linked to and this time I got the following error. I also tried the "Start Over" button and it also yielded the same error.

JSON.parse: unexpected non-whitespace character after JSON data
{"percent":0,"restored":0,"total":0,"eta":0,"error":"Invalid database key","done":1}{"percent":0,"restored":0,"total":"204 b","eta":"\u2013\u2013\u2013","error":"","done":0}

I notice that the Advanced Options have nothing configured. No prefix and none of the checkboxes are selected. That's not usual for me.

duanemitchell
It doesn't seem to see the database. At the database restoration page is shows:

Restoration of «»

nicholas
Akeeba Staff
Manager
Yes, in the meantime I discovered this issue myself. Sorry about that. I am publishing a new dev release right now.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!