• Resolved powersurge

    (@powersurge)


    I spent an entire night trying to figure out why one of my websites started having issues and I narrowed it down to the following line that got added to my wp-config.php by the wp-hide pro plugin:

    include_once( ( defined(‘WP_PLUGIN_DIR’) ? WP_PLUGIN_DIR . ‘/wp-hide-security-enhancer-pro/’ : ( defined( ‘WP_CONTENT_DIR’) ? WP_CONTENT_DIR : dirname(__FILE__) . ‘/’ . ‘wp-content’ ) . ‘/plugins/wp-hide-security-enhancer-pro’ ) . ‘/include/wph.class.php’);

    As soon as I commented it out, everything was working fine again. Is it possible to do a require_once to the wp-config.php file with wp-hide installed and activated?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Maya

    (@tdgu)

    Hi,
    Sorry for the issue, this should work fine.
    But which is the exact issue you encounter? Using a require_once instead include_once will not make a difference, it will just throw an error instead of a warning if the plugin file is not being found.

    Thanks

    Thread Starter powersurge

    (@powersurge)

    Hi,
    Well the issue that I am running into is that I have another plugin with this line in the code:

    require_once(‘/path/to/wp-config.php’);

    This other plugin will not work unless I comment out the line that was added to wp-config.php by this plugin. How can I make it so that both plugins will work?

    Thank you!

    Thread Starter powersurge

    (@powersurge)

    The following response that I received from the contact form fixed the problem I was having:

    There is an easy approach to this, try to wrap the wp-hide code within the wp-config.php as follow:

    if ( ! defined (‘DISABLE-WPH’ ) ) {

    # BEGIN WP Hide & Security Enhancer
    define(‘WPH_WPCONFIG_LOADER’, TRUE);
    include_once( ( defined(‘WP_PLUGIN_DIR’) ? WP_PLUGIN_DIR . ‘/wp-hide-security-enhancer-pro/’ : ( defined( ‘WP_CONTENT_DIR’) ? WP_CONTENT_DIR : dirname(__FILE__) . ‘/’ . ‘wp-content’ ) . ‘/plugins/wp-hide-security-enhancer-pro’ ) . ‘/include/wph.class.php’);
    if (class_exists(‘WPH’)) { global $wph; $wph = new WPH(); ob_start( array($wph, ‘ob_start_callback’)); }
    # END WP Hide & Security Enhancer

    }

    then on your file, where you call the wp-config.php add the following line, right before (the require_once line):

    define( ‘DISABLE-WPH’, TRUE );

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Require_once to wp-config.php doesn’t work with WP-Hide Pro plugin Installed’ is closed to new replies.