OJS 3.1: Why Exactly This Requires PHP 5.6?

Is there a document that explains what was done to OJS 3.1 that makes PHP 5.6 a ‘requirement’?

I have just installed it on PHP 5.4 on a dev/test machine running MS Server 2003.

I haven’t explored past the point of getting it installed.

Any comprehensive listing of what troubles I can expect to see?

I do not have a comprehensive list, but it seems that at least Slim requires 5.6 and OJS is using it. I had this error that was fixed by upgrading php: OJS 3.1.0-1 New submission listing not working after upgrade, error in slimphp and build.js · Issue #3234 · pkp/pkp-lib · GitHub

I guess the bigger issue here is that 5.4 is not a supported version of PHP anymore, meaning that there are no security fixes etc. http://php.net/supported-versions.php

1 Like

Slim… I do not know what that is as yet. But looking at the error posted in the issue at the Github, I see that the code is using try/catch/finally where finally made its appearance in PHP5.5. So, I will investigate if an earlier version of Slim may work.

This is good to know and the exact thing I am wanting to become aware of.

IMHO, the application must not take the blame for the faults of the platform. Granted, work-arounds may be a very!!! good idea (see: Spectre and Meltdown).

Slim is probably not the only thing that requires 5.6. I have seen a lot of topics concerning problems with old PHP versions, you could try searching the forum.

It could be alot of work to make OJS work with 5.4 compared with the trouble of upgrading/changing the server.

1 Like

I think that it would be irresponsible to build system that requires php that is not secure. Consequently, we should find a way how to accommodate that we use libraries that require versions of php that are supported and secure.
I came across various settings in which they have had serious problems due to obsolete versions of php and other software.

If push comes to shove, I would more likely compare the feature set of, and evaluate OJS3.0.

All your contributions can be valuable. From my point of view security must be taken into consideration especially having in mind GDPR compliance regulations that will be in force in 3 months.

Hi @bsmither,

Have a look at the supported PHP versions page. At this point anything before PHP5.6 is unsupported and should be considered dangerous to run. Trying to get OJS 3.1+ to run on an unsupported PHP release, or staying with OJS 3.0.x, might buy you a little time – but not safely or satisfactorily, I suspect.

Is there a reason you’re looking to stay with an older PHP?

Alec Smecher
Public Knowledge Project Team

PHP 5.4 is the last to run on Windows Server 2003.

Is there a reason I’m looking to stay with an older server OS? It’s what I have. (I played with Linux Mint 18. After 1 week I binned it.)

Hi @bsmither,

Microsoft’s long-term support for Windows Server 2003 – including, crucially, security updates – ended in July 2015. Simply put, there’s no way to run it safely.

Alec Smecher
Public Knowledge Project Team

I wish to focus on OSJ3.1 and the potential obstacles and errors I should expect to see based on using commands and syntax specific to any particular version of PHP (and whether that was a conscious decision or happenstance).

If you want to use GNU/Linux on server then you can choose some distribution that is more suitable for that purpose. CentOS, Ubuntu, Debian and some others are quite tested in server environments.

Hi @bsmither,

So far we’ve never required a version of PHP newer than the oldest long-term support version, so essentially, OJS runs with any supported version of PHP. That’s a pattern I think we’ll be able to maintain long-term.

When users attempt to run OJS 3.1 on versions of PHP older than 5.6, the errors I’ve seen tend to include syntax errors due to exception handling, lambda functions, etc. But as @ajnyga points out the major motivating factor was the introduction of the Slim microframework, and I don’t have much knowledge of its internals, so you might need to follow up with that project on the likelihood of running it on an old PHP.

I do recommend strongly that you invest your time in a server update rather than trying to back-port – but of course it’s your choice, so I’ll stop harping on about it after this :slight_smile:

Alec Smecher
Public Knowledge Project Team

Try Debian

@bsmither: Linux Mint is meant for desktop systems, not servers.
I recommend you give Debian stable a try. It provides a rock-solid and easy-to-update platform with sufficiently recent versions of all relevant software and a relatively low-pain upgrade path every few years.

Administration is (from a Windows point of view) idiosyncratic, but not difficult once you get the hang of it. And there are lots of material on the web to help you with almost every single question you will encounter.

1 Like

Could you please explain me how exactly do you installed OJS 3.1 on PHP 5.4? Im having several troubles tryng to run a server with 2 different version of PHP to solve the same kind of isue.

Thak you very much


I would start by checking requirements for PHP dependencies in composer: pkp-lib/composer.json at ojs-stable-3_1_1 · pkp/pkp-lib · GitHub

PHP 5.4 is quite outdated. It was released in 2012 and end of support was in 2015. Starting from PHP 7.0 there was a drastic improvement in interpreter performance.