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
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.)
Regards,
Alec Smecher
Public Knowledge Project Team
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_DEFAULT', PASSWORD_BCRYPT);
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?
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.
Regards,
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.