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

所属专题:OJS期刊管理系统 来源: 丁老师原创 更新时间:2026-03-25 09:53 浏览: 72 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发布的文章如何添加PDF/DOC附件

OJS在投稿发布文章的流程中,到Production这个流程时,就可以给文章添加上传PDF/WORD等文章附件,如图:添加文章附件的方法是:1.切换到Publication选项卡。2.选择左侧Galleys。3.右侧点击Add Gall...

网站如何调用Open Journal Sys...

最近有做期刊运营的客户咨询,他们的出版社网站做的比较早,后来安装搭建了《OJS期刊管理系统》,期刊系统的期刊信息、文章信息、作者信息等数据,无法和官方网站对接,所有信息还需要再在官方网站重新人工录入一遍,操作极为麻烦,有没有办法,能让网...

OJS支持藏文吗?想发布藏文期刊怎么办?

丁老师上个月遇到一个需求,有一家西藏的出版社,发布的期刊语言是藏文,包含在Google学术及知网等学术平台,对接的也都需要是藏文。客户想问下OJS是否支持藏文,如何让OJS显示藏文呢?很遗憾的告诉你,OJS期刊管理系统是不支持藏文的,系...

OJS系统去除底部PKP版权图片的方法

很多跨境出版社使用OJS系统做期刊的朋友咨询,OJS系统底部的PKP版权图片能不能去掉呢?有什么办法吗?如图:这个logo当然是可以去掉的,需要修改theme模板主题文件。以OJS版本3.5为例,具体的方法是:1.打开\lib\pkp\...

当前在线
免费咨询