Unable to install new instance of OJS 3

Getting the dreaded blank page with this error in the log, my server info is below. I have set up the blank database to use for ojs (without any tables) however, I am not even at the stage to enter the database info yet. Permission have been set as per the instructions:

[13-Nov-2016 17:03:56] PHP Parse error: syntax error, unexpected ‘{’ in /home/omegaqa1/public_html/ojs/lib/pkp/lib/vendor/ircmaxell/password-compat/lib/password.php on line 10

Apache Version 2.4.18
PHP Version 5.6.20
MySQL Version 10.0.27-MariaDB-cll-lve
Architecture x86_64
Operating System linux

What am I doing wrong?


Hi @omegaqa,

Hmm, interesting. Can you double-check that lib/pkp/lib/vendor/ircmaxell/password-compat/lib/password.php hasn’t somehow been modified from the version that comes with OJS? What does line 10 of that file contain?

(That file is part of the password compatibility library we use, which is third-party code, but it should work fine on the server configuration you describe.)

Alec Smecher
Public Knowledge Project Team

line 10 starts here, I have not touched this file or any other code downloaded here:


namespace {

    if (!defined('PASSWORD_BCRYPT')) {
         * PHPUnit Process isolation caches constants, but not function declarations.
         * So we need to check if the constants are defined separately from 
         * the functions to enable supporting process isolation in userland
         * code.
        define('PASSWORD_BCRYPT', 1);
        define('PASSWORD_BCRYPT_DEFAULT_COST', 10);

it looks like the same code last committed by the original developer:

This was originally designed for php 5.5 so I’m wondering if 5.6 is too new. Unfortunately this is my isp’s default version so I have no way to select my version of php.

Is there something in the config file I can change to make this work?

Hi @omegaqa,

This is known to work with PHP 5.6.27 (per our CI testing environment). Could you try running the following?

php -l lib/pkp/lib/vendor/ircmaxell/password-compat/lib/password.php

This will lint the PHP script. If you get the same error message, I might suggest filing it as a new issue over at the password_compat github repository. It’s possible that there’s a bug in the specific build of PHP you’re using or something similar.

Alec Smecher
Public Knowledge Project Team

unfortunately I don’t have command line access on my server.

Hi @omegaqa,

If your server permits it, you may be able to run that command using a PHP system call in a short PHP script.

Alec Smecher
Public Knowledge Project Team

Manged to get it installed. My site admin panle was reporting a higher version of php than I actually had on the site. ISP upgraded php. Presto it worked.

Thanks for the tips.

One last question, Are there plans in the works in a future release to add an embargo feature? Basically allow published articles to be members only for a defined period then open to public once the period expires? Seems this is a feature of 2.xx versions.

Hi @omegaqa,

Yes, this will likely be released with OJS 3.1.

Alec Smecher
Public Knowledge Project Team

I don’t see embargos in the release notes for 3.1.0 . Am I missing something, or are embargos coming in a later release?

I see “1816 Implement subscription support”.

Is 3.1.0 available on the http://journals.sfu.ca demo site? And are there subscription instructions anywhere?