PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.23k stars 4.81k forks source link

Error installing version 8.1 SSL connection error: SSL_CTX_set_default_verify_pat #33524

Closed jpcoke closed 2 months ago

jpcoke commented 1 year ago

Prerequisites

Describe the bug and add attachments

During the installation of version 8.1 on a subdomain, created only for that i get the following error.

image

1: 0
2: 1
[WARNING] Some commands could not be registered:
3: 2
4: 3
In ConnectionFactory.php line 142:
5: 4
6: 5
An exception occurred while establishing a connection to figure out your pl
7: 6
atform version.
8: 7
You can circumvent this by setting a 'server_version' configuration value
9: 8
10: 9
For further information have a look at:
11: 10
https://github.com/doctrine/DoctrineBundle/issues/673
12: 11
13: 12
14: 13
In AbstractMySQLDriver.php line 128:
15: 14
16: 15
An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro
17: 16
r: SSL_CTX_set_default_verify_paths failed
18: 17
19: 18
20: 19
In Exception.php line 18:
21: 20
22: 21
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
23: 22
hs failed
24: 23
25: 24
26: 25
In PDOConnection.php line 40:
27: 26
28: 27
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
29: 28
hs failed
30: 29
31: 30
32: 31
In Configuration.php line 331:
33: 32
34: 33
Argument 1 passed to PrestaShop\PrestaShop\Adapter\Configuration::restrictU
35: 34
pdatesTo() must be an instance of Shop, null given, called in /home/b001000
36: 35
0/public_html/subdomain.xxxx.com/src/Core/Addon/Theme/ThemeMa
37: 36
nagerBuilder.php on line 61
38: 37
39: 38
40: 39
In ConnectionFactory.php line 142:
41: 40
42: 41
An exception occurred while establishing a connection to figure out your pl
43: 42
atform version.
44: 43
You can circumvent this by setting a 'server_version' configuration value
45: 44
46: 45
For further information have a look at:
47: 46
https://github.com/doctrine/DoctrineBundle/issues/673
48: 47
49: 48
50: 49
In AbstractMySQLDriver.php line 128:
51: 50
52: 51
An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro
53: 52
r: SSL_CTX_set_default_verify_paths failed
54: 53
55: 54
56: 55
In Exception.php line 18:
57: 56
58: 57
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
59: 58
hs failed
60: 59
61: 60
62: 61
In PDOConnection.php line 40:
63: 62
64: 63
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
65: 64
hs failed
66: 65
67: 66
68: 67
69: 68
[WARNING] Some commands could not be registered:
70: 69
71: 70
In ConnectionFactory.php line 142:
72: 71
73: 72
An exception occurred while establishing a connection to figure out your pl
74: 73
atform version.
75: 74
You can circumvent this by setting a 'server_version' configuration value
76: 75
77: 76
For further information have a look at:
78: 77
https://github.com/doctrine/DoctrineBundle/issues/673
79: 78
80: 79
81: 80
In AbstractMySQLDriver.php line 128:
82: 81
83: 82
An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro
84: 83
r: SSL_CTX_set_default_verify_paths failed
85: 84
86: 85
87: 86
In Exception.php line 18:
88: 87
89: 88
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
90: 89
hs failed
91: 90
92: 91
93: 92
In PDOConnection.php line 40:
94: 93
95: 94
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
96: 95
hs failed
97: 96
98: 97
99: 98
In Configuration.php line 331:
100: 99
101: 100
Argument 1 passed to PrestaShop\PrestaShop\Adapter\Configuration::restrictU
102: 101
pdatesTo() must be an instance of Shop, null given, called in /home/b001000
103: 102
0/public_html/subdomain.xxxxxx.com/src/Core/Addon/Theme/ThemeMa
104: 103
nagerBuilder.php on line 61
105: 104
106: 105
107: 106
In ConnectionFactory.php line 142:
108: 107
109: 108
An exception occurred while establishing a connection to figure out your pl
110: 109
atform version.
111: 110
You can circumvent this by setting a 'server_version' configuration value
112: 111
113: 112
For further information have a look at:
114: 113
https://github.com/doctrine/DoctrineBundle/issues/673
115: 114
116: 115
117: 116
In AbstractMySQLDriver.php line 128:
118: 117
119: 118
An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro
120: 119
r: SSL_CTX_set_default_verify_paths failed
121: 120
122: 121
123: 122
In Exception.php line 18:
124: 123
125: 124
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
126: 125
hs failed
127: 126
128: 127
129: 128
In PDOConnection.php line 40:
130: 129
131: 130
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
132: 131
hs failed
133: 132
134: 133
135: 134
19:00:07 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while establishing a connection to figure out your platform version.
136: 135
You can circumvent this by setting a 'server_version' configuration value
137: 136
138: 137
For further information have a look at:
139: 138
https://github.com/doctrine/DoctrineBundle/issues/673" ["exception" => Doctrine\DBAL\Exception { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while establishing a connection to figure out your platform version.\n You can circumvent this by setting a 'server_version' configuration value\n \n For further information have a look at:\n https://github.com/doctrine/DoctrineBundle/issues/673 """]
140: 139
141: 140
In ConnectionFactory.php line 142:
142: 141
143: 142
An exception occurred while establishing a connection to figure out your pl
144: 143
atform version.
145: 144
You can circumvent this by setting a 'server_version' configuration value
146: 145
147: 146
For further information have a look at:
148: 147
https://github.com/doctrine/DoctrineBundle/issues/673
149: 148
150: 149
151: 150
In AbstractMySQLDriver.php line 128:
152: 151
153: 152
An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro
154: 153
r: SSL_CTX_set_default_verify_paths failed
155: 154
156: 155
157: 156
In Exception.php line 18:
158: 157
159: 158
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
160: 159
hs failed
161: 160
162: 161
163: 162
In PDOConnection.php line 40:
164: 163
165: 164
SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat
166: 165
hs failed
167: 166
168: 167
169: 168
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]] [--]
170: 169
171: 170

