Dear OJS-Community,
in August, we have moved our OJS installation to a new web server. Today, I realized that I could no longer install plugins from the Plugin Gallery: “The tar command is not available. Please correctly configure it in your “config.inc.php”.”
We have specified the correct file path to the tar command in config.inc.php.
I found this discussion between @piotreba and @asmecher from May 2022 that some server configurations prevent the following test in lib/pkp/classes/plugins/PluginHelper.inc.php from succeeding. The file_exists
condition failure seems to result from open_basedir
restrictions:
// Test whether the tar binary is available for the export to work
$tarBinary = Config::getVar('cli', 'tar');
if (empty($tarBinary) || !file_exists($tarBinary)) {
rmdir($pluginExtractDir);
throw new Exception(__('manager.plugins.tarCommandNotFound'));
}
If the if statement is commented out, I can install tar files in the plugin gallery (tested with OJS 3.3.0.19 and PHP 8.1 and 8.3).
However, other functions are also affected by this problem, not only the installation of plugins. For example, the DNB export plugin – it provides the export of article metadata and full texts for their transfer to the German National Library (DNB) – issues the following error message: “Plugin requirements not met: TAR command (s. cli part in the config.inc.php) is required for export and deposit.”
Since we are using the DNB export plugin, is there a workaround for this problem?
Kind regards,
Michael