docker-adminer icon indicating copy to clipboard operation
docker-adminer copied to clipboard

Disable PHP warning and errors with environmental variable (by default)

Open Loqova opened this issue 3 years ago • 1 comments

Is is possible to set a docker environmental variable to disable PHP warnings and errors? It's now very easy to trigger a PHP error from the login screen and for security reasons I want to at least avoid this.

For example by a PHP array injection /?server[]=mysql&username[]=root

I suggest to disable by default and explicitly allow to override this behaviour.


<b>Warning</b>:  urlencode() expects parameter 1 to be string, array given in <b>/var/www/html/adminer.php</b> on line <b>1413</b>
<b>Warning</b>:  urlencode() expects parameter 1 to be string, array given in <b>/var/www/html/adminer.php</b> on line <b>1413</b>
<b>Warning</b>:  session_start(): Cannot start session when headers already sent in <b>/var/www/html/adminer.php</b> on line <b>73</b>
<b>Warning</b>:  Illegal offset type in <b>/var/www/html/adminer.php</b> on line <b>73</b>
<b>Warning</b>:  Illegal offset type in <b>/var/www/html/adminer.php</b> on line <b>73</b>
<b>Warning</b>:  preg_match() expects parameter 2 to be string, unknown given in <b>/var/www/html/adminer.php</b> on line <b>1483</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1482</b>
<b>Warning</b>:  Illegal offset type in <b>/var/www/html/adminer.php</b> on line <b>73</b>
<b>Warning</b>:  Illegal offset type in <b>/var/www/html/adminer.php</b> on line <b>52</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>71</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>71</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1447</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1447</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1447</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1447</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1447</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1447</b>
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /var/www/html/adminer.php:1413) in <b>/var/www/html/adminer.php</b> on line <b>1448</b>
<b>Warning</b>:  Illegal offset type in <b>/var/www/html/adminer.php</b> on line <b>73</b>
<b>Warning</b>:  htmlspecialchars() expects parameter 1 to be string, array given in <b>/var/www/html/adminer.php</b> on line <b>32</b>
<b>Warning</b>:  htmlspecialchars() expects parameter 1 to be string, array given in <b>/var/www/html/adminer.php</b> on line <b>32</b>

Loqova avatar May 16 '22 15:05 Loqova

Having the same question^^.

Avalarion avatar Aug 08 '22 03:08 Avalarion