Skip to content

Commit

Permalink
aguia-pescadora-bravo (#16), phpmyadmin (#53): hotfix erro do PHPMyAd…
Browse files Browse the repository at this point in the history
…min 'Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable'
  • Loading branch information
fititnt committed May 31, 2019
1 parent a2582a6 commit 6315c83
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions logbook/aguia-pescadora-bravo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,12 @@ sudo systemctl reload nginx

sudo certbot --nginx -d phpmyadmin.apb.etica.ai

## Hotfix erro "Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable"
# @see https://stackoverflow.com/questions/48001569/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co/50536059#50536059
# Caso tenha esse erro execute uma vez logo após instalação:
sudo sed -i "s/|\s*\((count(\$analyzed_sql_results\['select_expr'\]\)/| (\1)/g" /usr/share/phpmyadmin/libraries/sql.lib.php


# TODO: por alguma proteção, mesmo que simples, para evitar bruteforce de bots
# em https://phpmyadmin.apb.etica.ai/ (fititnt, 2019-05-21 00:23 BRT)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ server {

location ~ \.php$ {
include snippets/fastcgi-php.conf;
# fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.2-fpm-phpmyadmin.sock;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$cfg['Servers'][1]['host'] = '127.0.0.1';

This file was deleted.

0 comments on commit 6315c83

Please sign in to comment.