Server provider specs:

Expected behavior

Normal Installation....

Steps to reproduce

  1. Put the zip and 2 files on clean server folder
  2. Start installation process.
  3. Fill the forms with no issues.
  4. Didn´t choose to install demo products
  5. Install all suggested modules.

PrestaShop version(s) where the bug happened

8.1

PHP version(s) where the bug happened

7.4

If your bug is related to a module, specify its name and its version

No response

Your company or customer's name goes here (if applicable).

No response

florine2623 commented 1 year ago

Hello @jpcoke ,

I couldn't reproduce your issue. Can you check if your system requirements are followed : https://devdocs.prestashop-project.org/8/basics/installation/system-requirements/

Have you tried to relaunch the installation ?

Waiting for your feedback. Thanks!

jpcoke commented 1 year ago

I've tried to relaunch more than once.

Tried to change to php 8.1 on server, enabling all required extensions (the only one i can set more than 3000 is the max_input_vars - recommended is 5000) - and still get the message below:

1: 0 2: 1 [WARNING] Some commands could not be registered: 3: 2 4: 3 In ConnectionFactory.php line 142: 5: 4 6: 5 An exception occurred while establishing a connection to figure out your pl 7: 6 atform version. 8: 7 You can circumvent this by setting a 'server_version' configuration value 9: 8 10: 9 For further information have a look at: 11: 10 https://github.com/doctrine/DoctrineBundle/issues/673 12: 11 13: 12 14: 13 In AbstractMySQLDriver.php line 128: 15: 14 16: 15 An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro 17: 16 r: SSL_CTX_set_default_verify_paths failed 18: 17 19: 18 20: 19 In Exception.php line 18: 21: 20 22: 21 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 23: 22 hs failed 24: 23 25: 24 26: 25 In PDOConnection.php line 40: 27: 26 28: 27 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 29: 28 hs failed 30: 29 31: 30 32: 31 In Configuration.php line 331: 33: 32 34: 33 PrestaShop\PrestaShop\Adapter\Configuration::restrictUpdatesTo(): Argument 35: 34

1 ($shop) must be of type Shop, null given, called in /home/xxxxxxxxx/publi

