Notice in libraries displayresults php

error in phpMyAdmin DisplayResults.php#1226

In file /usr/share/phpmyadmin/libraries/DisplayResults.php, on line 1233:

list($order_link, $sorted_header_html) = $this->_getOrderLinkAndSortedHeaderHtml( $fields_meta[$i], $sort_expression, $sort_expression_nodirection, $i, $unsorted_sql_query, $session_max_rows, $comments, $sort_direction, $col_visib, $col_visib[$j] ); 

I’ve inserted a new validation of «isset» like:

$check = (isset($col_visib[$j])) ? $col_visib[$j] : false; 

But using in the condition..

list($order_link, $sorted_header_html) = $this->_getOrderLinkAndSortedHeaderHtml( $fields_meta[$i], $sort_expression, $sort_expression_nodirection, $i, $unsorted_sql_query, $session_max_rows, $comments, $sort_direction, $col_visib, isset($col_visib[$j]) ? $col_visib[$j] : false ); 

@edit Using php higher than 7.2. We can change

isset($col_visib[$j]) ? $col_visib[$j] : false 
list($order_link, $sorted_header_html) = $this->_getOrderLinkAndSortedHeaderHtml( $fields_meta[$i], $sort_expression, $sort_expression_nodirection, $i, $unsorted_sql_query, $session_max_rows, $comments, $sort_direction, $col_visib, $col_visib[$j] ?? false ); 

Solution 2

I have also faced the same notice after upgrading php 7.2 to 7.4 on phpmyadmin 4.6

Below steps solved my issue.

  1. Install PPA by hiting sudo add-apt-repository ppa:phpmyadmin/ppa Check the issue here
  2. Then run sudo apt update & sudo apt upgrade
  3. Finally restart your apache sudo systemctl restart apache2

Now i am running phpmyadmin 4.9.5deb2 and notice gone

Solution 3

I have upgraded php 7.2 to 7.4 and the problem with phpMyAdmin still on the same error.

Читайте также:  Уроки кода на java

The best option for me was, go to a official website:

Download the lastest version, so after I went to /var/www/html where my phpMyAdmin is placed and I copy from ~/Downloads my latest version unzip as bellow:

sudo cp ~/Downloads/phpMyAdmin-5.0.4-all-languages.zip .

To assure that I had the old version I changed the name of old version

sudo mv phpMyAdmin oldphpMyAdmin

So then I unzip the new version

sudo unzip phpMyAdmin-5.0.4-all-languages.zip

After Unzip I renamed to phpMyAdmin like before

mv phpMyAdmin-5.0.4-all-languages phpMyAdmin

I tested on Browser, everything works fine. After I deleted the oldversion

I’m running on Ubuntu 16.04.7 LTS

Fask

Comments

Iam trying to show all records in phpmyadmin, phpmyadmin givin warning When I try to access on the of the tables in my database on PHPMyAdmin, it seems to crash PHPMyAdmin alltogether. I can’t find solutions online and I ask for your help I have a problem that I can’t solve, error Notice in ./libraries/DisplayResults.php#1226

 Notice in ./libraries/DisplayResults.php#1226 Trying to access array offset on value of type bool Backtrace ./libraries/DisplayResults.php#1346: PMA\libraries\DisplayResults->_getTableHeadersForColumns( array, array, array, array, array, boolean false, string 'SELECT * FROM `wp_options` ', ) ./libraries/DisplayResults.php#4424: PMA\libraries\DisplayResults->_getTableHeaders( array, array, string 'SELECT * FROM `wp_options` ', array, array, array, boolean false, ) ./libraries/sql.lib.php#1686: PMA\libraries\DisplayResults->getTable( , array, array, boolean false, ) ./libraries/sql.lib.php#1980: PMA_getHtmlForSqlQueryResultsTable( , string './themes/pmahomme/img/', NULL, array, boolean true, string '137', integer 25, NULL, , array, ) ./libraries/sql.lib.php#2199: PMA_getQueryResponseForResultsReturned( , array, string 'dbcc', string 'wp_options', NULL, NULL, , string './themes/pmahomme/img/', string '137', integer 25, NULL, NULL, NULL, NULL, NULL, string 'SELECT * FROM `wp_options`', NULL, ) ./libraries/sql.lib.php#2062: PMA_executeQueryAndGetQueryResponse( array, boolean true, string 'dbcc', string 'wp_options', NULL, NULL, NULL, NULL, NULL, NULL, string '', string './themes/pmahomme/img/', NULL, NULL, NULL, string 'SELECT * FROM `wp_options`', NULL, NULL, ) ./sql.php#221: PMA_executeQueryAndSendQueryResponse( array, boolean true, string 'dbcc', string 'wp_options', NULL, NULL, NULL, NULL, NULL, NULL, string '', string './themes/pmahomme/img/', NULL, NULL, NULL, string 'SELECT * FROM `wp_options`', NULL, NULL, ) 

