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

@t4x0n Would you please explain to me a bit, from where and how to fix this issue?
As i am facing the same issue, but I am not an IT expert, if you bit elaborate it will be grateful.
Thanks

Hi @editor.pij, it depends… you are using a server with Linux? or Windows? Does your server has administrator software like cPanel or DirectAdmin?

@t4x0n cPanel, not direct admin

@editor.pij if you have the journal in shared hosting, you need to ask your provider to enable exec function for you, in some cases, when you have access to WHM cPanel you can enable this function following these steps:

  1. Open php.ini file and search the line with disable_functions, something like this:

disable_functions = "show_source, system, shell_exec, exec"

  1. So, in that line, delete “exec” from disable_functions

  2. Save the changes and reboot the server or reboot PHP services.

I cannot find the enable exec() function, we are using shared host please guide me through step by step. i am facing the message “The uploaded plugin archive does not contain a folder that corresponds to the plugin name” while installing updating even to upload new plugin the same message appears

oohhhh Thanks God
found the solution. i solved the problem through MultiPHP INI file. i use the MultiPHP INI Editor and enable the option.
thanks

1 Like

Excellent! The “problem” with some shared hosting is that the options like edit MultiPHP or similar are not always available. I’m glad you can resolve your problem!

Thanks @t4x0n ,
the problem has been resolved now i am facing another issue when i click on the notification bell icon it make the waiting symbol for long time but nothing shows can you help me please…

@Abid_Rehman for this issue I recommend you create a new post in the forum, I have not info about your problem because I have not upgraded my OJS to the version in which include the bell icon, and is important to maintain the order in the forum :wink:

@Abid_Rehman Would you please guide me from where to enable it from MultiPHP INI Editor

@t4x0n

MultiPHP INI Editor>>>>>> Configure PHP INI basic settings>>>>select your domain>>enable options

This topic was automatically closed after 5 days. New replies are no longer allowed.