Title: PHP error when adding new platform
Last modified: March 14, 2024

---

# PHP error when adding new platform

 *  Resolved [mauricenl](https://wordpress.org/support/users/mauricenl/)
 * (@mauricenl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/)
 * When I try to add a new platform, I get a PHP error.
   I have installed the following
   plugins:LTI Connector for LearnDashLTI ToolceLTIc 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](https://wordpress.org/support/users/spvickers/)
 * (@spvickers)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056355)
 * 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](https://wordpress.org/support/users/mauricenl/)
 * (@mauricenl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056356)
 * 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 2 years, 8 months ago by [mauricenl](https://wordpress.org/support/users/mauricenl/).
 *  Plugin Author [Stephen P Vickers](https://wordpress.org/support/users/spvickers/)
 * (@spvickers)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056358)
 * Which version of WordPress are you using?
 *  Thread Starter [mauricenl](https://wordpress.org/support/users/mauricenl/)
 * (@mauricenl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056360)
 * 6.3.1 currently, with PHP 8.1.
 *  Plugin Author [Stephen P Vickers](https://wordpress.org/support/users/spvickers/)
 * (@spvickers)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056369)
 * 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](https://wordpress.org/support/users/mauricenl/)
 * (@mauricenl)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056376)
 * 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 2 years, 8 months ago by [mauricenl](https://wordpress.org/support/users/mauricenl/).
 *  Plugin Author [Stephen P Vickers](https://wordpress.org/support/users/spvickers/)
 * (@spvickers)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056384)
 * 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.

 * ![](https://ps.w.org/lti-tool-learndash/assets/icon-256x256.png?rev=2944941)
 * [LTI Connector for LearnDash](https://wordpress.org/plugins/lti-tool-learndash/)
 * [Support Threads](https://wordpress.org/support/plugin/lti-tool-learndash/)
 * [Active Topics](https://wordpress.org/support/plugin/lti-tool-learndash/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lti-tool-learndash/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lti-tool-learndash/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 9 replies
 * 4 participants
 * Last reply from: [Stephen P Vickers](https://wordpress.org/support/users/spvickers/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/php-error-when-adding-new-platform/#post-17056384)
 * Status: resolved