Home > Computer e tecnologia > [Risolto] – Errore fatale con il plugin di WordPress – MyEasyBackup.

[Risolto] – Errore fatale con il plugin di WordPress – MyEasyBackup.

Oggi vediamo un bug che blocca completamente la visualizzazione del vostro sito wordpress, trattandosi un errore fatale che blocca il completamento del caricamento della pagina. Si verifica se avete attivo  il plugin MyEasyBackup, dopo aver fatto un backup/importazione del database in locale (e forse può capitare anche online se si cambia cartella)

L’errore mostrato a schermo è simile a questo;

L’esecuzione dello script è stata fermata:require_once() [function.require]: Failed opening required ‘I:/EasyPHP/www/wp-content/plugins/myeasybackup/inc/class.php5.addDir.php’ (include_path=’.;I:\EasyPHP\www\;’) — 64

In pratica non riesce a trovare un file e si blocca. Ciò avviene se avete il vostro sito non nella cartella base del vostro spazio/dominio. Io avendo in locale diversi siti, li ho in sottocartelle del server virtuale di EasyPhp. Lo script non considera le sottocartelle e quindi cerca il file nella posizione sbagliata.

Per risolverlo basta cambiare1 sola riga. Aprite il file meb-config.php in  [cartella base dell’installazione di wordpress/wp-content/plugins/myeasybackup/meb-config.php

Alla riga 110 troverete questa riga:

 define(‘MEBAK_PATH’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/plugins/myeasybackup/’ );

basta sostituirla con questa:

//    define(‘MEBAK_PATH’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/wp-content/plugins/myeasybackup/’ );
define(‘MEBAK_PATH’, dirname(__FILE__) . ‘/’); //  Risolve un bug locale

Ho commentato ( con il doppio slash) la vecchia istruzione errata, e ne ho aggiunta una nuova nella riga sotto, commentando anche con ” Risolve un bug locale”.

Spero vi sia stato utile.

Have fun !

 
 

 

 

 

 

  1. novembre 27, 2015 alle 7:33 PM

    Ciao! io ho lo stesso problema con un altra plugin.
    WPBakery Visual Composer mi da sempre Errore Fatale:

    Warning: require_once(/home/iq1c0em1/public_html/cinderellanails.it/wp-content/plugins/js_composer/include/helpers/helpers_factory.php): failed to open stream: No such file or directory in /home/iq1c0em1/public_html/cinderellanails.it/wp-content/plugins/js_composer/js_composer.php on line 158

    Fatal error: require_once(): Failed opening required ‘/home/iq1c0em1/public_html/cinderellanails.it/wp-content/plugins/js_composer/include/helpers/helpers_factory.php’ (include_path=’.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php’) in /home/iq1c0em1/public_html/cinderellanails.it/wp-content/plugins/js_composer/js_composer.php on line 158

    __________
    il php è js_composer/js_composer.php:

    setPaths( array(
    ‘APP_ROOT’ => $dir,
    ‘WP_ROOT’ => preg_replace( ‘/$\//’, ”, ABSPATH ),
    ‘APP_DIR’ => basename( $dir ),
    ‘CONFIG_DIR’ => $dir . ‘/config’,
    ‘ASSETS_DIR’ => $dir . ‘/assets’,
    ‘ASSETS_DIR_NAME’ => ‘assets’,
    ‘AUTOLOAD_DIR’ => $dir . ‘/include/autoload’,
    ‘CORE_DIR’ => $dir . ‘/include/classes/core’,
    ‘HELPERS_DIR’ => $dir . ‘/include/helpers’,
    ‘SHORTCODES_DIR’ => $dir . ‘/include/classes/shortcodes’,
    ‘SETTINGS_DIR’ => $dir . ‘/include/classes/settings’,
    ‘TEMPLATES_DIR’ => $dir . ‘/include/templates’,
    ‘EDITORS_DIR’ => $dir . ‘/include/classes/editors’,
    ‘PARAMS_DIR’ => $dir . ‘/include/params’,
    ‘UPDATERS_DIR’ => $dir . ‘/include/classes/updaters’,
    ‘VENDORS_DIR’ => $dir . ‘/include/classes/vendors’,
    ) );
    // Load API
    require_once $this->path( ‘HELPERS_DIR’, ‘helpers_factory.php’ );
    require_once $this->path( ‘HELPERS_DIR’, ‘helpers.php’ );
    require_once $this->path( ‘CORE_DIR’, ‘interfaces.php’ );
    require_once $this->path( ‘CORE_DIR’, ‘class-vc-sort.php’ ); // used by wpb-map
    require_once $this->path( ‘CORE_DIR’, ‘class-wpb-map.php’ );
    require_once $this->path( ‘HELPERS_DIR’, ‘helpers_api.php’ );
    require_once $this->path( ‘HELPERS_DIR’, ‘filters.php’ );
    require_once $this->path( ‘PARAMS_DIR’, ‘params.php’ );
    require_once $this->path( ‘AUTOLOAD_DIR’, ‘vc-shortcode-autoloader.php’ );
    require_once $this->path( ‘SHORTCODES_DIR’, ‘shortcodes.php’ );
    // Add hooks
    add_action( ‘plugins_loaded’, array( &$this, ‘pluginsLoaded’ ), 9 );
    add_action( ‘init’, array( &$this, ‘init’ ), 9 );

    register_activation_hook( __FILE__, array( $this, ‘activationHook’ ) );
    }

    /**
    * Get the instane of VC_Manager
    *
    * @return self
    */
    public static function getInstance() {
    if ( ! ( self::$_instance instanceof self ) ) {
    self::$_instance = new self();
    }

    return self::$_instance;
    }

    /**
    * Cloning disabled
    */
    private function __clone() {
    }

    /**
    * Serialization disabled
    */
    private function __sleep() {
    }

    /**
    * De-serialization disabled
    */
    private function __wakeup() {
    }

    /**
    * Callback function WP plugin_loaded action hook. Loads locale
    *
    * @since 4.2
    * @access public
    */
    public function pluginsLoaded() {
    // Setup locale
    do_action( ‘vc_plugins_loaded’ );
    load_plugin_textdomain( ‘js_composer’, false, $this->path( ‘APP_DIR’, ‘locale’ ) );
    }

    /**
    * Callback function for WP init action hook. Sets Vc mode and loads required objects.
    *
    * @since 4.2
    * @access public
    *
    * @return void
    */
    public function init() {
    do_action( ‘vc_before_init’ );
    $this->setMode();
    do_action( ‘vc_after_set_mode’ );
    /**
    * Set version of VC if required.
    */
    $this->setVersion();
    // Load required
    ! vc_is_updater_disabled() && vc_updater()->init();
    /**
    * Init default hooks and options to load.
    */
    $this->vc()->init();
    /**
    * if is admin and not front end editor.
    */
    is_admin() && ! vc_is_frontend_editor() && $this->asAdmin();
    /**
    * if frontend editor is enabled init editor.
    */
    vc_enabled_frontend() && vc_frontend_editor()->init();
    // Load Automapper
    vc_automapper()->addAjaxActions();
    do_action( ‘vc_before_mapping’ ); // VC ACTION
    // Include default shortcodes.
    $this->mapper()->init(); //execute all required
    do_action( ‘vc_after_mapping’ ); // VC ACTION
    // Load && Map shortcodes from Automapper.
    vc_automapper()->map();
    do_action( ‘vc_after_init’ );
    }

    /**
    * Enables to add hooks in activation process.
    * @since 4.5
    */
    public function activationHook() {
    do_action( ‘vc_activation_hook’ );
    }

    /**
    * Load required components to enable useful functionality.
    *
    * @access public
    * @since 4.4
    */
    public function loadComponents() {
    $manifest_file = apply_filters(
    ‘vc_autoload_components_manifest_file’,
    vc_path_dir( ‘AUTOLOAD_DIR’, $this->components_manifest )
    );
    if ( is_file( $manifest_file ) ) {
    ob_start();
    require_once $manifest_file;
    $data = ob_get_clean();
    if ( $data ) {
    $components = (array) json_decode( $data );
    $components = apply_filters(
    ‘vc_autoload_components_list’,
    $components
    );
    foreach ( $components as $component => $description ) {
    $component_path = vc_path_dir( ‘AUTOLOAD_DIR’, $component );
    if ( strpos( $component_path, ‘*’ ) === false && is_file( $component_path ) ) {
    require $component_path;
    } else {
    $components_paths = glob( $component_path );
    if ( is_array( $components_paths ) && ! empty( $components_paths ) ) {
    foreach ( $components_paths as $path ) {
    if ( strpos( $path, ‘*’ ) === false && is_file( $path ) ) {
    require $path;
    }
    }
    }
    }
    }
    }
    }
    }

    /**
    * Load required logic for operating in Wp Admin dashboard.
    *
    * @since 4.2
    * @access protected
    *
    * @return void
    */
    protected function asAdmin() {
    // License management and activation/deactivation methods.
    vc_license()->addAjaxHooks();
    // Settings page. Adds menu page in admin panel.
    // vc_settings()->addMenuPageHooks();
    // Load backend editor hooks
    vc_backend_editor()->addHooksSettings();
    // If auto updater is enabled initialize updating notifications service.
    }

    /**
    * Set VC mode.
    *
    * Mode depends on which page is requested by client from server and request parameters like vc_action.
    *
    * @since 4.2
    * @access protected
    *
    * @return void
    */
    protected function setMode() {
    /**
    * TODO: Create another system (When ajax rebuild).
    * Use vc_action param to define mode.
    * 1. admin_frontend_editor – set by editor or request param
    * 2. admin_backend_editor – set by editor or request param
    * 3. admin_frontend_editor_ajax – set by request param
    * 4. admin_backend_editor_ajax – set by request param
    * 5. admin_updater – by vc_action
    * 6. page_editable – by vc_action
    */
    if ( is_admin() ) {
    if ( vc_action() === ‘vc_inline’ && ( current_user_can( ‘edit_posts’ ) || current_user_can( ‘edit_pages’ ) ) ) {
    $this->mode = ‘admin_frontend_editor’;
    } elseif ( ( current_user_can( ‘edit_posts’ ) || current_user_can( ‘edit_pages’ ) ) && (
    vc_action() === ‘vc_upgrade’ ||
    ( vc_get_param( ‘action’ ) === ‘update-selected’ && vc_get_param( ‘plugins’ ) === $this->pluginName() )
    ) ) {
    $this->mode = ‘admin_updater’;
    } elseif ( current_user_can( ‘manage_options’ ) && isset( $_GET[‘page’] ) && $_GET[‘page’] === $this->settings()->page() ) {
    $this->mode = ‘admin_settings_page’;
    } else {
    $this->mode = ‘admin_page’;
    }
    } else {
    if ( vc_verify_admin_nonce() && current_user_can( ‘edit_post’, (int) vc_request_param( ‘vc_post_id’ ) ) && isset( $_GET[‘vc_editable’] ) && ‘true’ === $_GET[‘vc_editable’] ) {
    $this->mode = ‘page_editable’;
    } else {
    $this->mode = ‘page’;
    }
    }
    }

    /**
    * Sets version of the VC in DB as option `vc_version`
    *
    * @since 4.3.2
    * @access protected
    *
    * @return void
    */
    protected function setVersion() {
    $version = get_option( ‘vc_version’ );
    if ( ! is_string( $version ) || version_compare( $version, WPB_VC_VERSION ) !== 0 ) {
    add_action( ‘vc_after_init’, array( vc_settings(), ‘rebuild’ ) );
    update_option( ‘vc_version’, WPB_VC_VERSION );
    }
    }

    /**
    * Get current mode for VC.
    *
    * @since 4.2
    * @access public
    *
    * @return string
    */
    public function mode() {
    return $this->mode;
    }

    /**
    * Setter for paths
    *
    * @since 4.2
    * @access protected
    *
    * @param $paths
    */
    protected function setPaths( $paths ) {
    $this->paths = $paths;
    }

    /**
    * Gets absolute path for file/directory in filesystem.
    *
    * @since 4.2
    * @access public
    *
    * @param $name – name of path dir
    * @param string $file – file name or directory inside path
    *
    * @return string
    */
    public function path( $name, $file = ” ) {
    $path = $this->paths[ $name ] . ( strlen( $file ) > 0 ? ‘/’ . preg_replace( ‘/^\//’, ”, $file ) : ” );

    return apply_filters( ‘vc_path_filter’, $path );
    }

    /**
    * Set default post types. Vc editors are enabled for such kind of posts.
    *
    * @param array $type – list of default post types.
    */
    public function setEditorDefaultPostTypes( array $type ) {
    $this->editor_default_post_types = $type;
    }

    /**
    * Returns list of default post types where user can use visual composer editors.
    *
    * @since 4.2
    * @access public
    *
    * @return array
    */
    public function editorDefaultPostTypes() {
    return $this->editor_default_post_types;
    }

    /**
    * Get post types where VC editors are enabled.
    *
    * @since 4.2
    * @access public
    *
    * @return array
    */
    public function editorPostTypes() {
    if ( ! isset( $this->editor_post_types ) ) {
    $pt_array = vc_settings()->get( ‘content_types’ );
    $this->editor_post_types = $pt_array ? $pt_array : $this->editorDefaultPostTypes();
    }

    return $this->editor_post_types;
    }

    /**
    * Set post types where VC editors are enabled.
    *
    * @since 4.4
    * @access public
    *
    * @param array $post_types
    */
    public function setEditorPostTypes( array $post_types ) {
    $this->editor_post_types = ! empty( $post_types ) ? $post_types : $this->editorDefaultPostTypes();
    vc_settings()->set( ‘content_types’, $this->editor_post_types );
    }

    /**
    * Setter for as-theme-plugin status for VC.
    *
    * @since 4.2
    * @access public
    *
    * @param bool $value
    */
    public function setIsAsTheme( $value = true ) {
    $this->is_as_theme = (boolean) $value;
    }

    /**
    * Get as-theme-plugin status
    *
    * As theme plugin status used by theme developers. It disables settings
    *
    * @since 4.2
    * @access public
    *
    * @return bool
    */
    public function isAsTheme() {
    return (boolean) $this->is_as_theme;
    }

    /**
    * Setter for as network plugin for MultiWP.
    *
    * @since 4.2
    * @access public
    *
    * @param bool $value
    */
    public function setAsNetworkPlugin( $value = true ) {
    $this->is_network_plugin = $value;
    }

    /**
    * Gets VC is activated as network plugin.
    *
    * @since 4.2
    * @access public
    *
    * @return bool
    */
    public function isNetworkPlugin() {
    if ( is_null( $this->is_network_plugin ) ) {
    // Check is VC as network plugin
    if ( is_multisite() && ( is_plugin_active_for_network( ‘js_composer/js_composer.php’ )
    || is_network_only_plugin( ‘js_composer/js_composer.php’ ) )
    ) {
    $this->setAsNetworkPlugin( true );
    }
    }

    return $this->is_network_plugin ? true : false;
    }

    /**
    * Setter for disable updater variable.
    * @since 4.2
    * @see
    *
    * @param bool $value
    */
    public function disableUpdater( $value = true ) {
    $this->disable_updater = $value;
    }

    /**
    * Get is vc updater is disabled;
    *
    * @since 4.2
    * @see to where updater will be
    *
    * @return bool
    */
    public function isUpdaterDisabled() {
    return is_admin() && $this->disable_updater;
    }

    /**
    * Set user directory name.
    *
    * Directory name is the directory name vc should scan for custom shortcodes template.
    *
    * @since 4.2
    * @access public
    *
    * @param $dir – path to shortcodes templates inside developers theme
    */
    public function setCustomUserShortcodesTemplateDir( $dir ) {
    preg_replace( ‘/\/$/’, ”, $dir );
    $this->custom_user_templates_dir = $dir;
    }

    /**
    * Get default directory where shortcodes templates area placed.
    *
    * @since 4.2
    * @access public
    *
    * @return string – path to default shortcodes
    */
    public function getDefaultShortcodesTemplatesDir() {
    return vc_path_dir( ‘TEMPLATES_DIR’, ‘shortcodes’ );
    }

    /**
    *
    * Get shortcodes template dir.
    *
    * @since 4.2
    * @access public
    *
    * @ruturn string
    *
    * @param $template
    *
    * @return string
    */
    public function getShortcodesTemplateDir( $template ) {
    return $this->custom_user_templates_dir !== false ? $this->custom_user_templates_dir . ‘/’ . $template : locate_template( ‘vc_templates/’ . $template );
    }

    /**
    * Directory name where template files will be stored.
    *
    * @since 4.2
    * @access public
    *
    * @return string
    */
    public function uploadDir() {
    return ‘js_composer’;
    }

    /**
    * Getter for VC_Mapper instance
    *
    * @since 4.2
    * @access public
    *
    * @return Vc_Mapper
    */
    public function mapper() {
    if ( ! isset( $this->factory[‘mapper’] ) ) {
    require_once $this->path( ‘CORE_DIR’, ‘class-vc-mapper.php’ );
    $this->factory[‘mapper’] = new Vc_Mapper();
    }

    return $this->factory[‘mapper’];
    }

    /**
    * Visual Composer.
    *
    * @since 4.2
    * @access public
    *
    * @return Vc_Base
    */
    public function vc() {
    if ( ! isset( $this->factory[‘vc’] ) ) {
    do_action( ‘vc_before_init_vc’ );
    require_once $this->path( ‘CORE_DIR’, ‘class-vc-base.php’ );
    $vc = new Vc_Base();
    // DI Set template editor. @deprecated and will be removed
    require_once $this->path( ‘EDITORS_DIR’, ‘popups/class-vc-templates-editor.php’ );
    $vc->setTemplatesEditor( new Vc_Templates_Editor() );
    // DI Set template new modal editor.
    require_once $this->path( ‘EDITORS_DIR’, ‘popups/class-vc-templates-panel-editor.php’ );
    $vc->setTemplatesPanelEditor( new Vc_Templates_Panel_Editor() );
    // DI Set edit form
    require_once $this->path( ‘EDITORS_DIR’, ‘popups/class-vc-shortcode-edit-form.php’ );
    $vc->setEditForm( new Vc_Shortcode_Edit_Form() );

    // DI for third-party plugins manager.
    require_once $this->path( ‘VENDORS_DIR’, ‘class-vc-vendors-manager.php’ );
    $vc->setVendorsManager( new Vc_Vendors_Manager() );

    $this->factory[‘vc’] = $vc;
    do_action( ‘vc_after_init_vc’ );
    }

    return $this->factory[‘vc’];
    }

    /**
    * Vc options.
    *
    * @since 4.2
    * @access public
    *
    * @return Vc_Settings
    */
    public function settings() {
    if ( ! isset( $this->factory[‘settings’] ) ) {
    do_action( ‘vc_before_init_settings’ );
    require_once $this->path( ‘SETTINGS_DIR’, ‘class-vc-settings.php’ );
    $this->factory[‘settings’] = new Vc_Settings();
    do_action( ‘vc_after_init_settings’ );
    }

    return $this->factory[‘settings’];
    }

    /**
    * Vc license settings.
    *
    * @since 4.2
    * @access public
    *
    * @return Vc_License
    */
    public function license() {
    if ( ! isset( $this->factory[‘license’] ) ) {
    do_action( ‘vc_before_init_license’ );
    require_once $this->path( ‘SETTINGS_DIR’, ‘class-vc-license.php’ );
    $this->factory[‘license’] = new Vc_License();
    do_action( ‘vc_after_init_license’ );
    }

    return $this->factory[‘license’];
    }

    /**
    * Get frontend VC editor.
    *
    * @since 4.2
    * @access public
    *
    * @return Vc_Frontend_Editor
    */
    public function frontendEditor() {
    if ( ! isset( $this->factory[‘frontend_editor’] ) ) {
    do_action( ‘vc_before_init_frontend_editor’ );
    require_once $this->path( ‘EDITORS_DIR’, ‘class-vc-frontend-editor.php’ );
    $this->factory[‘frontend_editor’] = new Vc_Frontend_Editor();
    }

    return $this->factory[‘frontend_editor’];
    }

    /**
    * Get backend VC editor. Edit page version.
    *
    * @since 4.2
    *
    * @return Vc_Backend_Editor
    */
    public function backendEditor() {
    if ( ! isset( $this->factory[‘backend_editor’] ) ) {
    do_action( ‘vc_before_init_backend_editor’ );
    require_once $this->path( ‘EDITORS_DIR’, ‘class-vc-backend-editor.php’ );
    $this->factory[‘backend_editor’] = new Vc_Backend_Editor();
    }

    return $this->factory[‘backend_editor’];
    }

    /**
    * Gets automapper instance.
    *
    * @since 4.2
    * @access public
    *
    * @return Vc_Automapper
    */
    public function automapper() {
    if ( ! isset( $this->factory[‘automapper’] ) ) {
    do_action( ‘vc_before_init_automapper’ );
    require_once $this->path( ‘SETTINGS_DIR’, ‘class-vc-automapper.php’ );
    $this->factory[‘automapper’] = new Vc_Automapper();
    do_action( ‘vc_after_init_automapper’ );
    }

    return $this->factory[‘automapper’];
    }

    /**
    * Gets updater instance.
    * @since 4.2
    *
    * @return Vc_Updater
    */
    public function updater() {
    if ( ! isset( $this->factory[‘updater’] ) ) {
    do_action( ‘vc_before_init_updater’ );
    require_once $this->path( ‘UPDATERS_DIR’, ‘class-vc-updater.php’ );
    $updater = new Vc_Updater();
    require_once vc_path_dir( ‘UPDATERS_DIR’, ‘class-vc-updating-manager.php’ );
    $updater->setUpdateManager( new Vc_Updating_Manager( WPB_VC_VERSION, $updater->versionUrl(), vc_plugin_name() ) );
    $this->factory[‘updater’] = $updater;
    do_action( ‘vc_after_init_updater’ );
    }

    return $this->factory[‘updater’];
    }

    /**
    * Getter for plugin name variable.
    * @since 4.2
    *
    * @return string
    */
    public function pluginName() {
    return $this->plugin_name;
    }

    /**
    * Get absolute url for VC asset file.
    *
    * Assets are css, javascript, less files and images.
    *
    * @since 4.2
    *
    * @param $file
    *
    * @return string
    */
    public function assetUrl( $file ) {
    return preg_replace( ‘/\s/’, ‘%20’, plugins_url( $this->path( ‘ASSETS_DIR_NAME’, $file ), __FILE__ ) );
    }
    }

    /**
    * Main Visual composer manager.
    * @var Vc_Manager $vc_manager – instance of composer management.
    * @since 4.2
    */
    global $vc_manager;
    if ( ! $vc_manager ) {
    $vc_manager = Vc_Manager::getInstance();
    // Load components
    $vc_manager->loadComponents();
    }

    Grazie!

  1. No trackbacks yet.

Lascia un commento