Cannot install OJS

Hi,

I have been trying to install the lastest version of OJS through softaculous but I keep running into a 503 Error. I have talked to my host about this but we can’t get around this. I have also tried to install OJS in many different ways but I either end up with a blank screen (I’ve seen the problem before, install doesn’t finish, that doesn’t help) or a 503 Error.

The latest error in debug mode was:

Parse error : syntax error, unexpected ‘.’, expecting ‘&’ or variable (T_VARIABLE) in /home/someplace/domains/someplace.nl/public_html/lib/pkp/lib/vendor/illuminate/support/helpers.php on line 554

Are there any specific modules that my host might miss or anything else that can explain this phenomenon?

Thank you in advance.

Kyle

Hi @JOTE,

From the code that is referenced in this error, I see that the the ... token is used before a method’s parameter. This is supported starting by PHP 5.6 but in general, I’d recommend to use PHP 7.1 or later for OJS 3.1.2-1, which I assume you are trying to install. Can you confirm that you are using supported PHP version?

Hi,
I have tried 5.6 and 7.1. Neither worked.
And Yes I am installing OJS 3.1.2-1

Hi guys,
We are exactly at this point. Is there any way to fix it?

Thanx

Hi all,

This error message is definitely caused by trying to run OJS with a version of PHP that’s too old. OJS 3.1.2-1 requires at least PHP 7.0.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi all,

That’s weird, because I am 100% sure that I am using PHP 7.1.
I talked to my hosting service and they encountered the same problem.

Are you sure nothing else could be causing the problem?

Kind regards,
Kyle

Hi @JOTE,

Try creating a test PHP script on your server containing…

<?php phpinfo();

Then load it in your browser. This will tell you unequivocally what version of PHP you’re using.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher. You are right.
It looks like the version of PHP that the server uses for CLI is different than the one it uses for other interfaces. You can easily check it with the command

php -v

You can try to change the PHP version your user uses: How to configure a specific command line PHP version for an SSH user on a Plesk for Linux server? – Plesk Help Center

Or also you can select the path of the PHP version you want to use to run the upgrade command. In Plesk, you can find clues about this path in the PHP settings of your server user panel. In my case I’ve used

/opt/plesk/php/7.1/bin/php tools/upgrade.php upgrade

Hope it helps.

Keep going.
Regards,
Daniel

@asmecher

Hi

I had already tried this and yes I am indeed running 7.1.30 but I still cannot install OJS.
Do you have any other ideas what it might be?

Kind regards,
Kyle

Hi @JOTE,

If you’re still getting…

Parse error : syntax error, unexpected ‘.’, expecting ‘&’ or variable (T_VARIABLE) in /home/someplace/domains/someplace.nl/public_html/lib/pkp/lib/vendor/illuminate/support/helpers.php on line 554

…then you’re definitely running something older than PHP 7.x. Did you try my suggestion above? Or are you having a new/different issue?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

I’m still getting this exact error. I tried your suggestion and no I am not running something older than PHP 7.x. I have the logs at hand. This can’t be it.

Kind regards,
Kyle

Hi @JOTE,

What output did you get from the test script?

Regards,
Alec Smecher
Public Knowledge Project Team

I’m having the same problem:
Parse error : syntax error, unexpected ‘.’, expecting ‘&’ or variable (T_VARIABLE) in /home1/temas758/public_html/lib/pkp/lib/vendor/illuminate/support/helpers.php on line 1141
My PHP version is 7.1.

1 Like

Hi, I got the same error " Parse error : syntax error, unexpected ‘.’, expecting ‘&’ or variable (T_VARIABLE) in /home3/rportilo/riig.posgradocolumbia.edu.py/ojs/lib/pkp/lib/vendor/illuminate/support/helpers.php on line 1141"
ihave PHP Version 7.3.13
Trying to install ojs-3.2.0-2 over a linux , Linux gator3060.hostgator.com 4.14.135-214.ELK.el6.x86_64 #1 SMP Wed Jul 31 01:59:27 CDT 2019 x86_64

Hola @RubenPortilloA y @CarlosBLJr,

Hay que verificar tu version de PHP; estoy seguro que es algo mas viejo que 7.1. Podes verificar con un script con contenidos asi:

<?php phpinfo();

Saludos,
Alec Smecher
Public Knowledge Project Team