Plugin install error "Wrapper could not be found"

OJS 3.1.2.1
Hello,
On my OUS installation, Installing plugins fails. When I press the OK button, nothing happens. I have studied on this Error in installing new plugins from plugin gallery installed plugins - #4 by asmecher and The tar command is not available. Please correctly configure it in your "config.inc.php" - #9 by Matus_Muransky .
In my config.inc.php it says: tar = /bin/tar
In the error log I get:

Does that mean that the tar command is not available? Given that I have OJS at a provider where I can only configure it with cPanel, what can I do to make it available?

In FileManager.inc.php line 155 says:

function copyFile($source, $dest) {
	$success = true;
	$destDir = dirname($dest);
	if (!$this->fileExists($destDir, 'dir')) {
		// Try to create the destination directory
		$this->mkdirtree($destDir);
	}
	if (copy($source, $dest))
		return $this->setMode($dest, FILE_MODE_MASK);
	return false;
}

Could you please help me to install the plugin?
Thank you, Daniel
PS. In my cPanel I can choose PHP options. “allow_url_fopen” is active, PHP version 7.2.

Problem solved. In my cPanel in “MulitPHP Manager” a version of PHP was chosen for which allow_url_fopen=0. So to solve the “Wrapper could not be found” problem for OJS 3:

  • In your cPanel in “Choose PHP Version”, choose a version 7.0 or newer.
  • There under “Options”, activate allow_url_fopen.
  • In the “MulitPHP Manager”, make sure that for the respective domain the same PHP version is selected.

After doing this I could install plugins. I am not sure whether allow_url_fopen=1 is a security risk, in which case one should switch it back to 0 once one has installed the plugins.

Hi @Aragon,

Personally, I consider allow_url_fopen to be safe, but disabling it after installing plugins is also a valid option. Glad you found a solution.

Regards,
Alec Smecher
Public Knowledge Project Team