• Resolved nemanteo

    (@nemanteo)


    I have just bought a theme that requires LearnPress and LearnPress – Course Review plugins. The latter activated successfully but LearnPress throws an error “unexpected T_STRING in lp-core-functions.php on line 2269”.

    I’m guessing that the problem might be with the version of Appache server or SQL database. The appache is 2.4.33 and MySQL 5.6.39-cll-lve.

    Could older version of LearnPress solve the problem?

    Best,
    Nemanja

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Ken Nguyen

    (@kendy73)

    Hi Nemanja,

    Please make sure your site is using PHP 5.6 or higher.

    Let me know.

    Thread Starter nemanteo

    (@nemanteo)

    Hi Ken,

    It’s still not working, with PHP 5.6.30.

    The error is in lp-core-functions.php, on the following line:
    add_action( ‘init’, function () {
    learn_press_get_current_profile_tab();

    I’ve tried updating the user profile with some basic info, but nothing changed.

    Thanks in advance for your help.

    Thread Starter nemanteo

    (@nemanteo)

    Hi Ken,

    It’s been almost a month and no solution. I’ve been busy so I just updated the plugin hoping that it will fix the problem, but I still get the same error. Syntax error, unexpected T_FUNCTION on the following line:

    add_action( 'init', function () {
    	learn_press_get_current_profile_tab();

    Can you please help me, I need to set this up quickly?

    • This reply was modified 6 years, 5 months ago by nemanteo.
    Plugin Contributor Ken Nguyen

    (@kendy73)

    add_action( ‘init’, function () {
    learn_press_get_current_profile_tab();
    } );

    Hi nemanteo,

    So sorry for the inconvenience.

    Please replace this code

    add_action( 'init', function () {
    	learn_press_get_current_profile_tab();
    } );

    with this one

    add_action( 'init', 'learn_press_get_current_profile_tab' );

    Try and let me know.

    Thread Starter nemanteo

    (@nemanteo)

    Hi Ken,

    Thanks for the quick response. Unfortunately I didn’t have time to test it before so, this part works, but now I get another error. ??

    Fatal error: Class ‘/home/englishc/public_html/test/wp-content/plugins/learnpress/inc/background-process/class-lp-background-query-items.php’ not found in /home/englishc/public_html/test/wp-content/plugins/learnpress/inc/abstracts/abstract-background-process.php on line 128

    And the line in question is self::$instances[ $name ] = new $name();

    Thank you again for your help.

    Thread Starter nemanteo

    (@nemanteo)

    Hi Ken,

    Sorry for this misunderstanding. Actually, I’ve just realized that the problem was with the version of PHP. Server shows 5.6 but it actually was 5.2 (found out via a WP plugin). Learnpress activated without problem now.

    Thanks for your support and again sorry for the confusion.

    Plugin Contributor Ken Nguyen

    (@kendy73)

    5.2 is too old ??

    Just get the 5.6 or higher, it will be better for your website ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘unexpected T_STRING’ is closed to new replies.