OAI Integration. How to?

Hi.

I have a very big mistake I could not find the way how to fix it.

I have my website based on OJS here.
All is working. But as you can see, the OAI does not work here and here

I’ve the " Error Code badVerb
Illegal OAI verb"

Is that configuration ok ?

;;;;;;;;;;;;;;;;
; OAI Settings ;
;;;;;;;;;;;;;;;;

[oai]

; Enable OAI front-end to the site
oai = On

; OAI Repository identifier
repository_id = “ojs.imodev.org

; Maximum number of records per request to serve via OAI
oai_max_records = 100

Why ? I’m a bit lost…

Thank in advance…

Quentin.

I think the problem could be this little mistake…

disable_path_info = On

Unfortunately, I dont have any idea to turn off the path_info with 1and1 shared host…

Any idea ? :grinning:

Hi @Quentin,

The badVerb response is expected behavior for the OAI interface as you’ve accessed it; you can add a verb by specifying e.g. &verb=Identify at the end of the URL.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher :slight_smile:

Thank you for your quick answer.

Unfortunately, It doesn’t work… :confused:

When I add a verb such as &verb=Identify I have a blank page
http://ojs.imodev.org/index.php?journal=RIGO&page=oai&verb=Identify

Here It’s working : Les Editions IMODEV

The main problem is : when I try to validate my website on OCLC, I’ve got an error… (the badverb error…).

I’m a bit lost… Is the disable_path_info the problem ?

Thank in advance for all you time and patience :slight_smile:

Hi @Quentin,

Basically, the disable_path_info mode causes the OAI interface to operate outside its proper specification. OAI doesn’t permit other URL query variables beyond the ones that are specifically used in OAI transactions, and disabling PATH_INFO-based URLs moves parameters that would be placed there into the query part of the URL instead.

Servers that don’t properly support PATH_INFO are in the minority, and there are often configuration tweaks you can use on shared servers to get it working. That’s the best solution, because it makes URLs a lot nicer. Unfortunately I can’t provide specific guidance for 1and1’s server configuration, but try some of these links. You might need to create a .htaccess file with a PHP configuration directive or something similar.

Regards,
Alec Smecher
Public Knowledge Project Team

I’m investigating on this issue…

1 : the restful_urls solution doesn’t work (instead it delete the .index.php in my URL, I’ve got still the badverb error in my OAI…

I’m working hard to find this solution .-.

I’ve ever tried this in my .htaccess on the root and the one in the same file… It doesn’t work.

RewriteEngine on 
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule (.*) index.php?$1

I’ve check that most of people on 1and1 server have this problem. They must have a tweak to fix it :slight_smile:

Hi @Quentin,

Turn off the restful URLs setting, and turn off the disable_path_info setting; remove the rewriting configuration. That’s the simplest place to start. Once that’s working, if you want e.g. to hide the index.php part of the URL, you can build on your working configuration.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Already done.

restulf URLs and disable_path_info are now turning off.

I’ve just tried to add this apache condition
“AcceptPathInfo On” in my .htaccess, but I’ve still the problem… The problem si from 1and1…

Hi @Quentin,

You may be able to use the ORIG_PATH_INFO server variable rather than PATH_INFO, per e.g. this reference. You would need to make this substitution in…

  • lib/pkp/classes/core/PKPRequest.inc.php
  • lib/pkp/classes/core/PKPPageRouter.inc.php
  • lib/pkp/classes/core/PKPComponentRouter.inc.php
  • lib/pkp/classes/core/PKPRouter.inc.php

I don’t know whether or not this will work, but it’s worth a try. If it doesn’t work, of course, revert the source code to its original state to keep things from getting more complicated.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you @asmecher !

It was a GENIUS solution ! Thank you SO much for you help.

Hi @Quentin,

Great! Glad to hear it works.

Regards,
Alec Smecher
Public Knowledge Project Team