mercredi 22 juin 2016

Why local wordpress plugin can't create a directory in apache server folder?

I want to run locally a plugin I'm developing, that it needs a Core Plugin (from a Framework) as a base. I'm working in a Ubuntu 14.04 (x64) machine using PhpStorm for deployment to the localhost. My localhost is an Apache Server. When I try to activate the Core plugin I find this have an error to create a directory.

Fatal Error from Core Plugin

As you can see in the error I have the files in /var/www/html/wordpress. And here is the function that is trying to create the directory:

public static function setDir($dir){
    if($dir && !is_dir($dir)){
        mkdir($dir); // This is the line that has the error
    }
    static::$logDir = $dir;
}

I have found some solutions, for example this one, but changing the code is not possible, because is not my Framework. I tried even changing the permission of wordpress folder (/var/www/html/wordpress) recursively to 777, but didn't work. Also tried to change the user and group of the folder and files to root, nothing. Change it to my user and group, nothing again. Tried to erase wordpress and reinstall it again, nothing. So, what do you recommend me to do so I can let the plugin to mkdir?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire