Upgrade problem to 3.1.2

Hey,

I am trying to upgrade to OJS-3.1.2 from 3.1.1.4.
My PHP version is 7.2 and I configured the database driver as mysqli .
I am using the web-based upgrade script, which works pretty nicely and the upgrade finishes without any error.
The problem starts when config.inc.php is reconfigured as installed=on.
The server gives an internal error (Error 500)

42

the error log is as follows:

[Wed Mar 27 08:32:55 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: ojs2: Database connection failed! [Wed Mar 27 08:33:01 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: ojs2: Database connection failed! [Wed Mar 27 09:03:31 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: ojs2: DB Error: No such file or directory, referer: http://ejeceorgsr.cluster027.hosting.ovh.net/index.php/index/install/upgrade [Wed Mar 27 09:05:20 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: ojs2: DB Error: No such file or directory, referer: http://ejeceorgsr.cluster027.hosting.ovh.net/index.php/index/install/upgrade [Wed Mar 27 09:11:02 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached., referer: http://ejeceorgsr.cluster027.hosting.ovh.net/index.php/index/install/upgrade [Wed Mar 27 09:11:02 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached., referer: http://ejeceorgsr.cluster027.hosting.ovh.net/index.php/index/install/upgrade [Wed Mar 27 09:11:02 2019] [error] [client 62.199.98.29] [host ejeceorgsr.cluster027.hosting.ovh.net] AH10039: FastCGI: server "/homez.382/ejeceorgsr/www/index.php" stderr: PHP message: WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached., referer: http://ejeceorgsr.cluster027.hosting.ovh.net/index.php/index/install/upgrade

I can’t understand what causes this error. I tried to upgrade in another server, which gave the exactly produced the same error.

Regards,

zaratushtra

In addition my php error log has a fatal error :

  [30-Mar-2019 06:42:49 America/New_York] PHP Fatal error:  Uncaught  --> Smarty Compiler: 
    Syntax error in template "app:app:frontendpagesindexJournal"  on line 26 "{php}" {php}{/php} tags not allowed. Use SmartyBC to enable them <-- thrown in  /home/ejeceorg/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 26
1 Like

Hi @zaratushtra,

I think the error says that you have a {php} {/php} directive in the Smarty template that is not allows with the OJS 3.1.2 anymore (if I recall correctly a new versin of Smarty causes that).

I guess you have modified a .tpl file with certain php code in it. Do you know anything about that?

Regards, Primož

Hi @primozs,

yes, I have a child theme. Is there anything documentation that you remember about Smarty 3 adaptation/ complient?

Regards,

Zaratushtra

Hi @zaratushtra & @primozs

I am also seeking the solution for this error, I am upgrading to 3.1.2 and want to apply a custom template footer.tpl file. What was your solution to resolving this error? Was there a specific PHP tag you had you change? Thank you for this thread!

The {php} tag should not be used in Smarty 3.
https://www.smarty.net/docs/en/language.function.php.tpl

You’ll want to remove or rewrite the PHP functionality which was formerly used in this custom template. If you want to share that code here, others might be able to offer suggestions.

1 Like