OJS on AWS EC2 Instance

Using the instructions from https://pkp.sfu.ca/ojs/README .

So I have created an empty instance on aws, installed the ojs files in the relevant directory, followed the info on the readme file, changed permissions where relevant and then when I got to the 4th step of installation ,
4. Open a web browser to http://yourdomain.com/path/to/ojs/ and
follow the on-screen installation instructions.

It didn’t work I kept getting a 500 error … I tried to use cli to get it done by sudo php tools/install.php and I get constraint errors in a number of files within the application.

Can I get help with fixing this issue please? … OJ 2.4.6

Hi @RCVSK,

Is there a particular reason you’re starting with OJS 2.4.6? That’s an old release – I’d suggest working with the latest 2.4.x, or better yet, start with the latest OJS 3.x.

When you see a 500 error, there’s probably something captured in your PHP error log in more detail.

Regards,
Alec Smecher
Public Knowledge Project Team

We’re using that because its the version we want … we made custom changes ourselves which will be redundant if we use any of your newer releases. That being said the idea is to integrate the current version and then update it at a late stage.

so will this error log be within your application? or somewhere inside amazon servers log?

Below are the return info i get when i run sudo php/tools/install.php inside of the ojs folder

PHP Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in /var/www/html/ojs/lib/pkp/classes/core/PKPApplication. inc.php on line 545

PHP Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in /var/www/html/ojs/lib/pkp/classes/core/PKPApplication.in c.php on line 513

PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in /var/www/html/ojs/lib/pkp/classes/core/String.inc.php on line 57

Regards
Developer

Hi @RCVSK,

The relevant error message is

PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in /var/www/html/ojs/lib/pkp/classes/core/String.inc.php on line 57

I suspect your new environment is running PHP7, which introduced its own “String” class that conflicts with the one that is included in OJS. This has been resolved in OJS3, which is PHP7-compatible, but at least for now you’ll need to run OJS 2.x with an older PHP (e.g. PHP5.6, which is still supported by Zend).

Regards,
Alec Smecher
Public Knowledge Project Team

AWS is bad. AWS is bad

Thanks for your help Alec, the php version seemed to be the problem. It worked after I downgraded to version 5.6.

Regards
Minsak