in my code — thank you, was helpful, I almost shed a tear /usr/share/phpmyadmin/libraries/DisplayResults.php

Webdeveloper011

I am using php 7.4 on ubuntu 18.04. I got the same issue, and it has worked for me. My phpmyadmin server version: 5.7.35-0ubuntu0.18.04.1 — (Ubuntu)

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

Notice in ./libraries/DisplayResults.php#1229 Trying to access array offset on value of type bool #15800

Notice in ./libraries/DisplayResults.php#1229 Trying to access array offset on value of type bool #15800

Comments

Describe the bug

I’ve updated PHP to 7.4.1, and when I open the table of my database this error occurred, I didn’t know this was caused by me updating PHP or not, whereas before it was fine

To Reproduce

Steps to reproduce the behavior:

Screenshots

phpmyadminbug

Server configuration

  • Operating system: Kubuntu 18.04
  • Web server: Apache/2.4.29 (Ubuntu)
  • Database version: mysql Ver 14.14 Distrib 5.7.28
  • PHP version: 7.4.1
  • phpMyAdmin version: 4:4.6.6-5

Additional context

I’ve also tried to update PHPMyAdmin from apt, but it said phpmyadmin is already the newest version (4:4.6.6-5)

The text was updated successfully, but these errors were encountered:

Please keep us updated
But 4.6 is not supported anymore.

I experience the same issue with PHP version 7.4.2 and phpMyAdmin version 4.9.1.

@BlackWiCKED can you send the steps to reproduce the issue ?

Can you please try on demo servers ( root , no password)

williamdes moved this from Needs triage to Needs a second check to be a bug in Questions Jan 26, 2020

The issue does not seems to appear on the demo servers. I ended up reverting to PHP 7.3 on my server, but will give another try to reproduce later — there must be something with the version change.

UPDATE: My bad, I was also on phpMyAdmin version 4.6, after adding the PPA and upgrading to 4.9.1 can no longer reproduce the problem. Apologies for the false alarm!

I have also faced the same notice after upgrading php 7.2 to 7.4 on phpmyadmin 4.6

Below steps solved my issue.

  1. Install PPA by hiting sudo add-apt-repository ppa:phpmyadmin/ppa
  2. Then run sudo apt update & sudo apt upgrade
  3. Finally restart your apache sudo systemctl restart apache2

Now i am running phpmyadmin 4.9.5deb2 and notice gone

Any of you guys know s how to do it on Debian?

Well this comment was helpful for raspbian: #16065 (comment)

And this one to install on debian: #15236 (comment)

I am having trouble running this on Xenial. Adding the PPA throws 404 when updating apt, and I cannot add the deb as there is no version for Xenial. Any ideas? Thanks.

I am having trouble running this on Xenial. Adding the PPA throws 404 when updating apt, and I cannot add the deb as there is no version for Xenial. Any ideas? Thanks.

Hi
Please try to use the URL directly using one of the two distributions the PPA supports 🙂

