Support

Site Restoration

#26852 HTTP 500 Errors after Restore

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 dlb on Tuesday, 10 January 2017 08:23 CST

slomas
Nicholas,

I'm getting the ubiquitous HTTP 500 white screen error upon restoring a backup. Using your basic troubleshooting guide I have ascertained that the issue is a PHP error:

[09-Jan-2017 18:28:19 UTC] PHP Fatal error: require_once(): Failed opening required '/home/uccgsaqi/public_html/libraries/platform.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/uccgsaqi/public_html/libraries/import.legacy.php on line 42

Here are lines 39-43 of import.legacy.php:

// Import the platform version library if necessary.
if (!class_exists('JPlatform'))
{
require_once JPATH_PLATFORM . '/platform.php';
}

So it would seem that a key resource is not being found. If I am interpreting this correctly, it seems to have to do with finding legacy PHP code libraries.

Curious if updating PHP to 7.0 would make any difference. We are running this on other sites.

CONTEXT
Some background as to why we needed to restore in the first place....

We were doing routine updates to Joomla 3.6.5 for our clients. All went smoothly, except one; the site in question. We kept getting an error right after the automated Akeeba backup and just before the actual installation of Joomla. The error message stated: "Invalid Login"

Did some reading up and several theories suggested it may be related to AdminTools or AkeebaBackup. Disabled both and that did not improve the situation, so, I re-enabled your software.

Then I read a post that suggested that the database might need repair. Using the Joomla Admin: Extensions/Mange/Database, I discovered there were three errors listed so I clicked the FIX button which immediately took the site down; resulting in an HTTP error 500.

Steps taken thus far:
I wiped the public_html directory clean, extracted an Akeeba backup file there and ran the installer, overwriting the database. The installed proceeded as expected but when it completed, was still getting an HTTP error 500. I have tried two different backups and even installed into a new database, with the same results.

The only three recent backups on the server were created in the process of the failed Joomla updates on Jan08, 2017, so I'm wondering if they may be suspect.

Really stuck here.
Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
Does /libraries/platform.php exist on the restored site?

You are doing the restore on the same server as the site was on before, right? Hosts sometimes take it upon themselves to delete suspicious files from your site to help you. But if it worked before, I would not expect any change in the restored site.


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)

slomas
Thanks for the quick response.

platform.php did not exist in the the most recent backups, nor does it exist in the Joomla 3.6.5 full package.

I was able to find platform.php from an older backup, so I uploaded platform.php to /libraries/ and the site came to life.

The site seems to be functional, but I'm suspect about it's current stability. Nonetheless, I immediately backup the site and DL's that back to my local machine.

I then ran the AdminTools Repair and Optimise Tables feature. Backing up again.

Visiting Extensions/Manage/Databases I found these errors listed:

  • Database schema version (3.6.0-2016-06-05) does not match CMS version (3.6.3-2016-08-16).
    Database update version (3.6.5) does not match CMS version (3.6.0).
    Table 'xap53_newsfeeds' does not have column 'link' with type VARCHAR(2048). (From file 3.6.3-2016-08-15.sql.)
    The Joomla! Core database tables have not been converted yet to UTF-8 Multibyte (utf8mb4).


Given the fact that the FIX Button blew up the site the last time, I am reluctant to click it indiscriminately this time.

Any recommendations for how best to proceed?
Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
No, I don't think Fix Tables will help. Did you restore an older version of Joomla! over a newer version? That's what it looks like, the files version is older than the database version. Let's install 3.6.5 and see if we can get everything on the same version number.


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)

slomas
To answer your question, I didn't intensionally install an older version of Joomla! over a newer version. As I mentioned in the context notes, the Joomla update failed midstream, immediately after Akeeba backed up the site, displaying the error message "invalid login".

I tried this several times, each time Akeeba dutifully backed up the site. In the process, I think site became a Frankenstein. ;-)

As for updating to Joomla 3.6.5, I can do that, but am wondering if I need to approach this manually, given it wasn't working before?

For example, one of the methods listed here:
https://docs.joomla.org/J3.x:Upgrading_from_Joomla_3.4.x_to_3.5

Thoughts?

Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
I'm sorry I wasn't clear. Yes, that is what I had in mind.


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)

slomas
Great. I will give it a shot. One last question, however, I notice that these methods all rely on the Database FIX button after the files are in place to update the database. Any reason to believe this will work? ;-)
Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
The button they are talking about is part of Joomla! core, not part of Admin Tools. They are doing different things. The button they are talking about is going to run a script to incorporate changes in the database structure. The Admin Tools function works at the MySQL level to do database repairs and optimization. You need to do the Joomla! Fix Database after you do the upgrade. Otherwise the proper update script won't be in place.


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)

slomas
Thanks, Dale.

Maybe I wasn't clear, but it was the Joomla Core FIX database button that blew up the site when I tried to fix these db issues originally.

Thinking my best course of action is:
1) Have my host restore from their backup last week
2) Grab an Akeeba backup of the site once it has been restored.
3) Install a staging version to experiment with :-)
4) Review the database issues and FIX using the Joomla CORE Fix Database button before trying to update
5) Use AdminTools to Repair and Optimise Tables (Perhaps this should be step 4?)
7) If successful; take another Akeeba Backup
8) Run Joomla Updater per Normal to see it updates correctly
9) if step 8 fails, wipe out staging, reinstall backup and try one of the manual approaches previously discussed

Let me know if you have anything to add, or whether or not you think there is a preferred order to steps 4 & 5.

Thanks!
Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
Yes, please switch #4 and #5. Other than that, it looks like a good plan!


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)

slomas
Thanks!
Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
You're welcome! Please let me know if I can be of any further help.


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)

slomas
Dale,

Starting with the site our web host restored for us, and knowing there was a dbase issue before I tried to upgrade, I was able to repair the dbase as we discussed and then successfully upgrade to J3.6.5.

Thank you for the great support!

Best, SL
Steve Lomas | Idea Mechanic | MojoMediaPros

dlb
You're welcome, I'm glad you got it working!


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)

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!