• Hi,

    I noticed in my php error log today the following messages:
    Warning: No such file or directory in /var/www/docs/commonFiles/wordpress_svn/4.3/wp-includes/functions.php on line 4423
    Warning: fread() expects parameter 1 to be resource, boolean given in /var/www/docs/commonFiles/wordpress_svn/4.3/wp-includes/functions.php on line 4426
    Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/docs/commonFiles/wordpress_svn/4.3/wp-includes/functions.php on line 4429

    After backtracing I found it was coming from this plugin on this line
    slider.php line #2016
    $plugin_info = get_plugin_data( ABSPATH . ‘wp-content/plugins/slider-image/slider.php’ );

    The easiest solution is to use the __FILE__ magic constant since this file is attempting to read its own meta data like so:

    $plugin_info = get_plugin_data( __FILE__ );

    The reason this is happening is because as per wordpress spec the wordpress core installation can be installed in any folder structure you wish instead of the default where wp-include wp-admin and wp-content all exist in the same folder.
    For instance we have this setup:
    wordpress/wp-include
    wordpress/wp-admin
    wp-content/
    this means that ABSPATH resolves to wordpress/ and thus wp-content/plugins/slider-image/slider.php cannot be found.

    Recommend checking elsewhere in the plugin to make sure other assumptions about the file paths of the plugins folder don’t trip other users up.

    Thanks for your attention.
    — Relevad Corp

    https://ww.wp.xz.cn/plugins/slider-image/

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

The topic ‘Plugin causes error when wordpress installed in unusual directory’ is closed to new replies.