Upgrade Issue: Parse error: syntax error .../Api.php on line 49

    • 6 posts
    June 4, 2018 8:55 PM EDT

    We got error message at the last step of upgrade:

    Parse error: syntax error, unexpected '[' in .../public_html/application/libraries/Engine/Api.php on line 49.


    I following the instructions for upgrade, applied the patch as we were upgrading from 4.9.2. Patch uploaded successfully, then when installing the Upgrade, after compatibility check and confirm successfully copied files, when click on Continue, at the last step the above error message occurred. The site is down with the message showing up.  

    • 378 posts
    June 4, 2018 11:45 PM EDT

    Do you have 3rd party plugins?

    • 6 posts
    June 5, 2018 12:11 AM EDT

    Yes, we do have 3rd party plugins.

    However, if they cause the error for the upgrade, what would be the process to have successful upgrade?

  • gs
    • 857 posts
    June 5, 2018 12:59 AM EDT

    If you are using either SES' or SEAO's Advanced Feed Plugins, this link might help --> https://community.socialengine.com/forums/topic/518/socialengine-4-10-activity-feed-issues/view/page/2

     

     

     

    • Moderator
    • 6923 posts
    June 5, 2018 6:07 AM EDT

    Yes, please see the thread that gs linked as there can be issues with upgrading when third party plugins modify source files or the default database tables. We recommend only using certified plugins to avoid upgrade issues in the future.

    Also, if your plugins are not updated and you are using PHP 7 (which we recommend to use), then it can cause issues such as you show. Please check with third party experts to ensure your plugins are updated and to ensure they didn't modify the database. If they did modify the database, there were steps you needed to take before the upgrade in order for the upgrade to properly work.

    • 6 posts
    June 5, 2018 2:00 PM EDT

    Donna, 

    Thank you for the suggestions.

    Could you elaborate what steps are required for the database to assure proper upgrade

     

    • Moderator
    • 6923 posts
    June 5, 2018 2:16 PM EDT

    I don't know as we didn't make the plugins and wouldn't have that information but each expert has the steps at their sites. Most released blogs and newsletters for it. They have been very helpful in removing their edits. 

    • Moderator
    • 6923 posts
    June 5, 2018 2:19 PM EDT

    Didn't mean that to sound snotty. We just don't have the info as there are so many changes they could have made and it's just best to not modify source or default tables. Great news is, they've removed those modifications as we told them to.

    • 6 posts
    June 5, 2018 2:24 PM EDT

    Completely understand :-)

    • 348 posts
    June 6, 2018 5:29 AM EDT
    Milen said:

    We got error message at the last step of upgrade:

    Parse error: syntax error, unexpected '[' in .../public_html/application/libraries/Engine/Api.php on line 49.


    I following the instructions for upgrade, applied the patch as we were upgrading from 4.9.2. Patch uploaded successfully, then when installing the Upgrade, after compatibility check and confirm successfully copied files, when click on Continue, at the last step the above error message occurred. The site is down with the message showing up.  

     

    Please check that the version of PHP on your Server is 5.4 or above as in the lower versions of PHP the Array Initialization Construct: [] will not work.  We feel that this problem is coming because of lower version of PHP you are using. Can you share which version of PHP you are using on your end?

    • 6 posts
    June 6, 2018 11:16 AM EDT

    Thank you for the suggestion - we used 5.3.29, which could be the reason for the issue.

    It is now updated to 7.0.30 and will try again.

     

     

  • gs
    • 857 posts
    June 6, 2018 11:22 AM EDT
    https://support.socialengine.com/php/customer/portal/articles/1649350-socialengine-requirements

    minimum PHP 5.6.31

    good catch/suggestion by SEAO
    • 6 posts
    June 8, 2018 1:01 PM EDT

    We are making progress - upgrading to 7.0.30 allowed to run the upgrade successfully, but a new error showed up:

    When upgrading 'Activity' module, the process stops with error message:

    Query failed with error: Mysqli statement execute error : Duplicate column name 'params'

     

    Do you have any idea what might be causing this and how to correct it?

     

    Thank you and bestregards.

     

    • Moderator
    • 6923 posts
    June 8, 2018 1:05 PM EDT

    Please see the forum thread for this in the third party section as this is from third party plugins that modify our default tables in most cases. Actually, that's the only time I can recall seeing that error.

  • gs
    • 857 posts
    June 8, 2018 1:39 PM EDT
    If you're using SES' or SEAO's Activity feed, they have instructions to resolve errors caused by them editing the core tables - contact them to fix the issue(s) they created
    • 629 posts
    June 28, 2018 3:09 AM EDT

    I went through the same error. I contacted Social Engine Technical Support to fix it.