@williamdes
Thank you for your response. I tried that before, the versions available were not compatible with Xenial — there were dependencies that the new version of phpmyadmin required which are not available on Xenial. I had to upgrade my server to Bionic then manually add the bionic deb.

Same issue before and after adding the PPA

Ubuntu 18.04.5 LTS
PHP 7.4.9 (cli) (built: Aug 7 2020 14:29:36) ( NTS )
nginx/1.14.0 (Ubuntu)
Phpmyadmin 4:4.6.6-5

I have this same issue on 5.0.0-dev

I have this same issue on 5.0.0-dev

Same issue before and after adding the PPA
Phpmyadmin 4:4.6.6-5

@jason-vivid please try one of the following methods to update your package:

Hi @ridwantanjung
You can install our PPA (#15515) ( sudo add-apt-repository ppa:phpmyadmin/ppa )
And then you will be up to date

I have this same issue on 5.0.0-dev

Yes for mee too . Same error after following the steps also .

I added some code on line 1229 is_array($col_visib) ? $col_visib[$j] : false . I dont know it fixed or not, but the warning now not showing up.

If you refresh the web, the other error will come up at another line number, so the same fixed i done to other line too.

  1. Install PPA by hiting sudo add-apt-repository ppa:phpmyadmin/ppa
  2. Then run sudo apt update & sudo apt upgrade
  3. Finally restart your apache sudo systemctl restart apache2

I followed this and the error seems fixed but can anyone tell what was the issue and what has been fixed? Just out of curiosity hope answer this does not waste too much of time.

I followed this and the error seems fixed but can anyone tell what was the issue and what has been fixed? Just out of curiosity hope answer this does not waste too much of time.

Glad to know the PPA version could fix this.
The notice is a very old one, to explain simply: new PHP versions and old code tend to generate notices about things that where «bad» or where «mistakes» in the old code running on a new PHP version.

williamdes added the packaging An issue that affect Debian, Ubuntu or another form of packaging label Feb 5, 2021

This procedure is more reliable no need to install bunch of unnecessary package, and no need to waste your time as well

I have upgraded php 7.2 to 7.4 and the problem with phpMyAdmin still on the same error.

The best option for me was, go to a official website:

https://www.phpmyadmin.net/
Download the lastest version, so after I went to /var/www/html where my phpMyAdmin is placed and I copy from ~/Downloads my latest version unzip as bellow:

sudo cp ~/Downloads/phpMyAdmin-5.0.4-all-languages.zip .

To assure that I had the old version I changed the name of old version

sudo mv phpMyAdmin oldphpMyAdmin

So then I unzip the new version

sudo unzip phpMyAdmin-5.0.4-all-languages.zip

After Unzip I renamed to phpMyAdmin like before (some case folder name is phpmyadmin (all is in lower case)

mv phpMyAdmin-5.0.4-all-languages phpMyAdmin

I tested on Browser, everything works fine. After I deleted the oldversion

I’m running on Ubuntu 16.04.7 LTS

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

Problem loading a table (Notice in ./libraries/DisplayResults.class.php) #13974

Problem loading a table (Notice in ./libraries/DisplayResults.class.php) #13974

Comments

Suddenly I can’t view a table correctly using phpMy Admin, I didn’t make any recent change. I get the error if I make any SELECT in the table. I don’t get this error in other tables.

Expected behaviour

It should show all the columns of the table with no notice like before.

Actual behaviour

When using SELECT * FROM programa_servicios ORDER BY id_programa_servicios ASC it only shows the first 5 columns of 9 in the table and shows a lot of Notice in ./libraries/DisplayResults.class.php#1188 Undefined offset: 5 with different line numbers.
If I add a where clause for any of the columns not displayed it ignores the where clause.

Server configuration

Operating system: Ubuntu 14.04.2 LTS

Web server: Plesk version: 12.0.18 Update #102

Database: MySQL 5.5.49

PHP version: 5.5.9

phpMyAdmin version: 4.5.1

Client configuration

Browser: Chrome

Operating system: Windows 10 Pro

I added the table with some sample rows
programa_servicios.zip

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью