Erreurs fatales PHP avec WordPress 3.9.1 + thème acheté en magasin

Publié par Jean-Michel le

I’ve got a bunch of errors in my error.log that have caused my site to go down. A server reboot seemed to solve it. But I’d like to get some clarity on these as they may shut down the site again. All of this is running on a Windows server with IIS, PHP and MySQL.

One error is calls to an undefined function. The path is right. The file is there. The function is built into wordpress. But sometimes this fatal error is coming up:

PHP Fatal error:  Call to undefined function trailingslashit() in pathtofilewp-settings.php on line 321

Does anyone know why it would fail intermittently? Or if there is a best practice solution to prevent this in the future.

I’m using it in this fashion:

define('BLOX_PATH', trailingslashit(get_template_directory_uri()).'framework/Pagebuilder/');
define('BLOX_DIR', trailingslashit(get_template_directory()).'framework/Pagebuilder/');

Also I’m seeing an abundance of these. It’s related to a WordPress plugin requested by the client. It’s a warning about folder permission issues, that much I know. My question is, is it site crashing issue or is it more innocuous in nature?

PHP Warning:  is_readable(): open_basedir restriction in effect.

Toutes les pensées ou suggestions sont appréciées.

Solution n°1 trouvée

La trailingslashitfonction est définie dans wp-includes/formatting.php. Donc, si vous l’utilisez avant la ligne qui lit require( ABSPATH . WPINC . '/formatting.php' );dans wp-settings.phpla fonction n’existera pas encore, et vous obtiendrez l’erreur.

Voir ce fil SO sur la restriction open_basedir.

Catégories : Wordpress


Jean-Michel est en charge de la partie blog du site. Il met en place la stratégie de contenu et répond aux questions fréquentes sur Wordpress.

0 commentaire

Laisser un commentaire

Avatar placeholder

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *