• Resolved mauricenl

    (@mauricenl)


    When I try to add a new platform, I get a PHP error.
    I have installed the following plugins:
    LTI Connector for LearnDash
    LTI Tool
    ceLTIc LTI Library

    The error:
    require_once(/wp-content/plugins/lti-tool-learndash/LTI_Tool_LearnDash_Binary_Selector_Courses.php): Failed to open stream: No such file or directory in wp-content/plugins/lti-tool-learndash/lti-tool-learndash.php on line 219PHP message: PHP Fatal error: Uncaught Error: Failed opening required ‘wp-content/plugins/lti-tool-learndash/LTI_Tool_LearnDash_Binary_Selector_Courses.php’ (include_path=’.’) in wp-content/plugins/lti-tool-learndash/lti-tool-learndash.php:219\nStack trace:\n#0 wp-includes/class-wp-hook.php(310): lti_tool_learndash_config_platform(Array, Object(ceLTIc\LTI\Platform))\n#1 wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)\n#2 wp-content/plugins/lti-tool/includes/AddLTIPlatform.php(80): apply_filters(‘lti_tool_config…’, Array, Object(ceLTIc\LTI\Platform))\n#3 wp-includes/class-wp-hook.php(310): lti_tool_add_platform(”)\n#4 wp-includes/class-wp-hook.php(334): WP_Hook->apply…’

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Stephen P Vickers

    (@spvickers)

    Your system appears to be complaining about a missing file (LTI_Tool_LearnDash_Binary_Selector_Courses.php). This file is present within the plugin’s zip file, so I recommend that you check your server to make sure the file has the correct permissions to be read by the web server account and/or reinstall the plugin to see if that resolves the issue.

    Thread Starter mauricenl

    (@mauricenl)

    Thanks for your reply!

    I’ve fixed it myself to change line 219 into: ? ? require_once(‘LTI_Tool_Learndash_Binary_Selector_Courses.php’);

    Now it works!

    • This reply was modified 1 year, 2 months ago by mauricenl.
    Plugin Author Stephen P Vickers

    (@spvickers)

    Which version of WordPress are you using?

    Thread Starter mauricenl

    (@mauricenl)

    6.3.1 currently, with PHP 8.1.

    Plugin Author Stephen P Vickers

    (@spvickers)

    Thanks. I can’t see what is wrong with this code to cause the issue; does the directory name (“‘wp-content/plugins/lti-tool-learndash”) look wrong for your server? Is an incorrect value being returned by the dirname(__FILE__) reference in that file? It is working fine for me and other users. Thanks.

    Thread Starter mauricenl

    (@mauricenl)

    I have removed part of the direct path because it contained the URL. Interestingly, the direct path as it appeared in the error logs seemed correct, but it still didn’t work. By simply including the file without using FILE, it now works.

    Thank you for your response, explanation, and exceptionally quick reply, and I wish you a great weekend.

    • This reply was modified 1 year, 2 months ago by mauricenl.
    Plugin Author Stephen P Vickers

    (@spvickers)

    Very odd indeed. I will leave this code as-is for now and hope that it was just a temporary aberration.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP error when adding new platform’ is closed to new replies.