[Solved] Changing PHP version?

Hello,

For another part of my website, I needed to upgrade to php 7. According to OJS, it is 7.0.32

It was working just after the upgrade, then, few hours latter, it stoped. I tried to set installed = Off in order to get it like an upgrade, but I get an error message when I try to upgrade.

I tried also to “upgrade” to master, but it is telling me "internal error of the server… What can I do?

By the way, here are some error message:

Deprecated: Non-static method Application::getName() should not be called statically in /home/histoiresv/www/Memoires-save/lib/pkp/classes/install/form/InstallForm.inc.php on line 149

Deprecated: Non-static method Application::getName() should not be called statically in /home/histoiresv/www/Memoires-save/lib/pkp/classes/install/form/InstallForm.inc.php on line 151

Deprecated: Non-static method Application::getName() should not be called statically in /home/histoiresv/www/Memoires-save/lib/pkp/classes/install/form/InstallForm.inc.php on line 153

Deprecated: Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically in /home/histoiresv/www/Memoires-save/lib/pkp/classes/install/form/MaintenanceForm.inc.php on line 37

Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically in /home/histoiresv/www/Memoires-save/lib/pkp/classes/form/Form.inc.php on line 369

Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/histoiresv/www/Memoires-save/lib/pkp/classes/core/PKPRequest.inc.php on line 592

The Deprecated messages are unlikely to point to any significant problem. Can you share a bit more information on:

  • What OJS version you are using? (if you are using master directly from git, this is not recommended)
  • What were the symptoms of OJS “stopping”?
  • What errors do you see in the PHP error log that are not Deprecated or Strict Standards?

Hi;

I use 3.1.1-4

The symptome is:

Cette page ne fonctionne pas

Impossible de traiter cette demande via www.histoire-valenciennes-cahv.fr à l’heure actuelle.

HTTP ERROR 500

The main page that now need PHP 7 is working, either with 7.0 7.1 or 7.2

No idea on how to read the logs

Check with your server administrator or hosting provider on how to access the PHP error logs.

Alternately, you can turn on the config.inc.php option “display_errors” to show the error logs on the screen to all users.

You’ll be looking for messages of type “Error” or “Fatal”.

Here it is: Fatal error : Uncaught Error: Call to undefined function mysql_connect() in /home/histoiresv/www/Memoires/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456 Stack trace: #0 /home/histoiresv/www/Memoires/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘histoiresvmemoi…’, ‘…’, '’, ‘histoiresvmemoi…’) #1 /home/histoiresv/www/Memoires/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect(‘histoiresvmemoi…’, ‘…’, '’, ‘histoiresvmemoi…’, false) #2 /home/histoiresv/www/Memoires/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect() #3 /home/histoiresv/www/Memoires/lib/pkp/classes/db/DBConnection.inc.php(76): DBConnection->initConn() #4 /home/histoiresv/www/Memoires/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection() #5 /home/histoiresv/www/Memoires/lib/pkp/classes/db/DBConnection.inc.php(220): DBConnection->__construct() #6 /home/histoiresv/www/Memoires/lib/pkp/classes/db/DBConnection.inc.php(231): D in /home/histoiresv/www/Memoires/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

Your new PHP installation does not contain the legacy mysql drivers. This has probably been replaced by the newer mysqli library.

Try changing the config.inc.php setting driver in the database section to “mysqli” instead of “mysql”.

It works!!! Thanks a lot!!!