phpmyadmin

I have faced this error recently , look like this 

 

Warning in ./libraries/sql.lib.php#601

count(): Parameter must be an array or an object that implements Countable

Bractrace:

error

 

This warning comes again and again when you try to access phpmyadmin databases tables ,

below solution I tried may be got help to you also :

OPEN THE BELOW FILE

/usr/share/phpmyadmin/libraries/sql.lib.php

and search for this line 

(count($analyzed_sql_results[‘select_expr’] == 1)

change this line to this :

(count($analyzed_sql_results[‘select_expr’]) == 1

 

Whole Function will be look like this:

function PMA_isRememberSortingOrder($analyzed_sql_results)
{
    return $GLOBALS['cfg']['RememberSorting']
        && ! ($analyzed_sql_results['is_count']
            || $analyzed_sql_results['is_export']
            || $analyzed_sql_results['is_func']
            || $analyzed_sql_results['is_analyse'])
        && $analyzed_sql_results['select_from']
        && ((empty($analyzed_sql_results['select_expr']))
            || ((count($analyzed_sql_results['select_expr']) == 1)
                && ($analyzed_sql_results['select_expr'][0] == '*')))
        && count($analyzed_sql_results['select_tables']) == 1;
}

Hope this will remove the warning.

Thanks

Comments

Add new comment

Other Articles

Drupal Country code default array

include_once DRUPAL_ROOT . '/includes/locale.inc'; country_get_list();  

what is namespace in PHP?

https://stackoverflow.com/questions/3384204/what-are-namespaces

Drupal 8 correct a word by default browser auto correct options on textarea field causing by CKEditor

If you are facing the problem to to correct the word in drupal 8 text because of copy and paste default popup on right, we have a simple trick to get over it 

How to make patch file drupal for contributed or custom modules.

Following Links will Helps you to do same.https://www.drupal.org/node/534548

Install Multiple PHP 7.3 / 7.2 / 7.1 on Ubuntu 18.04 / Ubuntu 16.04

If you want to Install Multiple PHP version on ubuntu/Linux system then this tutorial is for you. and on ubuntu shell using root user and follows steps below:

Print array or object in watchdog drupal 7

hey, For many purpose we have to print the array or object while making a custom modules or debuging any old module, we have to print the array or object to see the values are fine or not, drupal p

Bootstrap subtheme dropdown Drupal 7

Steps to create sub theme and mutilevel dropdown :-

Drupal 8 add custom menu classes to using menu.html.twig

In Drupal 8 Twig templates give extra power to drupal to add dynamic content in twig style, In this tutorial we can see how we can add the custom menu classes to menu ul li using menu.html.twig.

Use Drush in Cron to execute the task in multiple Drupal Instance..

As many of us using drush as command line tool for drupal for various task because it is easy to use and save time for searching dependency of module and libraries for various of module, In this tu

Slice array Elements using Keys PHP

Many Helpful Function are available to exact the specific set of keys of an array $sliced-arr = array_slice($new_tags, 0, 6);

Changing the year range in the form's date element drupal form api

Drupal form api ap usually used to build the custom form to extended the functionality of drupal according to your need.

Drupal 8 mutlisite setup

In Drupal 8 Multisite setup is almost same as the Drupal 7.

Bootstrap 4 Uncaught TypeError: Cannot read property 'fn' of undefined

while using bootstrap 4 we usually get this kind of error and jquery bootstrap.min.js is working correctly Error  is:

Embed Google maps on website (Static address )

Here using this website  we can get the embed the static map on our website.

Install JAVA 8 on Ubuntu 18.04/16.04

Install java on Ubuntu 1)Install Oracle Java 8 

Nodejs With Xampp

Hello Guys, We can easily connect the Nodejs with xampp by follow simple steps -

Important Mysql Commands that will we used with ssh

Commands Access monitor: mysql -u [username] -p; (will prompt for password) Show all databases: show databases;

Subscribe to Mailchimp programmatically via api with PHP

In this tutorial we can see how to subscribe to the mailchimp subscribe list using php programmatically via api, For this you need a mailchimp account, api key and list id 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)

Sometimes we get this php error on long page load or load many files are at once Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)

How to get your MailChimp LIST ID

Mailchimp is marketing automation platform and is provide email for marketing your product or business whatever you like, today its most trusted service providing all over the globe.

Render a drupal node d7

If you want to render a node in drupal 7 it is pretty easy, you just a node id or nid of node for doing this: simply

How to Manually Disable a WordPress Plugin

 Manually Disable a WordPress Plugin in Just 4 Steps :

Prevent to Load a js file on particular page using hook_js_alter Drupal 7

Drupal provided the lots of hook to extents its functionality, using this we can prevent a js file to load on particular page using HOOK_JS_ALTER

Recent Posts

Create a Flag link programmatically and render flag link in twig template drupal 8

This article is refer to generate the flag link programmatically and render in drupal 8 twig template, before in drupal 7 its was quiet easy to render or generate flag link in just a single line of

Jquery prevent enter to submit form

If you want to prevent the form submit using jquery, then this page helps you to doing this.

Code:

Play Pause HTML5 Video using Jquery

HTML5 video playing on any web page is very easy, in this tutorial we can show you how to add video on html and make it play and pause without using html controls.

Import and Export Drupal 8 Views, Or Import and Export any configuration Drupal 8

Import and Export configuration is the basic protocol to staging the website or production website deployment, In Drupal 7, we need the extra modules to import and export or we can use features mod

How to override different version of Jquery in Drupal 8 using theme

Drupal 8 use its own jquery version by default and if you want to use the other version of jQuery instead of default than this tutorials steps is for you, sometimes we need different version to oth

Subscribe to Mailchimp programmatically via api with PHP

In this tutorial we can see how to subscribe to the mailchimp subscribe list using php programmatically via api,

For this you need a mailchimp account, api key and list id 

How you can get Mailchimp API KEY

By Follow steps below, you can find the api key or create the api key at mailchimp and use it to your website to connected the site with mailchimp to collect the subscribe in fastest way.

How to get your MailChimp LIST ID

Mailchimp is marketing automation platform and is provide email for marketing your product or business whatever you like, today its most trusted service providing all over the globe.

Drupal 8 add custom menu classes to using menu.html.twig

In Drupal 8 Twig templates give extra power to drupal to add dynamic content in twig style, In this tutorial we can see how we can add the custom menu classes to menu ul li using menu.html.twig.

How to create the directories and sub directories in one command linux

Many times we are want to create multiple directories and sub-directories under it and usually we do cd and mkdir one by one, it is very time consuming and it sometimes slow down our workflow.

Create Node drupal 8 programmatically with image upload using custom module

As we know drupal 8 use symphony, so module structure of drupal 8 is change and workflow functionality of doing thing also change.