Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl_use php error #15304

Closed
aayush-ag opened this issue Jun 5, 2019 · 6 comments
Closed

ssl_use php error #15304

aayush-ag opened this issue Jun 5, 2019 · 6 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@aayush-ag
Copy link

Describe the bug

When trying to use phpmyadmin with an ssl secure connection, and an control user , error is producesd.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'config file' and add two users one of GENERAL DB HOST AND ONE CONTROL USER with ssl authentication ( i am using cleardb as general host and control user as jaws db).
  2. Go to installation directory an HTTP 500 error is produced.
  3. See error 500.

additional errors-
Please also fix cleardb ssl verify bug. (PEER CERTIFICATE)

Expected behavior

I was expecting a login screen.

Screenshots

If applicable, add screenshots to help explain your problem.

Server configuration

  • Operating system: LINUX (HEROKU)
  • Web server: APACHE
  • Database version: 5.7
  • PHP version: 7.3
  • phpMyAdmin version: 4.8.5

Client configuration

  • Browser: Google Chrome
  • Operating system: Windows 10 Pro

Additional context

Add any other context about the problem here.

@williamdes
Copy link
Member

Please also fix cleardb ssl verify bug

I think this can only be fixed on your host.

I will have a try soon as I have a cleardb and jawsdb instance

@williamdes williamdes self-assigned this Jun 5, 2019
@williamdes williamdes added this to Needs triage in issues via automation Jun 5, 2019
@williamdes williamdes moved this from Needs triage to Not reproduced in issues Jun 5, 2019
@aayush-ag
Copy link
Author

Even an AWS RDS gives an error.

@williamdes
Copy link
Member

williamdes commented Aug 11, 2019

Please also fix cleardb ssl verify bug. (PEER CERTIFICATE

I will check but I am not sure that it is a bug.

for now I reproduced the issue using config:

$i++;
$cfg['Servers'][$i]['verbose'] = 'SSL test';
$cfg['Servers'][$i]['DisableIS'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'eu-cdbr-west-02.cleardb.net';
$cfg['Servers'][$i]['user'] = 'xxxxxxxxxxxxxxxx';
$cfg['Servers'][$i]['password'] = 'xxxxxxxxxxxxxxxxxx';
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_verify'] = false;
$cfg['Servers'][$i]['ssl_cert'] = '/mnt/Dev/!OSS/xxx-cert.pem';
$cfg['Servers'][$i]['ssl_key'] = '/mnt/Dev/!OSS/xxx-key.pem';
$cfg['Servers'][$i]['ssl_ca'] = '/mnt/Dev/!OSS/cleardb-ca.pem';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['control_ssl'] = true;
$cfg['Servers'][$i]['controlhost'] = 'xx.yy.eu-west-1.rds.amazonaws.com';
$cfg['Servers'][$i]['controlport'] = 3306;
$cfg['Servers'][$i]['controluser'] = 'xxxxxxxx';
$cfg['Servers'][$i]['controlpassword'] = 'xxxxxxxxxxx';
$cfg['Servers'][$i]['control_ssl_verify'] = true;
$cfg['Servers'][$i]['control_ssl_ca'] = '/mnt/Dev/!OSS/rds-combined-ca-bundle.pem';
$cfg['Servers'][$i]['pmadb'] = 'xxxxxxxxx';

$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

Ref: #14804 (comment)

@williamdes williamdes added question Used when we need feedback from the submitter or when the issue is a question about PMA Bug A problem or regression with an existing feature and removed question Used when we need feedback from the submitter or when the issue is a question about PMA labels Aug 11, 2019
@williamdes williamdes moved this from Not reproduced to Reproduced in issues Aug 11, 2019
@williamdes
Copy link
Member

williamdes commented Aug 11, 2019

https://secure.php.net/manual/en/mysqli.ssl-set.php

Any unused SSL parameters may be given as NULL

NOTICE: PHP message: PHP Fatal error:  Uncaught TypeError: mysqli::ssl_set() expects parameter 1 to be string, null given in /mnt/Dev/phpmyadmintest/libraries/classes/Dbi/DbiMysqli.php:86
Stack trace:
#0 /mnt/Dev/phpmyadmintest/libraries/classes/Dbi/DbiMysqli.php(86): mysqli->ssl_set(NULL, NULL, '/mnt/Dev/!OSS/r...', NULL, NULL)
#1 /mnt/Dev/phpmyadmintest/libraries/classes/DatabaseInterface.php(2616): PhpMyAdmin\Dbi\DbiMysqli->connect('xxxxxxx...', '', Array)
#2 /mnt/Dev/phpmyadmintest/libraries/common.inc.php(375): PhpMyAdmin\DatabaseInterface->connect(257)
#3 /mnt/Dev/phpmyadmintest/index.php(23): require_once('/mnt/Dev/phpmya...')
#4 {main}
 thrown in /mnt/Dev/phpmyadmintest/libraries/classes/Dbi/DbiMysqli.php on line 86

only on master and QA_5_0 branch !

@williamdes
Copy link
Member

@williamdes williamdes added the waiting on upstream Issues blocked by a third-party label Aug 11, 2019
@williamdes williamdes removed the waiting on upstream Issues blocked by a third-party label Sep 22, 2019
@williamdes williamdes changed the title PHPMYADMIN SSL USE ERROR ssl_use php error Sep 22, 2019
@williamdes williamdes added this to the 4.9.2 milestone Sep 22, 2019
williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Sep 22, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes
Copy link
Member

@aayush-ag Thanks for your patience, this will be fixed on next release
Can you try the patch eb52589 ?

issues automation moved this from Reproduced to Closed Sep 22, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants