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

fatal error: Uncaught TypeError: array_flip() expects parameter 1 to be array, null given in #15986

Closed
PhoChiDes opened this issue Feb 23, 2020 · 11 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@PhoChiDes
Copy link

PhoChiDes commented Feb 23, 2020

I got this error now i cannot access anything

Fatal error: Uncaught TypeError: array_flip() expects parameter 1 to be array, null given in 
libraries\classes\Config\FormDisplay.php:820 Stack trace: #0 
libraries\classes\Config\FormDisplay.php(820): array_flip(NULL) #1 
libraries\classes\Config\FormDisplay.php(332): PhpMyAdmin\Config\FormDisplay->_loadUserprefsInfo() #2 
libraries\classes\Config\PageSettings.php(176): PhpMyAdmin\Config\FormDisplay->getDisplay(true, true, false, 'index.php?db=&t...', Array) #3 
libraries\classes\Config\PageSettings.php(95): PhpMyAdmin\Config\PageSettings->_getPageSettingsDisplay(Object(PhpMyAdmin\Config\Forms\Page\NaviForm), NULL) #4 
libraries\classes\Config\PageSettings.php(227): PhpMyAdmin\Config\PageSettings->__construct('Navi', 'pma_navigation_...') #5 
libraries\classes\Navigation\Navigation.php(105): PhpMyAdmin\Config\PageSettings::getNaviSettings() #6 
libraries\classes\Header.p in 
libraries\classes\Config\FormDisplay.php on line 820
  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

image
image

Server configuration

  • Operating system:

  • Web server: not sure

  • Database version: not sure

  • PHP version: not sure

  • phpMyAdmin version: not sure

  • Browser: chrome

  • Operating system: win10

I'm using xampp ver. 3.2.4
Really stuck and behind atm so i really would appreciate the fix
thanks for making a great tool though so far its really sped up progress

@williamdes williamdes added the Bug A problem or regression with an existing feature label Feb 23, 2020
@williamdes
Copy link
Member

@PhoChiDes can you give the version you are using by reading the contents of ChangeLog file

And post config.inc.php contents here

Really stuck and behind atm so i really would appreciate the fix
thanks for making a great tool though so far its really sped up progress

;)

@williamdes williamdes added this to Needs triage in issues via automation Feb 23, 2020
@williamdes williamdes moved this from Needs triage to High priority in issues Feb 23, 2020
@PhoChiDes
Copy link
Author

PhoChiDes commented Feb 23, 2020 via email

@williamdes williamdes removed this from High priority in issues Feb 23, 2020
@williamdes williamdes added invalid and removed Bug A problem or regression with an existing feature labels Feb 23, 2020
@williamdes
Copy link
Member

Can you download on our website the latest version in development (phpMyAdmin 5.0+snapshot) or latest stable version

Version 2 is very very old and we do not support it anymore.
Let me know if that solution did work for you.
You will maybe need to copy config.inc.php file to the nex unzipped version

@williamdes williamdes self-assigned this Feb 23, 2020
@williamdes williamdes changed the title atal error: Uncaught TypeError: array_flip() expects parameter 1 to be array, null given in fatal error: Uncaught TypeError: array_flip() expects parameter 1 to be array, null given in Feb 23, 2020
@PhoChiDes
Copy link
Author

PhoChiDes commented Feb 23, 2020 via email

@williamdes
Copy link
Member

williamdes commented Feb 23, 2020

Thanks, But how would I put this into xampp? Or should I just ignore it? All I am looking to do is take an input from a webform which would be local and then from the database display values in a VS program

You can replace the actual phpMyAdmin in xampp (empty folder, unzip, copy config back)
But I am quite surprised you really have version 2
Please double check this

@PhoChiDes
Copy link
Author

PhoChiDes commented Feb 23, 2020 via email

@williamdes
Copy link
Member

Nevermind must have read the wrong file it was 5.0.1 but it now has been replaced. I now get to a login and password which I didn’t have originally. I guessing I will have to just re-add the data do issues occur when a cell in a csv may be blank?

I am not sure to understand the data part. Data is stored in the database server and phpMyAdmin is only a web UI to access the data and more..
If you can login, then the issue is solved ?
Maybe consider posting screenshots so I can help you further

@williamdes williamdes added Bug A problem or regression with an existing feature and removed invalid labels Feb 23, 2020
@PhoChiDes
Copy link
Author

PhoChiDes commented Feb 23, 2020 via email

@williamdes
Copy link
Member

Its all resolved now, I just need to login but I am unsure of what to put in there. Thanks for all the help I should be back to my coding shortly

:)

Just create a config.inc.php file and paste back

<?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$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]['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]['table_uiprefs'] = 'pma__table_uiprefs';
$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';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';

/*
 * End of servers configuration
 */

?>

The username is root and no password but you will be missing $cfg['Servers'][$i]['AllowNoPassword'] = true; so creating back the file is the best option

@PhoChiDes
Copy link
Author

PhoChiDes commented Feb 23, 2020 via email

@williamdes williamdes added this to the 5.0.2 milestone Feb 23, 2020
@williamdes williamdes added this to Needs triage in issues via automation Feb 23, 2020
williamdes added a commit that referenced this issue Feb 23, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Needs triage to Closed Feb 23, 2020
@williamdes
Copy link
Member

Thank you for the report and quick responses
I patched the next version with 379dd36 so it does not occur anymore

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2021
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