Jump to content

[SOLVED] Database Error Connection in 1.7.8.8


dwilden

Recommended Posts

Hi,

I try to install new version 1.7.8.8 on a clean server but the installation stops creating the tables with this error

"An exception occured while establishing a connection to figure out your platform version"

I using PHP 7.2.34, MySQL 5.7.40, InnoDB and DbPDO driver

(Upgrading from a working 1.7.8.7 to 1.7.8.8 same error)

Can somebody help me?

 

image.png

Edited by dwilden (see edit history)
Link to comment
Share on other sites

  • dwilden changed the title to Database Error Connection in 1.7.8.8
  • 3 weeks later...

14:28:35 ERROR [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while executing 'ALTER TABLE ps_axepta_order_reference CHANGE id_cart id_cart INT UNSIGNED AUTO_INCREMENT NOT NULL':
SQLSTATE[23000]: Integrity constraint violation: 1062 ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '1' for key 'PRIMARY'" ["exception" => Doctrine\DBAL\Exception\UniqueConstraintViolationException { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while executing 'ALTER TABLE ps_axepta_order_reference CHANGE id_cart id_cart INT UNSIGNED AUTO_INCREMENT NOT NULL':\n \n SQLSTATE[23000]: Integrity constraint violation: 1062 ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '1' for key 'PRIMARY' """]
In AbstractMySQLDriver.php line 55:
An exception occurred while executing 'ALTER TABLE ps_axepta_order_referenc
e CHANGE id_cart id_cart INT UNSIGNED AUTO_INCREMENT NOT NULL':
SQLSTATE[23000]: Integrity constraint violation: 1062 ALTER TABLE causes au
to_increment resequencing, resulting in duplicate entry '1' for key 'PRIMAR
Y'
In PDOConnection.php line 90:
SQLSTATE[23000]: Integrity constraint violation: 1062 ALTER TABLE causes au
to_increment resequencing, resulting in duplicate entry '1' for key 'PRIMARY'
In PDOConnection.php line 88:
SQLSTATE[23000]: Integrity constraint violation: 1062 ALTER TABLE causes au
to_increment resequencing, resulting in duplicate entry '1' for key 'PRIMAR
Y'
prestashop:schema:update-without-foreign [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--id_shop [ID_SHOP]] [--id_shop_group [ID_SHOP_GROUP]] [--]

Error during database upgrade. You may need to restore your database.
Error upgrading Doctrine schema

Link to comment
Share on other sites

26 minutes ago, Marquys said:

Yes but it's my PSP module, I need it...

well if the module interrupts your installation/ update? Check if the module is capable of working with the Pstashop version you woant to update to.

Link to comment
Share on other sites

2 minutes ago, Marquys said:

On the editor website it's write 1.7.8 but not 1.7.8.8. I have contacted their support, I'm waiting...

There is also Thirtybees, a prestashop fork. Install that locally and test it there. 

Link to comment
Share on other sites

  • 1 month later...

I have solved the problem to install a clean prestashop and for upgrade to the latest 1.7.8.8

MySQL don't support the MYSQL_ATTR_MULTI_STATEMENTS And I have commented the next lines from the follow files :

\classes\db\DbPDO.php line 92
//PDO::MYSQL_ATTR_MULTI_STATEMENTS => _PS_ALLOW_MULTI_STATEMENTS_QUERIES_,

\app\config\doctrine.yml line 22
# 1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

After the installation or the upgrade, you can back to the original lines.

Any information about this is wellcome

Edited by dwilden (see edit history)
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
On 2/14/2023 at 7:37 PM, dwilden said:

I have solved the problem to install a clean prestashop and for upgrade to the latest 1.7.8.8

MySQL don't support the MYSQL_ATTR_MULTI_STATEMENTS And I have commented the next lines from the follow files :

\classes\db\DbPDO.php line 92
//PDO::MYSQL_ATTR_MULTI_STATEMENTS => _PS_ALLOW_MULTI_STATEMENTS_QUERIES_,

\app\config\doctrine.yml line 22
# 1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

After the installation or the upgrade, you can back to the original lines.

Any information about this is wellcome

Thanks a lot for sharing this fix... This works well on mi side.

The older version 1.7.8.7 did not have this problem.

Link to comment
Share on other sites

  • dwilden changed the title to [SOLVED] Database Error Connection in 1.7.8.8
  • 5 months later...
On 2/15/2023 at 2:37 AM, dwilden said:

I have solved the problem to install a clean prestashop and for upgrade to the latest 1.7.8.8

MySQL don't support the MYSQL_ATTR_MULTI_STATEMENTS And I have commented the next lines from the follow files :

\classes\db\DbPDO.php line 92
//PDO::MYSQL_ATTR_MULTI_STATEMENTS => _PS_ALLOW_MULTI_STATEMENTS_QUERIES_,

\app\config\doctrine.yml line 22
# 1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

After the installation or the upgrade, you can back to the original lines.

Any information about this is wellcome

Thank you, this solved my problem as well while installing 1.7.8.9

Edited by PPSA (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...