36: 35 c_html/subdomian.xxxxxxxxxxx.com/src/Core/Addon/Theme/ThemeManagerBu 37: 36 ilder.php on line 61 38: 37 39: 38 40: 39 In ConnectionFactory.php line 142: 41: 40 42: 41 An exception occurred while establishing a connection to figure out your pl 43: 42 atform version. 44: 43 You can circumvent this by setting a 'server_version' configuration value 45: 44 46: 45 For further information have a look at: 47: 46 https://github.com/doctrine/DoctrineBundle/issues/673 48: 47 49: 48 50: 49 In AbstractMySQLDriver.php line 128: 51: 50 52: 51 An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro 53: 52 r: SSL_CTX_set_default_verify_paths failed 54: 53 55: 54 56: 55 In Exception.php line 18: 57: 56 58: 57 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 59: 58 hs failed 60: 59 61: 60 62: 61 In PDOConnection.php line 40: 63: 62 64: 63 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 65: 64 hs failed 66: 65 67: 66 68: 67 69: 68 [WARNING] Some commands could not be registered: 70: 69 71: 70 In ConnectionFactory.php line 142: 72: 71 73: 72 An exception occurred while establishing a connection to figure out your pl 74: 73 atform version. 75: 74 You can circumvent this by setting a 'server_version' configuration value 76: 75 77: 76 For further information have a look at: 78: 77 https://github.com/doctrine/DoctrineBundle/issues/673 79: 78 80: 79 81: 80 In AbstractMySQLDriver.php line 128: 82: 81 83: 82 An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro 84: 83 r: SSL_CTX_set_default_verify_paths failed 85: 84 86: 85 87: 86 In Exception.php line 18: 88: 87 89: 88 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 90: 89 hs failed 91: 90 92: 91 93: 92 In PDOConnection.php line 40: 94: 93 95: 94 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 96: 95 hs failed 97: 96 98: 97 99: 98 In Configuration.php line 331: 100: 99 101: 100 PrestaShop\PrestaShop\Adapter\Configuration::restrictUpdatesTo(): Argument 102: 101

1 ($shop) must be of type Shop, null given, called in /home/xxxxxxxxxxxx/publi

103: 102 c_html/xxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxx.com/src/Core/Addon/Theme/ThemeManagerBu 104: 103 ilder.php on line 61 105: 104 106: 105 107: 106 In ConnectionFactory.php line 142: 108: 107 109: 108 An exception occurred while establishing a connection to figure out your pl 110: 109 atform version. 111: 110 You can circumvent this by setting a 'server_version' configuration value 112: 111 113: 112 For further information have a look at: 114: 113 https://github.com/doctrine/DoctrineBundle/issues/673 115: 114 116: 115 117: 116 In AbstractMySQLDriver.php line 128: 118: 117 119: 118 An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro 120: 119 r: SSL_CTX_set_default_verify_paths failed 121: 120 122: 121 123: 122 In Exception.php line 18: 124: 123 125: 124 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 126: 125 hs failed 127: 126 128: 127 129: 128 In PDOConnection.php line 40: 130: 129 131: 130 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 132: 131 hs failed 133: 132 134: 133 135: 134 17:44:41 CRITICAL [console] Error thrown while running command "prestashop:schema:update-without-foreign --env=prod". Message: "An exception occurred while establishing a connection to figure out your platform version. 136: 135 You can circumvent this by setting a 'server_version' configuration value 137: 136 138: 137 For further information have a look at: 139: 138 https://github.com/doctrine/DoctrineBundle/issues/673" ["exception" => Doctrine\DBAL\Exception { …},"command" => "prestashop:schema:update-without-foreign --env=prod","message" => """ An exception occurred while establishing a connection to figure out your platform version.\n You can circumvent this by setting a 'server_version' configuration value\n \n For further information have a look at:\n https://github.com/doctrine/DoctrineBundle/issues/673 """] 140: 139 141: 140 In ConnectionFactory.php line 142: 142: 141 143: 142 An exception occurred while establishing a connection to figure out your pl 144: 143 atform version. 145: 144 You can circumvent this by setting a 'server_version' configuration value 146: 145 147: 146 For further information have a look at: 148: 147 https://github.com/doctrine/DoctrineBundle/issues/673 149: 148 150: 149 151: 150 In AbstractMySQLDriver.php line 128: 152: 151 153: 152 An exception occurred in driver: SQLSTATE[HY000] [2026] SSL connection erro 154: 153 r: SSL_CTX_set_default_verify_paths failed 155: 154 156: 155 157: 156 In Exception.php line 18: 158: 157 159: 158 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 160: 159 hs failed 161: 160 162: 161 163: 162 In PDOConnection.php line 40: 164: 163 165: 164 SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_pat 166: 165 hs failed 167: 166 168: 167 169: 168 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]] [--] 170: 169 171: 170

Also have installed phpinfo, can check on :PHP PrestaShop Info.pdf

The " app/Resources/translations " folder doesn´t even exist... The Apache module "mod_env" i cant activate it through my cPanel, although its recommended it´s not mandatory.....

florine2623 commented 1 year ago

Hello @jpcoke ,

