Support

Site Restoration

#24884 After Backup I Cannot Access Backend, Frontend Works Fine

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 on Saturday, 07 May 2016 17:20 CDT

user85410
 I often download backups of many of the websites I run and instal them locally to test updates for plugins. I cannot EVER get them working properly. The restore process runs smoothly, I run the clean up. Visit the sites front end, fine. When I visit the sites backend, I get a 500 error.

I have read numerous troubleshooting pages on this site all ranging from htaccess issues to configuration.php issues. I have tried them all, nothing works.

user85410
After a few attempts yielding the same results. I now have the very same issue on the backend, only the frontend now is prompting me to download a file.

dlb
On the back end: Are you using the administrator password protection on your live site? That feature does not travel well to a new server because the .htaccess file has a fixed path to the .htpasswd file. You can delete those two files in the /administrator folder.

The prompt to download a file is suspicious. I can't think of any legitimate reason the site would do that.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user85410
I do not, but I do use the backend secret parameter. Disabling admin tools and using a fresh htaccess from a joomla instal doesnt seem to solve the issue.

dlb
Disabling Admin Tools and using a fresh .htaccess tells us one of two things:[*]
  1. The problem is not caused by Admin Tools or
  2. You have the Joomla! cache enabled, or your host has a site level cache enabled, and the changes you are making are not being reflected immediately. If this is a local WAMP, MAMP, LAMP, etc. server, this is not very likely.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user85410
It only occurs when I restore to a localhost. I am using MAMP. I use Akeeba Backup and AdminTools for about 7 sites we manage, they all do the same thing when restored to a local host to test for component/Joomla updates.

dlb
Can you check your local server error log to see what is triggering the 500 error? That should tell us where to go to fix it.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user85410
It states "Invalid command 'SecFilterEngine', perhaps misspelled or defined by a module not included in the server configuration" when accessing localhost:####/rootfolder/administrator.

Accessing the frontend prompts a download and triggers no error in the console logs. Renaming the ".htaccess" file to "htacces.txt" has solved this issue. I am now able to access the front end.

dlb
The error didn't help me but Nicholas knew the answer right away. You have a mod_security2 directive in your .htaccess file for your live site. You don't have mod_security2 installed on your MAMP server, so it throws the 500 error. He thinks you have something like this:
SecFilterEngine Off
SecFilterScanPOST Off
But is should be enclosed in an IF statement so it works on your local server too. Like this:
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>
You can find more information here: http://stackoverflow.com/questions/12928360/how-can-i-disable-mod-security-in-htaccess-file.

I do not have any help for you on the file it wants to download. Be careful, that makes me very nervous. I can't think of any legitimate reason that would happen.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user85410
I placed that code in the .htaccess file inside the administrator folder, not the root then renamed the main.php file in the system>plugins>admintools folder to main-disable.php.

I am now able to access the frontend and login to the backend with no problems whatsoever. Thank you very much for your help.

dlb
You can use that .htaccess code in your live site as well. That way the next time you move your sites to your MAMP server they will just work.

Renaming main.php disables Admin Tools completely. But there is no reason that Admin Tools would want to download a file from the front end. It would give you an option to download and install the GeoIP plugin and update the GeoIP data, but those are prompts, it does not do that automatically. Both of those prompts would be in the back end, on the Admin Tools main page.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user85410
The download prompt was an issue with the .htaccess in the root folder, as soon as I renamed it to htaccess.txt, the download prompt was no longer and I was able to access the frontend.

dlb
More psychic support from Nicholas:
Regarding the download file vs run, there is a legitimate reason – also in .htaccess. An AddHandler directive used on his live site to enable a newer version of PHP (e.g. PHP 5.6) is causing the problem on the local server. MAMP has very different expectations on the second part of AddHandler than live hosts. He could put that AddHandler directive inside the previous <IfModule> (which only runs on his live host), fixing this issue.

Note that both .htaccess changes should be made on the live site so that future backups include them. Therefore, restoring future backups would not require mucking around with .htaccess.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

user85410
Incredibly useful information!! Thank you so much.

dlb
You're welcome!


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!