Hi @asmecher,
I’ve just installed OMP 3.2.0.3 and installation was successful but I have these warnings in my error.log:
[Wed May 13 13:50:29.450622 2020] [php7:warn] [pid 104170] [client x.x.x:37372] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /home/omp/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57, referer: https://x.x.x/index.php/press1/management/settings/website
[Wed May 13 13:50:30.116224 2020] [php7:warn] [pid 104169] [client x.x.x:37373] PHP Warning: file_exists(): open_basedir restriction in effect. File(plugins/gateways/README/index.php) is not within the allowed path(s): (/home/omp/:/home/omp/plugins/gateway:/usr/share/php5/:/var/lib/php5/:/tmp/:/:/ompdata) in /home/omp/lib/pkp/classes/plugins/PluginRegistry.inc.php on line 243, referer: https://x.x.x/index.php/press1/management/settings/website
No plugins can be searched in plugin gallery. When I search for a plugin, there’s nothing to return. My proxy is well configurated, because I can get to pkp.sfu.ca with a wget command. And it has been checked that there’s a request to pkp.sfu.ca from my server and that pkp.sfu.ca returns a reply to my server. But I get nothing in plugin gallery.
I’ve just installed OJS 3.2.0.3 and I can’t search for plugins either.
I’ve tried by configurating allow_url_fopen=Off on /etc/php.ini, but I get nothing. These are the logs:
[Thu May 14 08:45:55.944929 2020] [php7:warn] [pid 73900] [client1x.x.x.x9622] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 39
[Thu May 14 08:46:24.583977 2020] [php7:warn] [pid 73931] [client x.x.x.x:9669] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /home/ojs/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57, referer: https://x.x.x/index.php/rev1/management/settings/website
[Thu May 14 08:46:35.136802 2020] [php7:warn] [pid 73934] [client x.x.x.x:9676] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /home/ojs/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57, referer: https:/x.x.x/index.php/rev1/management/settings/website
[Wed May 13 13:50:30.116224 2020] [php7:warn] [pid 104169] [client x.x.x:37373] PHP Warning: file_exists(): open_basedir restriction in effect. File(plugins/gateways/README/index.php) is not within the allowed path(s): (/home/omp/:/home/omp/plugins/gateway:/usr/share/php5/:/var/lib/php5/:/tmp/:/:/ompdata) in /home/omp/lib/pkp/classes/plugins/PluginRegistry.inc.php on line 243, referer: https://x.x.x/index.php/press1/management/settings/website
…appears because you seem to have a file called README in plugins/gateways; I’m not sure where this came from but you should be able to remove it to resolve the warning. (This will be ignored without causing a warning in a future release.)
As for this warning:
[Wed May 13 13:50:29.450622 2020] [php7:warn] [pid 104170] [client x.x.x:37372] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /home/omp/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57, referer: https://x.x.x/index.php/press1/management/settings/website
…it explains why the Plugin Gallery is empty. Are there any related warnings/errors appearing above that?
There is not enough information to track down the cause of the warning…
[Thu May 14 08:45:55.944929 2020] [php7:warn] [pid 73900] [client1x.x.x.x9622] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 39
…but I suspect it is cosmetic. To track it down, you’d probably need to temporary edit lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php at line 39 to dump a stack trace, which would help indicate the cause of the problem.
Regards,
Alec Smecher
Public Knowledge Project Team
Hi @asmecher,
I added the if clause you toldme at the end of the file:
but I get nothing at all in logs. Only the usual log:
[Mon May 18 10:43:50.264925 2020] [php7:warn] [pid 38271] [client 192.168.128.73:48203] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /home/ojs/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57, referer: https://trevistas.uah.es/index.php/Quodlibet/management/settings/website
You’ve added that after the return statements, so it’ll never get executed. It needs to be added higher up in the file (ideally at the very beginning of the function).
Regards,
Alec Smecher
Public Knowledge Project Team
You’re right. The log shows:
[Thu May 28 18:42:15.832936 2020] [php7:warn] [pid 78720] [client 192.168.128.73:62663] PHP Warning: print_r(): Couldn’t fetch mysqli_result in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 30
[Thu May 28 18:42:15.832968 2020] [php7:warn] [pid 78720] [client 192.168.128.73:62663] PHP Warning: print_r(): Property access is not allowed yet in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 30
[Thu May 28 18:42:15.833011 2020] [php7:warn] [pid 78720] [client 192.168.128.73:62663] PHP Warning: print_r(): Couldn’t fetch mysqli_result in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 30
[Thu May 28 18:42:15.833121 2020] [php7:warn] [pid 78720] [client 192.168.128.73:62663] PHP Warning: print_r(): Property access is not allowed yet in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 30
[Thu May 28 18:42:15.907469 2020] [php7:error] [pid 78720] [client 192.168.128.73:62663] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 98570240 bytes) in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 30
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 98570240 bytes) in /home/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 30
It means you’ll need to increase your PHP memory_limit setting, at least temporarily to get this debug information into the log.
However, I suspect it’ll be possible to reduce the amount of memory needed by changing:
if (!is_string($string)) error_log(print_r(debug_backtrace(),true));
…to…
if (!is_string($string)) error_log(print_r(debug_backtrace(0),true));
Regards,
Alec Smecher
Public Knowledge Project Team
Thanks a lot @asmecher.
I’ve just fixed the memory in my php.ini and now I get lots of messages. I’ll try to put the here for you to revise. It’s a very large log, so I can only insert a few lines here. I’ll do it in two messages:
I’ve reviewed the code and can’t track down the source of the htmlspecialchars() expects parameter 1 to be string, array given warning. However, I can confirm that it’s cosmetic and shouldn’t cause problems in your installation. Were you able to extend the execution time limit, and did it result in the plugin area starting to work?
Regards,
Alec Smecher
Public Knowledge Project Team