Could you please provide us with more info ? We need more details to understand how we can reproduce your issue:

You don't know how to get this information? Please read the following article: How to create a bug report.

Thank you

jpcoke commented 1 year ago

I´ve given already som of this information but here it goes:

hostserver setup and configuration Its a shared server contrated. Apache Version | 2.4.57 MySQL Version | 8.0.34 Architecture | x86_64 Operating System | linux Shared IP Address | xxxxxxxxxxxxxxxxxxx Path to Sendmail | /usr/sbin/sendmail Path to Perl | /usr/bin/perl Perl Version | 5.26.3 Kernel Version | 4.18.0-348.7.1.lve.el8.x86_64

PrestaShop version (source) 8.1 - tried from github download page, and form official website ( https://prestashop.com/prestashop-edition-basic/) debug mode report see txt file debug log presta 81 install.txt

error logs from var folder See attached files

prod_20230804_installation.log prod-2023-08-04.log

Also tried to change the php 8.1, but same error

Curiously i found out that, the zip file with 8.1 version downloaded from github is smaller, than the "prestashop edition basic 8.1 from official website, and thought that this coulbe the problem. Deleted all "previous" installation and started a new one, but got the exact same error.

musicpanda commented 1 year ago

This error - and a solution - is discussed here: https://stackoverflow.com/questions/67934455/an-exception-occured-while-establishing-a-connection-to-figure-out-your-platform

Note that in the present PS version config.yml includes a file doctrine.yml where this setting should be done. Note also that what is done in that post is what is recommended in the output in the first post here.

musicpanda commented 1 year ago

Could you please provide us with more info ? We need more details to understand how we can reproduce your issue:

* host

* server setup and configuration

* PrestaShop version (source)

* debug mode report

* PHP error logs

* apache error log

* Javascript console log

* screenshots

This kind of reaction is very unlikely to produce any useful information. It gives the submitter of the bug report a lot of work. Yet when he might submit it it is very unlikely that it will produce any useful information. Most likely nobody will ever study it. So the only effect is deterring people from fielding bug reports.

It looks like some kind of server configuration produces this error. It is a quite common problem as on this Github channel alone you can find at least two other reports and elsewhere on the internet it is found too.

The error message is clear: "An exception occurred while establishing a connection to figure out your platform version.". This doesn't look like some kind of php or javascript bug. Doctrine has some procedure for finding the platform version and obviously that doesn't produce a result in some circumstances. That seems to happen quite often: Doctrine not only reports the error but also suggests a solution: "You can circumvent this by setting a 'server_version' configuration value. For further information have a look at: https://github.com/doctrine/DoctrineBundle/issues/673".

Now it is up to someone here on Github to figure out how Doctrine tries to find the platform version and in which circumstances that fails. And then to find a fix so that everyone can install Prestashop without bothering to fix this kind of problems.

kpodemski commented 1 year ago

@musicpanda I can't entirely agree. This is not a support center where you report a bug, and project members reproduce it without any details, putting a lot of time and effort into every reported issue.

You are correct that it is an issue reported a few times already, this is why if we have more details about the environment, we could find a pattern and finally reproduce it, because so far, we didn't.

Now it is up to someone here on Github to figure out how Doctrine tries to find the platform version and in which circumstances that fails. And then to find a fix so that everyone can install Prestashop without bothering to fix this kind of problems.

No. That would be the case if you pay for the software and you have paid support. Since it is a common problem reported by the community, we may prioritize it, but I'm writing to let you know how things work there.

musicpanda commented 1 year ago

No. That would be the case if you pay for the software and you have paid support. Since it is a common problem reported by the community, we may prioritize it, but I'm writing to let you know how things work there.

I don't believe that it is appropriate behavior to ask people irrelevant questions like error logs or tell them that you cannot reproduce it when it is obvious that that is irrelevant. Questions should be restricted to relevant information. That this is not a "support center" is not an excuse for abuse.

kpodemski commented 1 year ago

@musicpanda

When it comes to software development and fixing bugs, it can be incredibly difficult to find a solution if you are unable to replicate the issue. Look, we install PrestaShop every day, it is installed on every single pull request automatically, and automatic campaigns run every day. If something doesn't work in such a major mechanism, it clearly is caused by variables we don't know about, thus those questions about more details :)

musicpanda commented 1 year ago

@kpodemski In this case there is an issue on the Doctrine/DBAL Github. That is additional information that gives clues about the problem and how it could be solved. It seems to me that studying that is a more promising approach than some clueless search among server variables.

