Issue with the migration tool

Permalink
Hey guys, I need to migrate from 5.6.3.5 to 5.8.3 so that we can update our server to PHP 7.2 but am having some issues.

I'm getting to following error when trying to open the migration tool on my version 5.6.3.5 site:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/crimsonn/public_html/packages/migration_tool/controllers/dashboard/migration/export.php on line 65
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/crimsonn/public_html/packages/migration_tool/controllers/dashboard/migration/export.php on line 65
Parse error: syntax error, unexpected T_STRING in /home/crimsonn/public_html/packages/migration_tool/controllers/dashboard/migration/export.php on line 65

Line 65 of export.php is:
print \ForceUTF8\Encoding::toUTF8(trim($xml));


Also, I can do a fresh install of C5 (version 8.3.2) via my hosting control panel, but would I be able to install it to a temporary sub-domain whilst I sort out the migration and then delete the legacy version of my site and move the new 8.3.2 installation over to the main domain?

Cheers!

 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
As an alternative strategy, you could also look at installing the prospective 5.6.4 from GitHub.
https://github.com/concrete5/concrete5-legacy/pull/1955...

Its a port of c5.6 to run on php7. Its good on php7 and php7.1. Was a thumbnail bug on php7.2 as perhttps://github.com/concrete5/concrete5-legacy/issues/1972...

Its being used reliably on many 5.6 sites. You will need to check addon compatibility withphp7. Some, such as eCommerce, may require some fixes
http://www.concrete5.org/community/forums/legacy-version-5-6-x/hack...

Upgrade to 5.6.3.5 first, then simply /concrete directory in the upgrade or in the core and adjust the pointer in config/site.php.
crimsonnight replied on at Permalink Reply
Oh great, that seems a lot easier, thanks! So I'm on 5.6.3.5 and have downloaded concrete5-legacy-b2a1d2a91149bd2868bf4ff3bac5d8f081a701bb.zip. How exactly do I install it safely (ie so that it's a seamless transition)? Thanks again!
JohntheFish replied on at Permalink Reply
JohntheFish
The database is the same, so actually running an upgrade isn't important. You have some options on how to use the new code:

1. You can just swap the main /concreet directory for the one in the zip from github. If you have run previously run an update, you will need to find the update pointer line at the end of config/site.php and remove it.

2. If you have run previously run an update, you can find the /concrete directory in the relevant part of /updates and swap it for the one in the zip.

3. You can create a new subdirectory beneath /updates, then find the update pointer line at the end of config/site.php and change it to refer to the new directory you created.

All of the above work. I prefer 1 because it gives me a chance to clear out a lot of redundant code at the same time.

The only part of the zip you need in /concrete. The rest is only needed for fresh installs and can be thrown away.
crimsonnight replied on at Permalink Reply
Hi John, thanks again, I've tried all 3 methods but I can't get it to work, I'm just getting the 'HTTP ERROR 500' error even when trying to use the hacked version on PHP 5.2 - any idea what could be going wrong? Thanks
JohntheFish replied on at Permalink Reply
JohntheFish
Is there anything more about the error in the apache or php logs?

What can go wrong:
- the new /concrete dir is in the wrong place
- the pointer in /config/site.php is wrong
- wrong zip extraction
- wrong zip downloaded from github
- too much extracted, so more than just /concrete has been patched
- some people put the whole site in a dir called /concrete, so you have /concrete/concrete and that confuses things.
crimsonnight replied on at Permalink Reply
Hey, thanks for your continued support, I'm really keen to get this resolved asap as we need the server on PHP7 for our primary project.

Just to make sure I've gone through all the steps correctly:
- the new /concrete dir is in the wrong place
I've placed the folder in 'updates' and have renamed it to 'concretePHP7'
- the pointer in /config/site.php is wrong
The pointer is set to: <?php ?><?php //?><?php ?><?php define('DIRNAME_APP_UPDATED', 'concretePHP7');?>
- wrong zip extraction
From the zip file I took the 'web/concrete' folder
- wrong zip downloaded from github
This is the zip I downloaded:https://github.com/concrete5/concrete5-legacy/pull/1955...
- too much extracted, so more than just /concrete has been patched
Only took the 'concrete' folder, haven't unzipped anything else
- some people put the whole site in a dir called /concrete, so you have /concrete/concrete and that confuses things.
I've checked and that isn't the case + I know it's picking up the pointer in site.php as I get the HTTP ERROR 500 error when I switch the pointer from 'concrete5.6.3.5_remote_updater' to 'concretePHP7'

Sorry, how to I access the apache/PHP logs?
JohntheFish replied on at Permalink Reply
JohntheFish
Sounds like you have the code and pointers sensibly configured. As a quick double check, have a look inside the /concrete directory of your last update and also inside the /concrete directory for php7 and check the first level of subdirectories are the same, then look all the way down through a few directories and confirm all .php files are present.

As you uploaded this manually, another possibility could be file/directory permissions and ownership. Sometimes the FTP account has a different owner to the Apache username, so your uploaded files may not be accessible. So check ownership and permissions on the directories you examine above.

Have any of your previous updates been manual via FTP, or were they all through the dashboard? (ie, is this the first time you have attempted a completely manual update?)

The location of log files depend on your host. If you cant find them through your host control panel, check with their support desk.
crimsonnight replied on at Permalink Reply
Got it working on 7.1! I checked out the contents of the update folders and it turns out you don't just copy the concrete directory, the index file within that folder needs to be on the same level as the folder, moving it fixed it! It's not working at all on 7.2 but 7.1 is good enough for what we need - there seems to be a few errors which I'll look into when I have a bit of time, but overall it all appears to be ok so thanks again :)
JohntheFish replied on at Permalink Reply
JohntheFish
If you find any php7.2 incompatibilities in that core, plese post them on the github thread or start a new issue on 5.6 github.

Incompatibilities in addons, try the addon developer, but you may need to resolve them for yourself.

If you do end up fixing php incompatibilities in an addon, please start a forum thead and post details, like I did for eCommerce.
crimsonnight replied on at Permalink Reply
Hi John,

I'd be happy to help out but I can't get my site to load at all on 7.2, I'm just getting the standard 'HTTP ERROR 500' message. I'm happy to make a note of the issues I've found running it on 7.1 though if it'd help? The biggest one being that the dashboard panel (bar at the top) isn't loading in at all meaning that I'm unable to make any edits - to access the dashboard I have to go tohttp://crimsonnight.com/index.php/dashboard/.... On my dashboard there are alerts regarding the 'skybluesofa_social_share' plugin but generally I haven't noticed anything not functioning on my site.

Cheers
JohntheFish replied on at Permalink Reply
JohntheFish
Others using the 5.6.4 core get further than a 500 message. You need to get a lot further to discover there is a php internal bug in file uploads ;-)

With php 7.1 I suspect there are issues with addons, themes and non-core code. Many of us have sites running successfully on php7.0 and 7.1. For php7.2 to date, only the upload issue is pending on github.

There may also be problems lurking with uses of mcrypt, deprecated in php7.2.

You could try enabling the debug to browser setting in the dashboard. You could also do a quick swap back to Greek Yogurt to see if it is theme related.