有同学咨询丁老师,在对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。

注意事项:
Exec是php最高权限、最危险的函数,开启后将使程序拥有操作系统的最高权限,包括磁盘数据的写入、清除等,因此在使用exec函数时一定要注意风险控制。对于OJS期刊系统来说,非官方Plugin插件,第三方插件、来路不明的插件,不要安装,更不要轻易开启exec函数。对于官方插件,在安装和升级时可以开启exec函数,但是在安装升级结束后,记得一定关掉,一定关掉exec函数!
OJS期刊系统是开源的软件系统,对于较早发布的版本,系统存在一定的漏洞和缺陷,部分黑客和病毒有可能利用这些漏洞,来进行系统攻击,如果开启了exec函数,黑客和病毒木马将会拥有系统的最高权限。因此exec函数要慎用,平时一定要禁用这个函数。
最近有使用ojs期刊的同学反馈,OJS运行很慢,从打开网页到投稿、上传稿件、编审、发布的过程,全程都很慢,是怎么回事?丁老师在对这个OJS系统的服务器和程序进行分析研究后,发现了一些问题,经过修复和处理,目前的OJS运行正常。为了便于帮...
有客户的OJS系统,从3.3升级到3.5.0.1后,访问投稿页面时,投稿时间没有正常显示出来,显示的是报错信息“Invalid date time”,如图:错误代码:Missing locale key "editor.sub...
经常被提到一个问题,有做期刊运营的小伙伴咨询丁老师,在OJS系统(Open Journal Systems期刊管理系统)中投稿发布的文章,都已经半年了,为什么Google Scholar(谷歌学术)还是不收录啊?到底是怎么回事呢?今天丁...
经常有小伙伴提问,OJS支持在线支付吗?如果我们想实现作者投稿时付费,是否可以实现这个功能呢?丁老师为你解答。关于OJS的在线支付功能,答案是肯定的。OJS期刊投稿系统支持在线支付,该软件提供了管理订阅和作者费在线支付的功能,如图:目前...