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

所属专题:OJS期刊管理系统 来源: 丁老师原创 更新时间:2026-03-25 09:53 浏览: 693 IP属地: 深圳
OJS(Open Journal Systems)期刊投稿管理系统

有同学咨询丁老师,在对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相关文章

Open Journal Systems期刊...

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

OJS支持oai吗?(Open Archiv...

很多学术圈朋友问OJS系统支持OAI协议吗?OAI是什么呢?今天丁老师给你们解答一下。什么是OAI?OAI是指Open Archive Initiative开放存档倡议,OAI-PMH(开放档案倡议元数据收集协议)于2001年首次发布,...

OJS系统中文不完整怎么办?

很多做学术期刊的客户在问,OJS期刊投稿系统切换为中文后,系统总是出现乱码,中文也没有正常显示,这是怎么回事呢丁老师?其实这个问题很常见,并且不止是中文,在OJS系统的多语言中,包括法语、德语、西班牙语、阿拉伯语、日语、韩语等语种,他们...

OJS3.5版本不再支持手动添加后台用户

从OJS3.5版本开始,OJS不再支持从后台直接添加用户,而是采用了邀请用户的方式进行添加。即OJS无法再从后台,直接添加用户和角色,只能通过邮件邀请用户的方式,并获得用户授权同意后才可以添加用户及对应角色。OJS3.5添加用户方式:O...