Bonjour,
Je travaille actuellement sur un site et, après avoir résolu partiellement des problèmes de sauvegarde, je tente la restauration sur mon ordi mais je suis confronté à un problème.
Le site est hébergé chez 1and1 et il semble que l'hébergeur ait ajouté un truc qui empêche le site de fonctionner en local.
Lorsque j'essaie d'accéder au site en local, je suis confronté à ce warning :
La ligne 387 en question : include_once $mu_plugin; dans ce bloc :Warning: include_once([chemin du site en local]/wp-content/mu-plugins/1and1-subdomain.php): Failed to open stream: Permission denied in [chemin du site en local]/wp-settings.php on line 387
Code PHP : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 // Define constants that rely on the API to obtain the default value. // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. wp_plugin_directory_constants(); $GLOBALS['wp_plugin_paths'] = array(); // Load must-use plugins. foreach ( wp_get_mu_plugins() as $mu_plugin ) { $_wp_plugin_file = $mu_plugin; include_once $mu_plugin; $mu_plugin = $_wp_plugin_file; // Avoid stomping of the $mu_plugin variable in a plugin. /** * Fires once a single must-use plugin has loaded. * * @since 5.1.0 * * @param string $mu_plugin Full path to the plugin's main file. */ do_action( 'mu_plugin_loaded', $mu_plugin ); } unset( $mu_plugin, $_wp_plugin_file );
J'ai en même temps ce warning :
Et dans 1and1-subdomain.php, il y a ça :Warning: include_once(): Failed opening '[chemin du site en local]/wp-content/mu-plugins/1and1-subdomain.php' for inclusion (include_path='.:/usr/lib64/php/:/usr/share/pear/:/usr/share/php/') in [chemin du site en local]/wp-settings.php on line 387
Code PHP : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 (...) class Product_Subdomains { public function __construct() { if ( ! is_admin() && isset( $_SERVER['SERVER_NAME'] ) ) { $this->load_hooks(); } } public function load_hooks() { $domain = $this->get_main_domain( $_SERVER['SERVER_NAME'] ); if ( in_array( $domain, $this->product_subdomains() ) ) { add_action( 'pre_option_blog_public', array( $this, 'make_blog_private' ), 1000 ); add_action( 'default_option_rewrite_rules', array( $this, 'fix_robotstxt_rewrite' ) ); add_action( 'option_rewrite_rules', array( $this, 'fix_robotstxt_rewrite' ) ); } } (...) private function product_subdomains() { return array( 'apps-1and1.net', 'apps-1and1.com' ); } } new Product_Subdomains;
J'ai des tâches à faire sur ce site que je préférerais faire d'abord en local avant de les exécuter en production. Comment puis-je contourner ce blocage ?
Partager