OJS erro php ao rodar comando para atualizar

Ola a todos, tenho servidor ubuntu e tenho o php 8.1 e 8.2 ao deixar o arquivo config.inc.hp e a pasta public apenas do ojs na versao 2.4.8.5 e pegar todos as demais pastas exceto as acima da versao 3.3.0 e rodar o comando > root@ojs-homologa:/opt/data/html/tools# /usr/bin/php7.4 /opt/data/html/tools/upgrade.php ele me retorna isso:

PHP Warning: xml_parser_set_option(): Unsupported target encoding “” in /opt/data/html/lib/pkp/classes/xml/PKPXMLParser.inc.php on line 213
PHP Fatal error: Uncaught PDOException: could not find driver in /opt/data/html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:38
Stack trace:
#0 /opt/data/html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(38): PDO->__construct()
#1 /opt/data/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct()
#2 /opt/data/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection()
#3 /opt/data/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/PostgresConnector.php(33): Illuminate\Database\Connectors\Connector->createConnection()
#4 /opt/data/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\PostgresConnector->connect()
#5 [internal function]: Illuminate\Database\Connectors\Connecti in /opt/data/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
alguem pode ajudar? meu banco é o postgresql

1 curtida

Boa tarde,

Da versão 2.x para a 3.3 vc vai precisar atualizar em etapas.
Atualize da 2.4.8.5 para a 3.2.1.4 e só depois para a 3.3.0.15.
Não esqueça de fazer backup da pasta files e do banco de dados em todas as etapas.

1 curtida

complementando a resposta do @OpenJournalSolutions, esse outro post fala sobre atualização escalonada e segurança no OJS: Submissões OJS 2.4.8.0 com perfil "intruso" e número sequencial alto - Como remover? - #2 por bernardo

Bom dia, entendido estou com o php 7.4.33 e baixei a versao 3.2.1.4 mas ao rodar o comando para atualizar aparece essa mensagem: root@ojs-homologa:/opt/data/html# php tools/upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.2.1.4]

[code: Installer Installer::checkPhpVersion]

[code: Installer Installer::syncSeriesAssocType]
PHP Fatal error: Uncaught Exception: DB Error: ERROR: column “assoc_type” does not exist
LINE 1: UPDATE email_templates SET assoc_type = 530 WHERE assoc_type…
^ Query: UPDATE email_templates SET assoc_type = 530 WHERE assoc_type = ‘526’ in /opt/data/html/lib/pkp/classes/db/DAO.inc.php:703
Stack trace:
#0 /opt/data/html/lib/pkp/classes/db/DAO.inc.php(231): DAO->handleError()
#1 /opt/data/html/classes/install/Upgrade.inc.php(742): DAO->update()
#2 /opt/data/html/lib/pkp/classes/install/Installer.inc.php(417): Upgrade->syncSeriesAssocType()
#3 /opt/data/html/lib/pkp/classes/install/Installer.inc.php(263): Installer->executeAction()
#4 /opt/data/html/lib/pkp/classes/install/Installer.inc.php(186): Installer->executeInstaller()
#5 /opt/data/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php(88): Installer->execute()
#6 /opt/data/html/lib/pkp/classes/cliTool/UpgradeTool.inc.php(64): UpgradeTool->upgrade()
#7 /opt/data/html/tools/upgrade.php(22): UpgradeTool->execute()
#8 {m in /opt/data/html/lib/pkp/classes/db/DAO.inc.php on line 703

como posso resolver??

