WordPress.org

Ready to get started?Download WordPress

Forums

Plugin(s) unable to utilize include files (6 posts)

  1. tmcduffie
    Member
    Posted 7 years ago #

    This is an issue that I have encountered while using the Anarchy Media Player v2.0 but believe that it extends beyond this plug-in.

    The player has two different files (anarchy_media_player.php and anarchy-options.php) that attempt to include content from one or more of the four other php files in the dir. One of these is the config.php file that contains all the player options. After installing (FTPing) the files in the plugin dir I went to the options panel in the admin and found that none of the setting for the AMP were loading as a result of the config.php failing to be included. The path to the include file appears to be correct and even fails when given an absolute URL.

    I thought it may be a permissions issue and adjusted the permissions accordingly (755, testes 777, 666, etc) without success.

    At this point i have the plugin installed and activated, but cannot edit the options, cannot see the additional buttons in the WYSIWYG and cannot implement the code manually.

    Anyone have any ideas?

    I'm running WP 2.2 with AMP 2.0 Beta on PHP 5.0.4 and MySQL 4.1.2

  2. whooami
    Member
    Posted 7 years ago #

    what is the url to your blog?

    what is the download url to the plugin?

  3. whooami
    Member
    Posted 7 years ago #

    ive tested v2 on my own wordpress 2.2 install and it works fine..

    I see a tab under options named AMP ...

    I see new buttons under the RTE and the code tabs in the writing area.

  4. tmcduffie
    Member
    Posted 7 years ago #

    I had a similar result whooami, I tested the plugin on a different server again with WP 2.2 and AMP 2.0 and it worked fine. Thats why I am stumped on this one.

    Based on the above differences i'm assuming that its something having to do with either the server setup or permissions, neither of which are my areas of expertise. Is there something else that would prevent php includes within a specific dir?

    if there's any other information i can give please let me know.

    the player URL is at http://an-archos.com/anarchy-media-player

    the blog I setting up is currently located at http://instituteforhigherlearning.com/

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    The path to the include file appears to be correct and even fails when given an absolute URL.

    Wait, a URL? As in http: something? You can't do that. The include is a local include, it needs the local path of the file.

    You cannot include PHP over http. Well, okay, you can, but not in the way you're thinking. Use the local path.

  6. tmcduffie
    Member
    Posted 7 years ago #

    ok well that would explain why testing with an absolute path didn't work... maybe the issue is with the path of the file being included?

    the initial install has all the files in one path (/wp/wp-content/plugins/anarchy_media/) and the includes reference them using the path local to the files.

    ex from anarchy_media_player.php in its original (and current) state:

    require_once(dirname(__FILE__).'/../../../wp-config.php');
    include_once('config.php');
    include_once('autohyperlink-urls.php');
    include_once('wysiwyg.php');
    global $wp_db_version;
    if ( 3664 >= $wp_db_version) {
    	include_once('buttonsnap.php');
    }
    load_plugin_textdomain('anarchy',$path = 'wp-content/plugins/anarchy_media');

    and from anarchy-options.php

    }
    
    /************************ Load config for form fields ************************/
    
    include('config.php');
    
    /************************ Write options page ************************/
    
    ?>

    As i mentioned above, on one server these includes work just fine, and on the other they do not.

Topic Closed

This topic has been closed to new replies.

About this Topic