musicpanda commented 1 year ago

@jpcoke One of the suggestions I found when studying this issue is that it could happen with dollar signs in the database password. Can you check for that?

ChillCode commented 1 year ago

Looks like a bad configuration to me:

SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed

I'd get rid of that message first then check again.

jpcoke commented 1 year ago

@jpcoke One of the suggestions I found when studying this issue is that it could happen with dollar signs in the database password. Can you check for that?

None... Only letters and numbers

jpcoke commented 1 year ago

@musicpanda

When it comes to software development and fixing bugs, it can be incredibly difficult to find a solution if you are unable to replicate the issue. Look, we install PrestaShop every day, it is installed on every single pull request automatically, and automatic campaigns run every day. If something doesn't work in such a major mechanism, it clearly is caused by variables we don't know about, thus those questions about more details :)

I admit i´m no "tecchie", only self taught... but on same server i have up and running 3 websites with no issues ( one in version 1.6.1.24 - and other two in 1.7.8.7) all of them with separate sql databases.

I only created new sql and new subdomain folder, and try a clean install of version 8.1 following the steps...

If i´m going to inquire my hosting company, i should have an solid issue to show them what they should/could do... otherwise they´ll reply its the PS software issue....

jpcoke commented 1 year ago

Could you please provide us with more info ? We need more details to understand how we can reproduce your issue:

* host

* server setup and configuration

* PrestaShop version (source)

* debug mode report

* PHP error logs

* apache error log

* Javascript console log

* screenshots

This kind of reaction is very unlikely to produce any useful information. It gives the submitter of the bug report a lot of work. Yet when he might submit it it is very unlikely that it will produce any useful information. Most likely nobody will ever study it. So the only effect is deterring people from fielding bug reports.

It looks like some kind of server configuration produces this error. It is a quite common problem as on this Github channel alone you can find at least two other reports and elsewhere on the internet it is found too.

The error message is clear: "An exception occurred while establishing a connection to figure out your platform version.". This doesn't look like some kind of php or javascript bug. Doctrine has some procedure for finding the platform version and obviously that doesn't produce a result in some circumstances. That seems to happen quite often: Doctrine not only reports the error but also suggests a solution: "You can circumvent this by setting a 'server_version' configuration value. For further information have a look at: doctrine/DoctrineBundle#673".

Now it is up to someone here on Github to figure out how Doctrine tries to find the platform version and in which circumstances that fails. And then to find a fix so that everyone can install Prestashop without bothering to fix this kind of problems.

Hi Indeed, it gave me some work, but also intrigued about what´s causing the issue... Although, asking me twice for information i just gave....

jpcoke commented 1 year ago

@musicpanda I can't entirely agree. This is not a support center where you report a bug, and project members reproduce it without any details, putting a lot of time and effort into every reported issue.

You are correct that it is an issue reported a few times already, this is why if we have more details about the environment, we could find a pattern and finally reproduce it, because so far, we didn't.

Now it is up to someone here on Github to figure out how Doctrine tries to find the platform version and in which circumstances that fails. And then to find a fix so that everyone can install Prestashop without bothering to fix this kind of problems.

No. That would be the case if you pay for the software and you have paid support. Since it is a common problem reported by the community, we may prioritize it, but I'm writing to let you know how things work there.

Could you please indicate me a support center for my issue? Because, prestashop official site redirects to github, since they dont maintain the forum anymore.... Where do i find a paid prestashop basic install with support center? From what i know only some themes and modules are paid and (should) have support.... but even those are useless to me right now, since the basic (FREE for ALL) base software i cant install...

But, hey... i´m learning "how things work there.".... maybe start using other e-commerce software....

kpodemski commented 1 year ago

@jpcoke you could verify this problem: SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed

with your hosting provider as @ChillCode mentioned

sallemiines commented 1 year ago

Hello @jpcoke ,

I couldn't reproduce your issue.

could you please check @kpodemski proposition above ?

Waiting for your feedback. Thanks!

jpcoke commented 1 year ago

I've contacted my hosting provider, and still triyng to solve this.. but no luck for now.

jpcoke commented 1 year ago

Good news, i think i found the issue:

While exchanging messages with my host provider, i noticed, the installation step for the database assumed the adress as "127.0.0.1" and the connection test was green - ok, but on prestashop help pages it shows the adress as "localhost", wich also passed the connection test, but still got the error at 13% , and stopped there.

While i was trying to write down the steps for the hosting service to reproduce, and try to install themselves... it worked!

But there was a difference on my options thicked:

I´ve always selected Demo products : NO SSL: YES Modules: YES to ALL

But on the last try i´ve "made a mistake" - on the demo products and selected YES... and it worked!

So i´m guessing that´s the issue, if don't select demo products maybe there's some kind of issue on creating the tables on sql database. I dont know... this was the only difference on my installation process that i´ve noticed

Maybe you can reproduce the error by not selecting to install demo products.

I´ll leave it to experts to find out....

Appreciatted all the ones that came to help and try to solve this issue.

THANKS!! (now i´ve got some demo products and orders to clean...)

kpodemski commented 1 year ago

Thanks @jpcoke!

@PrestaShop/qa-functional we need to check installation without demo products 👍🏻

hibatallahAouadni commented 1 year ago

Hello @jpcoke & @kpodemski

I didn't manage to reproduce the issue with the provided infos, see the attached screen record below:

issue_33524.webm

Please check and feedback.

Thanks!

mihaelrodek commented 1 year ago

Exactly the same thing happens to me. The same error SSL_CTX_set_default_verify_paths occurs no mather what I do. I even tried regenerating my SSL certificate, also tried installing with and without demo products, nothing works. Already checked system requirements and they seem to be good. Would appreciate any help from you.

jpcoke commented 1 year ago

@hibatallahAouadni On system configuration i had "127.0.0.1" or " localhost"

Also had SSL activated

mihaelrodek commented 1 year ago

I just watched your video @hibatallahAouadni and noticed you set 127.0.0.1:3306 as database server address, I only ever put "127.0.0.1" or just "localhost". I tried your way with port along with install demo products checked to yes aaand..it works!

Have no idea what was causing the issue, tried reinstalling it multiple times but only worked right now when I did both of this, hopefully solution will be found soon

jpcoke commented 1 year ago

In my case i had, for sure, "localhost" when it worked... the only difference was the demo products (activated)...

hibatallahAouadni commented 1 year ago

@jpcoke try to disable SSL and check :pray: Waiting for your feedback.

jpcoke commented 1 year ago

Now, i have it installed... but i'm pretty sure i tried to disable it, and didn´t worked.

hibatallahAouadni commented 1 year ago

@jpcoke so it works now?

jpcoke commented 1 year ago

It worked tha time, i´ve done the instalation, and never re-tried again (since i had my problem solved) Like i said, i´ll leave it to the experts to analyse what went wrong, and apparently some people had the same issue...

hibatallahAouadni commented 1 year ago

Hello guys,

Thanks for your feedbacks :pray: Closing the issue as there's no more provided infos to help us reproducing the problem.

Thanks!

musicpanda commented 1 year ago

I protest against this conduct of affairs. As it is a common problem it is important to collect all information about it in one place. For that reason the issue should be kept open and people should be encouraged to add to this issue instead of opening yet another one.

It goes beyond my understanding how someone can call the issue "invalid".

serracol commented 1 year ago

I have exactly the same issue and problem. Just cant install the new 8 version of PS. Any hope for a fix any time soon?

kpodemski commented 1 year ago

@serracol did you follow the discussion here? try to use different DB host, or install shop without enabling SSL by default

serracol commented 1 year ago

Finally and thanks to the community I found a fix:

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_STATEMENTSQUERIES,

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

Also changed the database collation to: utf8mb4_general_ci

After this its important to delete cache folder and start again the installation process and it will finish perfectly.

serracol commented 1 year ago

@kpodemski

Finally and thanks to the community I found a fix:

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_STATEMENTSQUERIES,

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

Also changed the database collation to: utf8mb4_general_ci

After this its important to delete cache folder and start again the installation process and it will finish perfectly.

mtorromeo commented 1 year ago

I had to debug this issue for a customer and tracked it down to a wrong PDO driver option declared in app/config/doctrine.yml.

The file contained the following options:

        options:
          # PDO::MYSQL_ATTR_INIT_COMMAND
          1002: "SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))"
          # PDO::MYSQL_ATTR_MULTI_STATEMENTS
          1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

Now, the comments suggest that the configurations are meant to set the options controlled by the PDO::MYSQL_ATTR_INIT_COMMAND and PDO::MYSQL_ATTR_MULTI_STATEMENTS constants, but the value used to reference MYSQL_ATTR_MULTI_STATEMENTS is incorrect, at least for this version of PHP.

