Migrate from 2.4.8.1 to 3.1.2-1. and space in public URL identifier

We are in the process of migrate from 2.4.8.1 to 3.1.2-1.
In one of our journal the public URL identifier contain space.(see below)

So when we want to consult the issue “BFT 341” we get the following behavior

the url is entering in an "loop "

xxxx.cirad.fr/index.php/BFT/issue/view/BFT%20341/index.php/BFT/login/index.php/BFT/login/index.php/BFT/login/index.php/BFT/login/index.php/BFT/login/index.php/BFT/login/index.php/BFT/login/in

And the browser display the message below

For information in 2.4.8.1 the space did not creat any problem.

In 3.1.2-1 when the space is deleted in URL identifier everything works fine.

Is this a normal behavior ?

If we want to correct this is there a way to update URL identifier quickly (maybe in the DB or import/export) in order to not do this inthe backoffice issue by issue .

Thanks
Best regards
THomas

Hi @tdolley,

Is this the exact same server environment you were using with OJS 2.x? I just ran a test with OJS 3.1.2 and it worked fine.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Is this the exact same server environment you were using with OJS 2.x?
=>No
=> OJS 3.1.2-1 is installed on a fresh new install (centos 7 )

Hi @tdolley,

What web server are you using?

Regards,
Alec Smecher
Public Knowledge Project Team

My web server is httpd-2.4.6-89

Hi @tdolley,

Is that Apache?

Regards,
Alec Smecher
Public Knowledge Project Team

Yes it is

Best regards Thomas

Hi @tdolley,

I would suggest debugging your web server’s environment outside of OJS. To do this, try creating a temporary test script (e.g. called test.php) alongside OJS’s index.php main wrapper. Put the following contents in it:

<?php phpinfo();

Then try requesting it with the above URL, but using test.php in place of index.php, e.g.: http://xxxx.cirad.fr/test.php/BFT/issue/view/BFT%20341

When you open that URL in your browser, see if you get the appropriate part of the URL in the path_info variable. (Off the top of my head, it should be /BFT/issue/view/BFT%20341 or /BFT/issue/view/BFT 341.) If you get a redirect problem instead, then you’ll need to work with your web server’s configuration.

Regards,
Alec Smecher
Public Knowledge Project Team

OK thank you very much asmecher
So you think it’s probaly an apache configuration problem.
I will look at this and I let you know

OK i’ve made the test I do not have a redirect problem and i get the phpinfo content

Hi @tdolley,

Did you check the contents of the PATH_INFO variable?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, @asmecher
Here it is
image

Best regards
Thomas

Hi @tdolley,

Do you have rewriting rules configured to remove the index.php from your OJS URLs, e.g. in a .htaccess file?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I found the solution
The problem was tricky but your question help me to sort it out.
In fact we use php-fpm.

The used configuration to link httpd to php-fpm was

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/XXX/YYY/ZZZ/prod/ojs/$1

But it create the problem with space in url.
The solution was to use this configuration to link httpd to php-fpm

<FilesMatch \.php$>
         SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>

Best regards

Thomas

1 Like