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

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

Open
Loqova opened this issue May 16, 2022 · 1 comment
Open

Comments

@Loqova
Copy link

Loqova commented May 16, 2022

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>
@Avalarion
Copy link

Having the same question^^.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants