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

Undefined index: ssl_% variables #14804

Closed
WKupper opened this issue Dec 21, 2018 · 10 comments
Closed

Undefined index: ssl_% variables #14804

WKupper opened this issue Dec 21, 2018 · 10 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@WKupper
Copy link

WKupper commented Dec 21, 2018

This issue:
#12929

Seems to still occur.

Steps to reproduce:
Configure a MySQL connection with SSL but without key in config.inc.php.
Login to phpMyAdmin.

Expected behaviour
No warnings or errors.

Actual behaviour
The configuration causes a warning: "Undefined index: ssl_ca_paths". But also doubles for all ssl_% variables seemingly. Any of the ssl_ variables that are left out or not defined in the config.inc.php generate errors.

Server configuration
phpMyAdmin version: 4.8.4

$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_ca'] = '/xxxx/ca-cert.pem';
$cfg['Servers'][$i]['ssl_key'] = '/xxxxx/client-key.pem';
$cfg['Servers'][$i]['ssl_cert'] = '/xxxxx/client-cert.pem';

This will generate two errors, Undefined index: on ssl_ca_path and ssl_ciphers

Adding

$cfg['Servers'][$i]['ssl_ca_path'] = '';
$cfg['Servers'][$i]['ssl_ciphers'] = 'DHE-RSA-AES256-SHA';

To config.inc.php makes the Warning go away.

@WKupper WKupper changed the title Undefined index: ssl Undefined index: ssl_% variables Dec 21, 2018
@williamdes
Copy link
Member

@WKupper I can not reproduce this issue using phpMyAdmin 4.8.4 and php 7.1,7.2,7.3

Config

$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'server';
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_ca'] = '/etc/mysql/mysql_keys/ca-cert.pem';
$cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/mysql_keys/127-client-key.pem';
$cfg['Servers'][$i]['ssl_cert'] = '/etc/mysql/mysql_keys/127-client-cert.pem';

Did I miss something ?

@williamdes williamdes added the question Used when we need feedback from the submitter or when the issue is a question about PMA label Dec 31, 2018
@WKupper
Copy link
Author

WKupper commented Jan 10, 2019

No, I believe that to be correct. Will investigate on my side and update. Perhaps a setting related to the error_reporting in php.ini?

@kartik1000
Copy link
Contributor

@WKupper I can not reproduce this issue using phpMyAdmin 4.8.4 and php 7.1,7.2,7.3

Config

$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'server';
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_ca'] = '/etc/mysql/mysql_keys/ca-cert.pem';
$cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/mysql_keys/127-client-key.pem';
$cfg['Servers'][$i]['ssl_cert'] = '/etc/mysql/mysql_keys/127-client-cert.pem';

Did I miss something ?

I couldn't replicate it as well on phpmyadmin (Version: 4.8.4) and demo server too.

@williamdes
Copy link
Member

Param Value
Error Type Notice
Error Message Undefined index: ssl_key
Exception Type php
phpMyAdmin version 4.8.5
Incident count 4
Link Report#55810

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

Param Value
Error Type Notice
Error Message Undefined index: ssl_cert
Exception Type php
phpMyAdmin version 4.8.5
Incident count 4
Link Report#55811

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

Param Value
Error Type Notice
Error Message Undefined index: ssl_ca_path
Exception Type php
phpMyAdmin version 4.8.5
Incident count 3
Link Report#55812

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

Param Value
Error Type Notice
Error Message Undefined index: ssl_ciphers
Exception Type php
phpMyAdmin version 4.8.5
Incident count 3
Link Report#55813

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

Param Value
Error Type Notice
Error Message Undefined index: ssl_ca
Exception Type php
phpMyAdmin version 4.3.8
Incident count 4
Link Report#6623

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

I think I reproduced this issue (on the check phpmyadmin configuration database page)

Using a cleardb instance and a jawsdb instance

$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';

@williamdes williamdes added 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 self-assigned this Aug 11, 2019
@williamdes williamdes added this to Needs triage in issues via automation Aug 11, 2019
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Aug 11, 2019
williamdes added a commit to williamdes/phpmyadmintest that referenced this issue Sep 22, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes added this to the 4.9.2 milestone Sep 22, 2019
@williamdes
Copy link
Member

@WKupper can you please try the patch 9a6a66b ?

issues automation moved this from to be fixed soon 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

3 participants