This is an excerpt of the constants printed using

$c = new ReflectionClass(PDO::class);
print_r($c->getConstants());
    [MYSQL_ATTR_USE_BUFFERED_QUERY] => 1000
    [MYSQL_ATTR_LOCAL_INFILE] => 1001
    [MYSQL_ATTR_INIT_COMMAND] => 1002
    [MYSQL_ATTR_MAX_BUFFER_SIZE] => 1005
    [MYSQL_ATTR_READ_DEFAULT_FILE] => 1003
    [MYSQL_ATTR_READ_DEFAULT_GROUP] => 1004
    [MYSQL_ATTR_COMPRESS] => 1006
    [MYSQL_ATTR_DIRECT_QUERY] => 1007
    [MYSQL_ATTR_FOUND_ROWS] => 1008
    [MYSQL_ATTR_IGNORE_SPACE] => 1009
    [MYSQL_ATTR_SSL_KEY] => 1010
    [MYSQL_ATTR_SSL_CERT] => 1011
    [MYSQL_ATTR_SSL_CA] => 1012
    [MYSQL_ATTR_SSL_CAPATH] => 1013
    [MYSQL_ATTR_SSL_CIPHER] => 1014
    [MYSQL_ATTR_SERVER_PUBLIC_KEY] => 1015
    [MYSQL_ATTR_MULTI_STATEMENTS] => 1016
    [MYSQL_ATTR_LOCAL_INFILE_DIRECTORY] => 1017

As you can see, value 1013 corresponds to the constant MYSQL_ATTR_SSL_CAPATH, which is consistent with the reported error SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed.

The value for MYSQL_ATTR_MULTI_STATEMENTS is 1016, so the issue can be resolved by changing 1013 to 1016 (in my case) in the configuration file.

I would strongly suggest changing the way these options are declared in the configuration file. Referencing constants by value, which I don't think are guaranteed to be stable, is a very bad idea.

The issue should be reopened and closed only when a proper fix is implemented.

musicpanda commented 1 year ago

Two more victims: https://www.prestashop.com/forums/topic/1080530-no-access-after-uptade/ https://www.prestashop.com/forums/topic/1080836-error-on-change-shop-from-one-server-to-another/

markoopapa commented 1 year ago

I had to debug this issue for a customer and tracked it down to a wrong PDO driver option declared in app/config/doctrine.yml.

The file contained the following options:

        options:
          # PDO::MYSQL_ATTR_INIT_COMMAND
          1002: "SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''))"
          # PDO::MYSQL_ATTR_MULTI_STATEMENTS
          1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

Now, the comments suggest that the configurations are meant to set the options controlled by the PDO::MYSQL_ATTR_INIT_COMMAND and PDO::MYSQL_ATTR_MULTI_STATEMENTS constants, but the value used to reference MYSQL_ATTR_MULTI_STATEMENTS is incorrect, at least for this version of PHP.

This is an excerpt of the constants printed using

$c = new ReflectionClass(PDO::class);
print_r($c->getConstants());
    [MYSQL_ATTR_USE_BUFFERED_QUERY] => 1000
    [MYSQL_ATTR_LOCAL_INFILE] => 1001
    [MYSQL_ATTR_INIT_COMMAND] => 1002
    [MYSQL_ATTR_MAX_BUFFER_SIZE] => 1005
    [MYSQL_ATTR_READ_DEFAULT_FILE] => 1003
    [MYSQL_ATTR_READ_DEFAULT_GROUP] => 1004
    [MYSQL_ATTR_COMPRESS] => 1006
    [MYSQL_ATTR_DIRECT_QUERY] => 1007
    [MYSQL_ATTR_FOUND_ROWS] => 1008
    [MYSQL_ATTR_IGNORE_SPACE] => 1009
    [MYSQL_ATTR_SSL_KEY] => 1010
    [MYSQL_ATTR_SSL_CERT] => 1011
    [MYSQL_ATTR_SSL_CA] => 1012
    [MYSQL_ATTR_SSL_CAPATH] => 1013
    [MYSQL_ATTR_SSL_CIPHER] => 1014
    [MYSQL_ATTR_SERVER_PUBLIC_KEY] => 1015
    [MYSQL_ATTR_MULTI_STATEMENTS] => 1016
    [MYSQL_ATTR_LOCAL_INFILE_DIRECTORY] => 1017

