We are getting the following error when we try to automatically assign DOI’s during a journal load. We have checked to make sure the plugins have values assigned if needed. I checked the permissions on files to make sure they were accessible.
[Thu Apr 02 07:01:16.702300 2020] [php7:error] [pid 21876] [client 66.249.75.148:46414] PHP Fatal error: Uncaught Error: Call to undefined function import() in /var/www/html/ojs/plugins/pubIds/doi/DOIPubIdPlugin.inc.php:17\nStack trace:\n#0 /var/www/html/ojs/plugins/pubIds/doi/index.php(18): require_once()\n#1 {main}\n thrown in /var/www/html/ojs/plugins/pubIds/doi/DOIPubIdPlugin.inc.php on line 17
OJS version: 3.1.2
php: 7.3.8
mysql: 8.0.19
os: centos 7
Thank you,
Lisa Blake
Hi @loleary,
Is that the entire stack trace?
Regards,
Alec Smecher
Public Knowledge Project Team
Yes, that is all of the stack trace in my log.
When searching the log I found something interesting. It looks like all of the plugins are getting the same error.
[Mon Mar 30 10:18:13.722818 2020] [php7:error] [pid 117571] [client 66.249.75.148:56421] PHP Fatal error: Uncaught Error: Call to undefined function import() in /var/www/html/ojs/plugins/generic/pdfJsViewer/PdfJsViewerPlugin.inc.php:15\nStack trace:\n#0 /var/www/html/ojs/plugins/generic/pdfJsViewer/index.php(19): require_once()\n#1 {main}\n thrown in /var/www/html/ojs/plugins/generic/pdfJsViewer/PdfJsViewerPlugin.inc.php on line 15
[Mon Mar 30 10:18:15.638148 2020] [php7:warn] [pid 117575] [client 207.46.13.84:10814] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /var/www/html/ojs/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[Mon Mar 30 12:01:35.592786 2020] [php7:error] [pid 128431] [client 66.249.75.152:58094] PHP Fatal error: Uncaught Error: Call to undefined function import() in /var/www/html/ojs/plugins/metadata/openurl10/Openurl10MetadataPlugin.inc.php:17\nStack trace:\n#0 {main}\n thrown in /var/www/html/ojs/plugins/metadata/openurl10/Openurl10MetadataPlugin.inc.php on line 17
[Mon Mar 30 17:25:20.689010 2020] [php7:error] [pid 31582] [client 66.249.75.148:55844] PHP Fatal error: Uncaught Error: Call to undefined function import() in /var/www/html/ojs/plugins/generic/webFeed/WebFeedPlugin.inc.php:16\nStack trace:\n#0 /var/www/html/ojs/plugins/generic/webFeed/index.php(19): require_once()\n#1 {main}\n thrown in /var/www/html/ojs/plugins/generic/webFeed/WebFeedPlugin.inc.php on line 16
Hi @loleary,
Are you trying to invoke the plugins directly by running the main plugin PHP file? If so, they’re not intended to be run that way.
Regards,
Alec Smecher
Public Knowledge Project Team
No, we are not using it that way.
Could you tell me where the import function is?
Thank you,
Lisa
Hi @loleary,
The import
function is implemented in lib/pkp/includes/functions.inc.php
, which should be loaded for any request OJS handles. It’s pretty fundamental to OJS’s operation so I’m surprised the plugins are seemingly invoked in a way that doesn’t include it.
Regards,
Alec Smecher
Public Knowledge Project Team