Hello.
I have the following problem (ojs 3.1.1.0). I do not see errors in apache log or postgres. any ideas?
Hello.
I have the following problem (ojs 3.1.1.0). I do not see errors in apache log or postgres. any ideas?
Hi @cristianviza,
Is your server firewalled or otherwise prevented from fetching the list of plugins from pkp.sfu.ca?
Regards,
Alec Smecher
Public Knowledge Project Team
Hello @asmecher
No but the problem persists.
I only need to install/activate piwik plugin. What is the manual way to install a “piwik plugin” in ojs3 by downloading it from GitHub - pkp/piwik: Piwik plugin for OMP OJS 3.0+ (it is correct to download it from that link or where is the latest version)?
I try downaload from github and install Settings → WebSite → Plugins → “Upload new Plugin” → Notification “The uploaded plugin archive does not contain a folder that corresponds to the plugin name”.
Regards
Cristian
Hi @asmecher
I solved problen install with select * from submission_search_keyword_list where keyword_text=‘cristian’;
but now I get this message (see image). Hte problem is in Settings → website-> plugins ->“installed plugins” → Generic Plugins → no list, not see piwik.
How do I mark it as not installed in the database to force the installation? since I link I can download the latest version of “piwik plugin” available ??
Regards
Cristian
Hi @cristianviza,
Out of curiosity, what version does your OJS identify itself as in its database? You can check this by going to “About This Publishing System” in the About area, or by running…
php tools/upgrade.php check
…from the command line.
Regards,
Alec Smecher
Public Knowledge Project Team
I got the same problem, my plugins gallery remains empty, but PHP logs are showing this error:
Could not connect to 10.20.0.21 (501; 5), referer: https://journals.reduc.edu.cu/be/management/settings/website
[Sat Nov 14 16:46:47.226610 2020] [php7:warn] [pid 160] [client 10.20.1.33:11599] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /data/services/www/journals/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57, referer: https://journals.reduc.edu.cu/be/management/settings/website
This server is a fresh new installed version of OJS 3.2.1.1, in the log as you see I have this 501 error,
Regards
Eduardo
Hi @EduardoOsquel,
The Empty string supplied as input
error suggests that the plugin gallery XML couldn’t be fetched from the PKP website. Is your server behind a proxy?
Regards,
Alec Smecher
Public Knowledge Project Team
Exactly, is my server behind proxy. However I can see the XML through web browsers
Regards,
Eduardo Osquel
Hi @EduardoOsquel,
Have you configured your HTTP proxy in config.inc.php
?
Regards,
Alec Smecher
Public Knowledge Project Team
Yes I do, proxy, port, proxy user and proxy password, and nothing, also disabled and re enabled allow_url_fsopen both ways (even in PHP config file), and nothing
Regards,
Eduardo Osquel
Hi @EduardoOsquel,
You can see how OJS tries to fetch the file by looking in lib/pkp/classes/file/FileWrapper.inc.php
in the wrapper
function. When both OJS and PHP are set to allow_url_fopen
, fopen
is used to fetch the file directly; this probably won’t support a proxy without modifications.
If either of those settings is disabled, the HTTPFileWrapper
class is used, which should work with your proxy settings from config.inc.php
. However, this is a custom proxy implementation, and depending on what kind of proxy you’re using you may run into trouble that’ll require manual debugging. This will be replaced with the 3rd-party Guzzle library starting with OJS 3.3, due for release in Q1 next year.
Regards,
Alec Smecher
Public Knowledge Project Team
@asmecher i’v installed ojs 3.2.1.1 on a vm linux (centos8) with direct internet connection , i have the same problem with a the plugin gallery (and also in reading ojs version) , fopen is enabled in config.inc.php
PHP logs :
[02-Mar-2021 22:01:23 UTC] PHP Warning: fopen(https://pkp.sfu.ca/ojs/xml/plugins.xml): failed to open stream: Permission denied in /var/www/html/lib/pkp/classes/file/FileWrapper.inc.php on line 70
[02-Mar-2021 22:01:23 UTC] PHP Warning: DOMDocument::loadXML(): Empty string supplied as input in /var/www/html/lib/pkp/classes/plugins/PluginGalleryDAO.inc.php on line 57
also in reading ojs version
[02-Mar-2021 21:26:13 UTC] PHP Warning: fopen(http://pkp.sfu.ca/ojs/xml/ojs-version.xml): failed to open stream: Permission denied in /var/www/html/lib/pkp/classes/file/FileWrapper.inc.php on line 70
So, I got an update for this issue. It turns out, that the Proxy server respond with a non expected answer:
OJS is setting the host and port right. => pkp-lib/HTTPFileWrapper.inc.php at stable-3_2_1 · pkp/pkp-lib · GitHub
The built request is:
GET https://pkp.sfu.ca/ojs/xml/plugins.xml HTTP/1.0
Host: pkp.sfu.ca
User-Agent: ojs2/3.2.1.4
Connection: Close
Which seems totally legit. But the proxy returns HTTP/1.1 501 Not Implemented
. And it seems, that this could be an issue proxy + ssl/https
. I did not found the real reason for this answer or if the request is missing something…
However, the whole proxy mechansim in OJS/PKP seems a bit tricky here, I never seen that much code for a simple HTTP request!
What is stopping you to use curl, if available?
Anyway, I try now to patch my copy of the code an create a pull request which implements basic curl support. Maybe you can look at it and adapt it, if needed.
EDIT: I noticed, that PKP 3.3.0-3 does not contain the wrappers anymore. Is there a major change in HTTP(S) Requests? Seems like you are now using curl? Then I dont need to do anything but updating OJS again.
Hi @Commifreak,
Prior to OJS/OMP/OPS 3.2.1, some interactions relied on wrappers and some had their own Curl usage and proxy support.
In 3.2.1, this was centralized to a CURL implementation with proxy support (lib/pkp/classes/helpers/PKPCurlHelper.inc.php
).
In 3.3.x, this was migrated to Guzzle, which also supports proxies (and often relies on curl under the hood).
Regards,
Alec Smecher
Public Knowledge Project Team
Ehm… no, this doesnt look right. You said in 3.2.1 you centralized to curl. That is not the case. My post and test was made with 3.2.1.4. the wrapper folder is still there.
But your answer confirms, that 3.3 changes some things which will fix my proxy issue for sure.
Update to 3.3 fixed the issue FINALLY!