OJS may be rejecting URL from an outside website

This topic relates to the following: https://wordpress.org/support/topic/wordpress-cant-seem-to-resolve-a-url-with-%2f?replies=6

In a nutshell, I’m trying to redirect visitor from another site to the OJS site of specific language, by using setLocale. It doesn’t work. Someone from the Wordpress forum suggested that maybe the OJS server is rejecting this redirection.

How do I solve this problem?

Do you have access to your server’s access and error logs? It may be useful to see whether the OJS site is contacted at all and if yes, what kind of error occurs.

When I replicated this from your wordpress.org post, I see the request follow this path:

Request URL:http://eible-journal.org/index.php/APJHLB/user/setLocale/en_US?source=%2Findex.php%2FAPJHLB
Request Method:GET
Host:eible-journal.org
Pragma:no-cache
Referer:http://eible.org/?lang=en
Status Code:302 Moved Temporarily
Remote Address:143.95.253.101:80
Connection:Keep-Alive
Content-Length:0
Content-Type:text/html
Date:Mon, 01 Feb 2016 15:40:16 GMT
Keep-Alive:timeout=15, max=512
Location:http://eible.org/?lang=en
Server:Apache

Is it possible there is anything at the Apache level that could be hijacking this request? @ojsbsb’s suggestion of looking at the access and error logs is a good start.

The journal sites runs on a hosting server. Ive gotten a hold of the error log from the service provider, and it’s quite large.

The last few lines from the error log are as follows. Is this of any help:

[01-Feb-2016 00:03:08 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 00:03:08 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0
[01-Feb-2016 00:24:33 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 00:24:33 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0
[01-Feb-2016 00:24:34 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 00:24:34 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0
[01-Feb-2016 00:25:14 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 00:25:14 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0
[01-Feb-2016 00:25:15 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 00:25:15 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0
[01-Feb-2016 03:28:21 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 03:28:22 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0
[01-Feb-2016 03:28:24 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so’ - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Feb-2016 03:28:24 America/Chicago] PHP Warning: Cannot load module ‘pdo_sqlite’ because required module ‘pdo’ is not loaded in Unknown on line 0

This particular error has to do with loading extra PHP modules. Your php.ini is trying to load the PDO module (and the SQLite PDO module), but your server doesn’t have it installed. This error will not directly relate to the problem at hand, but you can clear it up by editing (or asking your server administrator to edit) the php.ini to not load this module.

The following is a reply from my service provider. The problem seems to be generated by PKP, not the server.

We chose the following multilingual site from PKP hosting clients sample (see https://pkpservices.sfu.ca/customers) and if use the link in your WordPress, still redirect back to your WordPress:
http://ijme-journal.org/index.php/ijme/user/setLocale/en_En?source=%2Findex.php%2Fijme
Therefore there is some variable in the link that prevent the connection and we recommend using the truncated version of the link.

Hmmm… yeah, this code isn’t right:

HTTP_REFERER should not be preferred over the querystring.

Does PKP monitor these threads? How do we elevate this issue to the developer?

I’ve opened an issue and a pull request here:

These threads are watched by multiple PKP core developers and development partners. When something is clearly a bug rather than a question, an issue can be created in the PKP github.