有同学咨询丁老师,在对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系统发布的文章页面,在Published日期里边,怎么显示了Update on字段?怎么去掉呢?如图:丁老师经过对ojs分析后发现,Update on字段是ojs系统中,每次对该文章更新...
Open Journal Systems (OJS)是一个由Public Knowledge Project (PKP) 开发的开源软件(OJS专题介绍),旨在帮助学术期刊实现其在线出版、管理和传播的过程。OJS支持从文章提交到最终发布...
有做期刊的出版社客户咨询,OJS系统支持手机、平板等移动端吗?丁老师给你解答,OJS是支持手机移动端的,支持手机、平板,移动端是H5页面的形式,页面是响应式布局设计,可以自适应移动端显示。并且可以通过二次开发,集成到APP中、微信小程序...
ojs期刊投稿系统,在Make a Submission,Upload Files时文件上传失败,提示Slim Application Error错误,可能是以下几点原因造成的:1.php没有启用fileinfo模块;2.文件上传目录设...