WordPress.org

Ready to get started?Download WordPress

Forums

scbFramework
[resolved] Using scbFramework in multiple plugins (3 posts)

  1. gillespieza
    Member
    Posted 1 year ago #

    I have built 2 plugins using the scbFramework and they both work fine individually but I can't activate them both at the same time because I get complaints of can't redeclare scb_init() and such-like. This is fine - I've followed the instructions on the wiki and put the framework folder scb in the root of the plugins directory and the file scb-load.php in the plugin root as well. But now I am having trouble calling the scb-load.php file. I assume that file still needs to be required by the plugins, so instead of

    require dirname( __FILE__ ) . '/scb-load.php';

    I have used

    require_once plugins_url( 'scb-load.php' , dirname(__FILE__) );

    but then I get

    Warning:  require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/gillespieza/mydomain.com/wp-content/plugins/salamander-film-festival/salamander-film-festival.php on line 37
    
    Warning:  require_once(http://mydomain.com/wp-content/plugins/scb-load.php) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/gillespieza/mydomain.com/wp-content/plugins/salamander-film-festival/salamander-film-festival.php on line 37
    
    Fatal error:  require_once() [function.require]: Failed opening required 'http://mydomain.com/wp-content/plugins/scb-load.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/gillespieza/mydomain.com/wp-content/plugins/salamander-film-festival/salamander-film-festival.php on line 37

    From my googling, I understand this is some sort of security issue that is present on certain hosts, and there are various solutions but they all involve contacting your host or changing your php.ini file, and none of these solutions will work for a plugin intended for general release.

    What am I doing wrong, or is there a different way to require the scb-load.php file?

    http://wordpress.org/extend/plugins/scb-framework/

  2. scribu
    Member
    Plugin Author

    Posted 1 year ago #

    I've followed the instructions on the wiki and put the framework folder scb in the root of the plugins directory and the file scb-load.php in the plugin root as well.

    There are two methods of loading the framework described in the wiki. The problem is that you used both.

    Require scb/load.php, instead of scb-load.php.

  3. gillespieza
    Member
    Posted 1 year ago #

    Ah! What a silly mistake - thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.