As you can see, value 1013 corresponds to the constant MYSQL_ATTR_SSL_CAPATH, which is consistent with the reported error SQLSTATE[HY000] [2026] SSL connection error: SSL_CTX_set_default_verify_paths failed.

The value for MYSQL_ATTR_MULTI_STATEMENTS is 1016, so the issue can be resolved by changing 1013 to 1016 (in my case) in the configuration file.

I would strongly suggest changing the way these options are declared in the configuration file. Referencing constants by value, which I don't think are guaranteed to be stable, is a very bad idea.

The issue should be reopened and closed only when a proper fix is implemented.

I have the same error when instaling but i dont know where to change the 1013 value

polrue commented 11 months ago

@mtorromeo solution worked perfectly for me. I migrated from another server and found myself with this error

dandumit commented 7 months ago

In my case I have upgraded CPanel and db from mysql 5 to mariadb 10 and resulted same error. I have deleted var cache folder and has fixed. Thank you, Daniel

musicpanda commented 4 months ago

9 months later and the problem is still present in PS 8.1.7

Is this so difficult? Change app/config/doctrine.yml:

The line 1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

should be changed into 1016: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

OliverCG commented 3 months ago

I had the same problem in PS 8.1.7 and the solution of @musicpanda solved it. Thank you!

kpodemski commented 3 months ago

@musicpanda

This would have broken the installation process for most people if we had changed that.

I agree with @mtorromeo that we should not have int values hardcoded in yml.

matks commented 2 months ago

Curious, I verified what @mtorromeo is saying.

Then I guess on same environments, the value is 1013, on other environments the value is 1016. That explains why it was so hard to reproduce the problem.

@musicpanda it means changing 1013 to 1016 will fix the problem for some users and break it for others. It's not the right solution for the software although it can be useful for specific people.

We all agree the problem is using an integer instead of whatever value the constant is. We are using 1013 instead of PDO::MYSQL_ATTR_MULTI_STATEMENTS.

matks commented 2 months ago

By the way, the options inside this file app/config/doctrine.yml are passed to the PDO PHP object in its 4th constructor argument

matks commented 2 months ago

This should work https://github.com/matks/PrestaShop/commit/0fbd0fb3df72f7b3b0beef89c29c5989b7472e60

PR https://github.com/PrestaShop/PrestaShop/pull/36732

PennymanZA commented 2 months ago

9 months later and the problem is still present in PS 8.1.7

Is this so difficult? Change app/config/doctrine.yml:

The line 1013: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

should be changed into 1016: '%env(const:runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_)%'

Thank you, this fixed the installation of PS 8.1.6 for me

ChillCode commented 2 months ago

Users having this issue are using PHP without Mysqlnd driver enabled at compilation time.

You can check phpinfo() pdo_mysql section Client API version, in my installation for instance is mysqlnd 8.1.28

[MYSQL_ATTR_USE_BUFFERED_QUERY] => 1000
[MYSQL_ATTR_LOCAL_INFILE] => 1001
[MYSQL_ATTR_INIT_COMMAND] => 1002
[MYSQL_ATTR_COMPRESS] => 1003
[MYSQL_ATTR_DIRECT_QUERY] => 1004
[MYSQL_ATTR_FOUND_ROWS] => 1005
[MYSQL_ATTR_IGNORE_SPACE] => 1006
[MYSQL_ATTR_SSL_KEY] => 1007
[MYSQL_ATTR_SSL_CERT] => 1008
[MYSQL_ATTR_SSL_CA] => 1009
[MYSQL_ATTR_SSL_CAPATH] => 1010
[MYSQL_ATTR_SSL_CIPHER] => 1011
[MYSQL_ATTR_SERVER_PUBLIC_KEY] => 1012
[MYSQL_ATTR_MULTI_STATEMENTS] => 1013
[MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] => 1014
[MYSQL_ATTR_LOCAL_INFILE_DIRECTORY] => 1015

And we can take a look at php-src and see how those constants are defined.

For user using PHP 7.4 they are also defined sequentially and we can take a look here:

For example MYSQL_ATTR_MAX_BUFFER_SIZE is 1005 on @mtorromeo output , but on php 8 the position changed so the value also changed.

So never ever use constant values, they are not assigned the way we usually do in PHP.

kpodemski commented 2 months ago

@ChillCode

So never ever use constant values, they are not assigned the way we usually do in PHP.

I am not sure what you mean. In your opinion, solution provided here in this PR is invalid? It correctly returns value depending on the configuration.