OJS安装和更新Plugin插件失败报错的解决方法

所属专题:OJS期刊管理系统 来源: 丁老师原创 更新时间:2026-03-25 09:53 浏览: 241 IP属地: 深圳
OJS期刊管理系统专业软件服务商

有同学咨询丁老师,在对OJS期刊系统(Open Journal Systems)的ROR插件(ROR Plugin)进行更新升级时,系统一直卡着不动,无法升级成功,是怎么回事呢?

故障分析:
经过丁老师查看OJS系统的错误日志发现,在升级ROR Plugin的过程中系统报错,错误日志如下:

[22-Mar-2026 22:07:05 UTC] PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /home/www/wwwroot/ojs/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/StyleSheet.php on line 52
[22-Mar-2026 22:07:05 UTC] PHP Deprecated:  Creation of dynamic property Seboettg\CiteProc\Root\Info::$title-short is deprecated in /home/www/wwwroot/ojs/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Root/Info.php on line 62
[22-Mar-2026 22:07:05 UTC] PHP Deprecated:  Creation of dynamic property Seboettg\CiteProc\Root\Info::$category is deprecated in /home/www/wwwroot/ojs/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Root/Info.php on line 62
[22-Mar-2026 22:07:05 UTC] PHP Deprecated:  Creation of dynamic property Seboettg\CiteProc\Root\Info::$updated is deprecated in /home/www/wwwroot/ojs/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Root/Info.php on line 62
[22-Mar-2026 22:07:05 UTC] PHP Deprecated:  Creation of dynamic property Seboettg\CiteProc\Root\Info::$rights is deprecated in /home/www/wwwroot/ojs/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Root/Info.php on line 62
[22-Mar-2026 22:07:05 UTC] PHP Deprecated:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /home/www/wwwroot/ojs/plugins/generic/citations/CitationsPlugin.inc.php on line 49
[22-Mar-2026 22:12:53 UTC] ojs2: 404 Not Found
[22-Mar-2026 22:18:20 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/www/wwwroot/ojs/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php:1) in /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPRouter.inc.php on line 414
[22-Mar-2026 22:21:52 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/www/wwwroot/ojs/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php:1) in /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPRouter.inc.php on line 414
[22-Mar-2026 22:22:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function exec() in /home/www/wwwroot/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php:62
Stack trace:
#0 /home/www/wwwroot/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(280): PluginHelper->extractPlugin('/tmp/plugintTKk...', 'ror-3.3.0.53')
#1 /home/www/wwwroot/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(238): PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPRouter.inc.php(397): PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 /home/www/wwwroot/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))
#5 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))
#6 /home/www/wwwroot/ojs/index.php(68): PKPApplication->execute()
#7 {main}
  thrown in /home/www/wwwroot/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php on line 62
[22-Mar-2026 22:22:23 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function exec() in /home/www/wwwroot/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php:62
Stack trace:
#0 /home/www/wwwroot/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(280): PluginHelper->extractPlugin('/tmp/pluginrNgx...', 'ror-3.3.0.53')
#1 /home/www/wwwroot/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(238): PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPRouter.inc.php(397): PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 /home/www/wwwroot/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))
#5 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))
#6 /home/www/wwwroot/ojs/index.php(68): PKPApplication->execute()
#7 {main}
  thrown in /home/www/wwwroot/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php on line 62
[22-Mar-2026 22:24:28 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function exec() in /home/www/wwwroot/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php:62
Stack trace:
#0 /home/www/wwwroot/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(280): PluginHelper->extractPlugin('/tmp/pluginNm3G...', 'ror-3.3.0.53')
#1 /home/www/wwwroot/ojs/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(238): PluginGalleryGridHandler->installPlugin(Array, Object(Request), true)
#2 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPRouter.inc.php(397): PluginGalleryGridHandler->upgradePlugin(Array, Object(Request))
#3 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#4 /home/www/wwwroot/ojs/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPComponentRouter->route(Object(Request))
#5 /home/www/wwwroot/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))
#6 /home/www/wwwroot/ojs/index.php(68): PKPApplication->execute()
#7 {main}
  thrown in /home/www/wwwroot/ojs/lib/pkp/classes/plugins/PluginHelper.inc.php on line 62
[22-Mar-2026 22:24:52 UTC] PHP Deprecated:  stripslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/www/wwwroot/ojs/lib/pkp/classes/citation/Citation.inc.php on line 99

发现在升级过程中,PHP报错,具体是Uncaught Error: Call to undefined function exec() ,即PHP没有开启exe函数。因为部分插件在升级时,需要使用php的exec函数来对系统文件进行写入、执行的操作,但exec函数是系统最高权限的函数方法,具有一定的风险性,因此php默认是保持关闭的。所以在未开启exec函数的情况下,升级部分插件时会报错导致无法升级。

解决方法:
修改php.ini配置文件,在php的disable_functions中,去掉exec函数(即在禁用方法中释放出exec),然后保存配置文件,重启php,对OJS的插件重新升级即可。

如果是宝塔环境,可以直接在php的禁用函数中,删除exec。

image.png

注意事项:
Exec是php最高权限、最危险的函数,开启后将使程序拥有操作系统的最高权限,包括磁盘数据的写入、清除等,因此在使用exec函数时一定要注意风险控制。对于OJS期刊系统来说,非官方Plugin插件,第三方插件、来路不明的插件,不要安装,更不要轻易开启exec函数。对于官方插件,在安装和升级时可以开启exec函数,但是在安装升级结束后,记得一定关掉,一定关掉exec函数!

OJS期刊系统是开源的软件系统,对于较早发布的版本,系统存在一定的漏洞和缺陷,部分黑客和病毒有可能利用这些漏洞,来进行系统攻击,如果开启了exec函数,黑客和病毒木马将会拥有系统的最高权限。因此exec函数要慎用,平时一定要禁用这个函数。

ojs相关文章

OJS期刊系统配置邮箱发信功能的方法

ojs期刊系统,配置email邮箱发信功能的方法:1.打开根目录下的config.ini.php文件。2.找到"SMTP server settings",按照如下设置。; Available options: se...

OJS出现Uncaught Error: C...

有使用OJS的做期刊投稿的出版社客户在提问,OJS有时候会出现一些问题,比如plugin页一直在加载,也打不开,然后投稿时提示error,具体的错误是Uncaught Error: Call to a member function g...

OJS系统PDF打不开无法在线浏览的解决方法

最近有客户在使用OJS系统时,在Issue中上传了整刊PDF,但是却打不开,显示空白,如图:错误代码提示:viewer.mjs:1Failed to load module script: Expected a JavaScript-o...

Open Journal Systems期刊...

越来越多做的客户找丁老师安装搭建Open Journal Systems(OJS)期刊管理系统了,每天忙的顾不过来!这些做出版社期刊运营的客户,问的比较多的一个问题就是,安装搭建OJS系统,要买什么样的服务器呢?今天丁老师就这个问题做一...

当前在线
免费咨询