Skip to content

Specify MySQL socket file via PMA_SOCKET and PMA_SOCKETS environment …#186

Merged
nijel merged 2 commits intophpmyadmin:masterfrom
s0m30n3:master
Sep 1, 2018
Merged

Specify MySQL socket file via PMA_SOCKET and PMA_SOCKETS environment …#186
nijel merged 2 commits intophpmyadmin:masterfrom
s0m30n3:master

Conversation

@s0m30n3
Copy link

@s0m30n3 s0m30n3 commented Aug 19, 2018

…variables

Signed-off-by: Évan Goujon evan.goujon@gmail.com

…variables

Signed-off-by: Évan Goujon <evan.goujon@gmail.com>
@s0m30n3
Copy link
Author

s0m30n3 commented Aug 19, 2018

Following #136 (comment)

$cfg['Servers'][$i]['AllowNoPassword'] = true;
}
for ($i = 1; isset($sockets[$i - 1]); $i++) {
if (isset($sockets[$i - 1])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition does not make sense here, it's already tested on the loop level. Maybe there should be just one loop with isset($hosts[$i - 1]) && isset($sockets[$i - 1]) condition and this would be used inside of it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right.
I adapted the code dealing with $hosts but in $sockets case, it's pointless.

Signed-off-by: Évan Goujon <evan.goujon@gmail.com>
@nijel nijel merged commit 7899e91 into phpmyadmin:master Sep 1, 2018
@nijel nijel self-assigned this Sep 1, 2018
@nijel
Copy link
Contributor

nijel commented Sep 1, 2018

Merged, thanks for your contribution!

@o-alquimista o-alquimista mentioned this pull request Mar 16, 2022
@zhangyoufu
Copy link

zhangyoufu commented Nov 9, 2024

Looping through $sockets using the same index variable $i interferes with $i--; on the following line. PMA_HOSTS & PMA_SOCKETS may not be of equal length.

This is causing troubles for people.
image
Ref: https://stackoverflow.com/questions/71342429/phpmyadmin-with-docker-not-using-ssl-when-connecting-to-aws-rds-instance

@williamdes
Copy link
Member

Thank you for reporting this !
I drafted a fix for this and hope to get a test working for it

@williamdes
Copy link
Member

Fixed by 12b0f34 @zhangyoufu

williamdes added a commit that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments