Upgrade try to OJS 3.1.2-4

Tried to upgrade PKP to the latest release and got the following error:
PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in
/var/www/html/ojs/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 373

This is the line: private function sendNotificationEmail(PKPRequest $request, PKPNotification $notification, ?int $contextId, callable $mailConfigurator = null) {

Got around in temporarily by droppingthe ?int and in place put $contextid = null

Then got an error with this:
Warning: touch(): Utime failed: Permission denied in /var/www/html/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php on line 178

Stopped there and returned to 3.1.2.1

Paul Asay
Systems Programmer
Indiana State University
paul.asay@indstate.edu

The message:

indicates an older version of PHP. 3.1.2-2 and later require PHP 7.1 (7.2 preferred).

The error:

likely indicates a file permissions problem (probably the cache directory, given the Smarty reference).

Are you upgrading via the CLI or via the web interface? Were there other nearby lines which indicate what file write failed?

So, I have similar problem. I upgraded PHP version and it’s ok now but now I’m getting these errors:
[17-Dec-2019 07:08:25 Europe/Belgrade] PHP Warning: touch(): Utime failed: No error in W:\vhosts\vjesnik1\vjesnik\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php on line 178
[17-Dec-2019 07:08:25 Europe/Belgrade] PHP Warning: touch(): Utime failed: Permission denied in W:\vhosts\vjesnik1\vjesnik\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php on line 188
[17-Dec-2019 07:08:25 Europe/Belgrade] PHP Fatal error: Uncaught → Smarty: unable to write file W:\vhosts\vjesnik1\vjesnik\cache\t_compile\00a0a0910209607cb33eb0fe6474f30ed7399ed7^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.php ←
thrown in W:\vhosts\vjesnik1\vjesnik\lib\pkp\lib\vendor\smarty\smarty\libs\sysplugins\smarty_internal_runtime_writefile.php on line 90
[17-Dec-2019 07:08:28 Europe/Belgrade] PHP Warning: file_put_contents(W:\vhosts\vjesnik1\cache\fc-pluginSettings-0-defaultthemeplugin.php): failed to open stream: Permission denied in W:\vhosts\vjesnik1\lib\pkp\classes\cache\FileCache.inc.php on line 90

Could you give me a clue of something to solve this? It won’t even show page or anything…

You’ll need to identify why PHP cannot write to:

This could be file permissions on the directory (your web user needs access), or PHP restrictions (such as the open_baseurl setting).

It was permissions problem. After updating it, everything worked great. Thank you for your help.