a versao 3.2.1.4 precisa de qual versao do php??? pois ao ver o log do apache vejo varios erros do php:root@ojs-homologa:/opt/data/html# cat /var/log/apache2/error.log
[Tue Nov 14 02:47:00.307213 2023] [ssl:warn] [pid 1088165] AH01909: ojs-homologa.datacenter-agtic.ufpr.br:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 14 02:47:00.353408 2023] [ssl:warn] [pid 1088166] AH01909: ojs-homologa.datacenter-agtic.ufpr.br:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 14 02:47:00.358035 2023] [mpm_prefork:notice] [pid 1088166] AH00163: Apache/2.4.58 (Ubuntu) OpenSSL/3.0.2 configured – resuming normal operations
[Tue Nov 14 02:47:00.358056 2023] [core:notice] [pid 1088166] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Nov 14 02:47:13.812324 2023] [:error] [pid 1088167] [client 10.200.10.10:38488] ojs2: DB Error: ERROR: column “journal_id” does not exist\nLINE 4: AND ps.setting_name = ‘enabled’ AND ((journal_id = $1)…\n ^
[Tue Nov 14 02:47:52.274523 2023] [:error] [pid 1088168] [client 10.200.10.10:43176] ojs2: DB Error: ERROR: column “journal_id” does not exist\nLINE 4: AND ps.setting_name = ‘enabled’ AND ((journal_id = $1)…\n ^
[Tue Nov 14 02:48:29.467906 2023] [:error] [pid 1088169] [client 10.200.10.10:38638] ojs2: DB Error: ERROR: column “journal_id” does not exist\nLINE 4: AND ps.setting_name = ‘enabled’ AND ((journal_id = $1)…\n ^
[Tue Nov 14 02:50:03.914001 2023] [:error] [pid 1088170] [client 10.200.10.10:42932] ojs2: DB Error: ERROR: column “journal_id” does not exist\nLINE 4: AND ps.setting_name = ‘enabled’ AND ((journal_id = $1)…\n ^
[Tue Nov 14 02:55:55.191497 2023] [:error] [pid 1088171] [client 10.200.10.10:56546] PHP Warning: Constants may only evaluate to scalar values in /opt/data/html/lib/pkp/classes/db/DBConnection.inc.php on line 17
[Tue Nov 14 02:55:55.220064 2023] [:error] [pid 1088171] [client 10.200.10.10:56546] PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /opt/data/html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374
[Tue Nov 14 02:56:38.297195 2023] [mpm_prefork:notice] [pid 1088166] AH00170: caught SIGWINCH, shutting down gracefully
[Tue Nov 14 02:56:38.384835 2023] [ssl:warn] [pid 1116384] AH01909: ojs-homologa.datacenter-agtic.ufpr.br:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 14 02:56:38.432940 2023] [ssl:warn] [pid 1116385] AH01909: ojs-homologa.datacenter-agtic.ufpr.br:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 14 02:56:38.437457 2023] [mpm_prefork:notice] [pid 1116385] AH00163: Apache/2.4.58 (Ubuntu) OpenSSL/3.0.2 configured – resuming normal operations
[Tue Nov 14 02:56:38.437477 2023] [core:notice] [pid 1116385] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Nov 14 02:56:43.421719 2023] [:error] [pid 1116386] [client 10.200.10.10:44676] PHP Warning: Constants may only evaluate to scalar values in /opt/data/html/lib/pkp/classes/db/DBConnection.inc.php on line 17
[Tue Nov 14 02:56:43.447782 2023] [:error] [pid 1116386] [client 10.200.10.10:44676] PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /opt/data/html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374
[Tue Nov 14 02:58:42.744438 2023] [:error] [pid 1116387] [client 10.200.10.10:40116] PHP Warning: Constants may only evaluate to scalar values in /opt/data/html/lib/pkp/classes/db/DBConnection.inc.php on line 17
[Tue Nov 14 02:58:42.746987 2023] [:error] [pid 1116387] [client 10.200.10.10:40116] PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /opt/data/html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374
[Tue Nov 14 03:09:19.258022 2023] [:error] [pid 1116388] [client 10.200.10.10:33052] PHP Warning: Constants may only evaluate to scalar values in /opt/data/html/lib/pkp/classes/db/DBConnection.inc.php on line 17
[Tue Nov 14 03:09:19.260728 2023] [:error] [pid 1116388] [client 10.200.10.10:33052] PHP Parse error: syntax error, unexpected ‘?’, expecting variable (T_VARIABLE) in /opt/data/html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php on line 374

@JUCIO_GABRIE

Tem que refazer toda a atualização novamente. Tem que fazer o rollback pra revista em funcionamento para depois testar a atualização. Caso der algum erro no script de atualização vc deve voltar o status da revista. O script de atualização não faz o rollback.

Sobre sua pergunta a versão 3.2 funciona com a versão 7.3 do PHP. Acima das versão 3.3 você precisa atualizar o PHP para 7.4 ou acima.

2 curtidas