Problems with installing and updating plugins on DirectAdmin [SOLVED]

I am trying to install and update plugins in OJS 3.1.4, and when I was using cPanel I never have troubles, but with DirectAdmin, I have a lot of problems.

First, I receive this message:

"The tar command is not available. Please correctly configure it in your “config.inc.php.”

and when I configure the new path, I receive this new message:

“The uploaded plugin archive does not contain a folder that corresponds to the plugin name.”

So I think the tar problems were solved, but I have a new challenge… I need to try what is the problem. So, when the plugin is downloaded into the server, where is the temporal folder that is using?

The problem was the server had disabled the exec() function, but my IT partner say me that activate the exec() function implies security issues! Does someone know about that?

Hi @t4x0n,

If a PHP script has been hacked, the hacker can sometimes use the exec function to cause further problems. However, there exec function itself is not inherently dangerous. OJS needs it for some purposes, including extracting text from PDFs for search indexing.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I will leave here the everything I had to configure to solve my problem in DirectAdmin:

When you receive this message: “The tar command is not available. Please correctly configure it in your “config.inc.php”. There are two possible problems, your path to Tar tool is not correct, or the system can’t access to the path. In my case, I have both problems, so:

  • First I change the config.inc.php, with the right path, in my case: tar = /usr/bin/tar

If you receive the same error message, mean you need to do the second step:

  • Enter as admin to DirectAdmin panel, in Server Manager > PHP Settings (or PHP Configuration). Select the domain you want to modify and (above the list of domains) select the option “Disable Open Basedir”

Now, in my case, the message changed to “The uploaded plugin archive does not contain a folder that corresponds to the plugin name”. If you get the same message, maybe the problem is your disabled functions.

  • You need to enable exec() function, by deleting from the disable_functions

I hope this can help in the future