Problems Installing OJS with Git

Hello,

I’m trying to install OJS to my local development environment using Git, but have run into some problems. I’ve followed the instructions here: How to install OJS from Github? , and checked out the stable branch (OJS Stable 2.4.8) for both the application and lib/pkp submodule.

Here’s the error:

Fatal error: require_once(): Failed opening required
‘classes/security/Validation.inc.php’
(include_path=‘.;C:\xampp\htdocs\rds\ojs/classes;C:\xampp\htdocs\rds\ojs/pages;C:\xampp\htdocs\rds\ojs/lib/pkp;C:\xampp\htdocs\rds\ojs/lib/pkp/classes;C:\xampp\htdocs\rds\ojs/lib/pkp/pages;C:\xampp\htdocs\rds\ojs/lib/pkp/lib/adodb;C:\xampp\htdocs\rds\ojs/lib/pkp/lib/phputf8;C:\xampp\htdocs\rds\ojs/lib/pkp/lib/pqp/classes;C:\xampp\htdocs\rds\ojs/lib/pkp/lib/smarty;C:\xampp\php\PEAR’)
in C:\xampp\htdocs\rds\ojs\lib\pkp\includes\functions.inc.php on line 32

Any advice you could offer would be greatly appreciated.

Thanks.

Trip Rems
CDS Media Center

Hi @wrems,

Does the file classes/security/Validation.inc.php exist? If not, it should – you can see at ojs/Validation.inc.php at ojs-2_4_8-0 · pkp/ojs · GitHub that it’s in ojs-2_4_8-0. If it does exist, then I suspect you have a problem with file permissions that’s preventing it from loading.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

Thanks for the quick reply. I was missing *validation.inc.php *(and a
number of other files), so I checked out the latest branch (OJS
2.4.8.1). I’m now able to get to the database upgrade/install page, but
have run into another error:

Fatal error: Class ‘DOIExportPlugin’ not found in
C:\xampp\htdocs\rds\ojs\plugins\importexport\crossref\CrossRefExportPlugin.inc.php
on line 43

I checked both the crossref and datacite folders and the DOIExport
Plugin and symbolic links are in place.

Thanks.

-Trip

Hi @wrems,

The git repository contains a few symbolic links, which appear not to work in a Windows environment. Here is some documentation on how to work around it:

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

I copied plugins files from the datacite folder to the crossref and medra folders. Also, I pulled the counter plugin files (which were missing) from the git repo. Here’s the new error:

WARNING: filemtime(): stat failed for locales.xml In file: C:\xampp\htdocs\rds\ojs\lib\pkp\classes\i18n\PKPLocale.inc.php

I checked the registry folder in OJS and locales.xml exists and has read/execute permissions for all users.

Any advice you could offer would be greatly appreciated.

Thanks.

-Trip

Hi @wrems,

Hmm, it still sounds to me like something is preventing PHP applications from accessing registry/locales.xml. If I were debugging this, I would try a test script containing something like…

<?php ini_set('display_errors', 1); echo filemtime('registry/locales.xml'); ?>

I would put this in the same directory as the OJS index.php wrapper then call it from the browser.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

I set up a test script inside of the OJS application folder, and I’m
able to retrieve the file modification time for locales.xml. Do you have
any other suggestions that we could try?

Thanks.

-Trip

Hi @wrems,

Now I’m wondering why the error message is

 WARNING: filemtime(): stat failed for locales.xml In file: C:\xampp\htdocs\rds\ojs\lib\pkp\classes\i18n\PKPLocale.inc.php

…and not…

WARNING: filemtime(): stat failed for registry/locales.xml In file: C:\xampp\htdocs\rds\ojs\lib\pkp\classes\i18n\PKPLocale.inc.php

Note the different paths. Have there been any modifications to PKPLocale.inc.php? You should be able to see the path defined near the top of the file…

define('LOCALE_REGISTRY_FILE', 'registry/locales.xml');

…and the call to filemtime down below…

if ($cacheTime !== null && $cacheTime < filemtime(LOCALE_REGISTRY_FILE)) {
    $cache->flush();
}

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

We have not made any modifications to PKPLocale.inc.php. I’m wondering
if we are just missing a configuration parameter:

define(‘LOCALE_REGISTRY_FILE’, Config::getVar(‘general’,
‘registry_dir’)
. DIRECTORY_SEPARATOR . ‘locales.xml’);

Thanks.

-Trip

Hi @wrems,

I don’t have a Windows machine so can’t confirm – and as far as I know there are plenty of Windows users out there running OJS without hitting that problem – but it’s worth a try.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok… thanks Alec. We may just wait for OJS version 3.0. Do you happen
to know if there will be an upgrade path from 2.4.6 to version 3?
Thanks. -Trip

Hi @wrems,

You won’t have to wait long!

There will be an upgrade path from OJS 2.4.x to 3.0; see the PKP blog for some details.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok… thanks Alec. Do you happen to know how long we might have to wait
for a version with subscription-access control? -Trip

Hi @wrems,

We haven’t made formal plans yet – too busy getting 3.0 ready for release – and to some extent we prioritize development based on community feedback. Details on your requirements would be useful; do you have an external membership or subscription management application, or are you looking to manage lists within OJS?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

We use OJS to manage subscriptions. For institutional subscribers, we
limit access by domain and IP range. Do you happen to know when these
features will be available in version 3?

Thanks.

-Trip

Hi @wrems,

We haven’t made formal plans yet, but it’s certainly large in our priority list.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok… thanks Alec. Aloha, -Trip

Hi @asmecher @wrems
I had the same error with OMP 1.2.0, turns out I was using a config-file from an incompatible version. I.e. when I checked out another version of OMP from the git repo, I still had my old config-file where I made the mistake of only changing installed to off, instead of overwriting it with the correct template.

Simon

1 Like