Upgrade plugin not working in web

Hi

I have made an upgrade to OJS 3.2.1-0 and I have the following error when trying to upgrade the quicksubmit plugin via the web interface:

image

The log gives:

[Mon Jun 22 15:23:49.417613 2020] [php7:warn] [pid 29731] [client xx.xx.xx.xx:3715] PHP Warning:  rename(): The first argument to copy() function cannot be a directory in /www-directory/lib/pkp/classes/plugins/PluginHelper.inc.php on line 210, referer: https://mydomain.com/folder/index.php/journal1/management/settings/website?r=5ef0af9d6cc2b
[Mon Jun 22 15:23:49.417655 2020] [php7:warn] [pid 29731] [client xx.xx.xx.xx:3715] PHP Warning:  rename(/tmp/quickSubmit26131e107b/quickSubmit,/www-directory/plugins/importexport/quickSubmit): Invalid cross-device link in /www-directory/lib/pkp/classes/plugins/PluginHelper.inc.php on line 210, referer: https://mydomain.com/folder/index.php/journal1/management/settings/website?r=5ef0af9d6cc2b
[Mon Jun 22 15:23:49.417683 2020] [php7:notice] [pid 29731] [client xx.xx.xx.xx:3715] PHP Notice:  Undefined variable: errorMsg in /www-directory/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php on line 311, referer: https://mydomain.com/folder/index.php/journal1/management/settings/website?r=5ef0af9d6cc2b
[Mon Jun 22 15:23:54.741589 2020] [php7:warn] [pid 30577] [client xx.xx.xx.xx:3726] PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /var/www/html/conferences/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386
[Mon Jun 22 15:23:54.757028 2020] [php7:notice] [pid 30577] [client xx.xx.xx.xx:3726] ojs2: 404 Not Found

I get the following error in the browser development tool:

I get similar error when I try to install a plugin from the Plugin Gallery

Is should not be a permission issue since i have ran
$ chown -v -R apache:apache plugins/
in the root directory.

Could it be an apache issue or is it a bug?

It might also be related to my import issue:

Can anyone help me?

@eddoff

Hi @eddoff,

There’s a small bug in the error message construction, which you can fix with this change: pkp/pkp-lib#5869 Fix error message construction · pkp/pkp-lib@d1528ab · GitHub

This won’t correct the plugin installation problem, but will give you a proper error message that’ll provide guidance.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks @asmecher!

I have made the changes in the code and now I get the following error in the pink box:

“Could not move plugin to desination!”

I have the following permissions set up:

# ls -lrta plugins/
drwxr-x---  7 apache apache 4096 22 jun 07.26 reports
drwxr-x---  4 apache apache 4096 22 jun 07.26 pubIds
drwxr-x---  4 apache apache 4096 22 jun 07.26 paymethod
drwxr-x---  6 apache apache 4096 22 jun 07.26 oaiMetadataFormats
drwxr-x---  5 apache apache 4096 22 jun 07.26 metadata
drwxr-x---  9 apache apache 4096 22 jun 07.26 importexport
drwxr-x---  3 apache apache 4096 22 jun 07.26 gateways
drwxr-x---  8 apache apache 4096 22 jun 07.26 blocks
drwxr-x--- 13 apache apache 4096 22 jun 07.26 .
drwxr-x---  2 apache apache 4096 22 jun 07.31 auth
drwxr-x--- 24 apache apache 4096 22 jun 15.14 generic
drwxr-x---  6 apache apache 4096 22 jun 15.15 themes
drwxr-xr-x 19 root   root   4096 22 jun 15.53 ..

I hope you can help me!

Best regards,

@eddoff

Hi again!
An update:

  • In OJS 3.1.1-4 on the same server there is no error.
  • I also tested to change the Apache settings so that the settings agreed with the 3.1.1-4 version, but I still have the same problem in 3.2.1-0

Thanks for any help!

Hi @eddoff,

What permissions and ownership do you see on the files in the cache/ directory? (Necessary file permissions will depend heavily on the server’s setup, and this is one way to help determine how your server is configured.)

Regards,
Alec Smecher
Public Knowledge Project Team

Here are the permissions of folders and a file in the cashe directory:

[root@ojs cache]# ls -lrtda */
drwxr-x--- 2 apache apache  4096 22 jun 14.52 t_config/
drwxr-x--- 2 apache apache  4096 22 jun 14.52 t_cache/
drwxr-xr-x 2 apache apache  4096 22 jun 14.56 HTML/
drwxr-xr-x 2 apache apache  4096 22 jun 15.07 URI/
drwxr-x--- 2 apache apache 32768 23 jun 09.42 t_compile/
drwxr-x--- 2 apache apache  4096 24 jun 11.21 _db/
[root@ojs cache]# ls -lrtda .
drwxr-x--- 8 apache apache 12288 24 jun 11.23 .
[root@ojs cache]# ls -lrt .
...
-rw-r--r--  1 apache apache  14878 22 jun 14.55 fc-timeZone-list.php
...

Hi @eddoff,

You’re probably encountering this issue: Plugin install does not work across filesystems · Issue #6035 · pkp/pkp-lib · GitHub

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher!

Now it works! Hope to solve the import issue also so that we can make our upgrade!

Best regards,

@eddoff