• Resolved pozirk

    (@pozirk)


    Hello!

    I have updated to the latest version of Paid Memberships Pro 1.9.5 and my website stop working completely because of this error.

    PHP Parse error: syntax error, unexpected '[' in paid-membership-pro/includes/init.php on line 250

    Any help?
    Thank you!

    • This topic was modified 8 years ago by pozirk.
    • This topic was modified 8 years ago by pozirk.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The API Guys

    (@pbarthmaier)

    Hi there,

    Will need to look into this more closely, but for now, can you try to comment out this line:

    add_filter( 'manage_users_sortable_columns', 'pmpro_sortable_column' );

    That is, put two slashes in front of it like:

    // add_filter( 'manage_users_sortable_columns', 'pmpro_sortable_column' );

    In my file it is line 284 of the paid-membership-pro/includes/init.php

    Thread Starter pozirk

    (@pozirk)

    Well, I’ve commented out some lines to make it work, but would be nice to have permanent fix.
    Thank you!

    The API Guys

    (@pbarthmaier)

    Your issue involves one of the new enhancements that came from a user. We are working on a complete rewrite anyway, so of course it’s in the works. The point here is that you aren’t losing anything by commenting out that line that I suggested. You can rest assured that Paid Memberships Pro will continue to improve AND remain open source.

    c3idesign

    (@c3idesign)

    I have the same exact error.

    PHP Parse error: syntax error, unexpected ‘[‘ in paid-membership-pro/includes/init.php on line 250

    Works after commenting out the lines above.

    • This reply was modified 8 years ago by c3idesign.
    • This reply was modified 8 years ago by c3idesign.
    Thread Starter pozirk

    (@pozirk)

    Commenting out line 284 doesn’t help, because it’s a syntax error.
    So, in my case I have commented out lines 250 and 251.

    • This reply was modified 8 years ago by pozirk.
    Plugin Author Andrew Lima

    (@andrewza)

    I’m really sorry for the issue you are facing here, would you mind telling me what PHP version your site is running?

    I would like to try and recreate this issue on my end.

    Plugin Author Andrew Lima

    (@andrewza)

    We have reviewed this error further and this issue is caused do to older PHP versions being used (below 5.4).

    Currently PHP is on 7.2 and we do recommend in using PHP 5.6 or higher with Paid Memberships Pro.

    Using older versions of PHP may cause Paid Memberships Pro or some of it’s features to fail. I would recommend in contacting your host and asking to upgrade to 5.6 as a minimum – be sure to have a backup in place as well!

    We are going to add some backwards compatibility to this issue in question, but we do recommend in using PHP version 5.6 or higher which will prevent issues like this from happening in the future.

    I hope this helps and clears things up. Have a great day further!

    I also had to comment out 250 and 251. 284 didn’t work for me. I’ll take your advice on contacting my host. Thanks!

    Plugin Author Andrew Lima

    (@andrewza)

    This will affect any sites using PHP 5.3 and less. We do recommend in PHP 5.6 (which should not affect your current site setup and plugins that much as it’s not a major jump between versions.)

    Please keep us posted if updating the PHP version to 5.6 fixes the issue for you.

    Thread Starter pozirk

    (@pozirk)

    Thank you!

    It did fix it for me. Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘PHP Parse error: syntax error…’ is closed to new replies.