Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: [docker] error_log() not write inside web page Date: Wed, 30 Nov 2022 11:26:30 +0100 Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net A6IsG54+XkeaQwi7GotKNgxmavdD/Xs3K15ZpkgJKeThjsKa7I Cancel-Lock: sha1:iUAwTUa0yrMyOwSEZn5O6wEIBPQ= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US-large In-Reply-To: Xref: csiph.com comp.lang.php:19189 On 30/11/2022 10.24, SupaPlex wrote: > Il 29/11/22 21:20, Arno Welzel ha scritto: >> Because error_log() does not produce any output: >> >> >> >> "error_log — Send an error message to the defined error handling >> routines" >> >> And the error handling routines may not send the log message to the >> output but only to the error log which is *not* send via HTTP to the >> client. >> >> Next time please read the PHP manuals first, before asking here. > > Practically error_log() varies its behavior based on the API server > (https://www.php.net/manual/en/function.php-sapi-name.php)? I would say the API that the web server uses to talk with the PHP engine will not change the behavior, what you are looking for is ; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but ; it could be very dangerous in production environments. Depending on the code ; which is triggering the error, sensitive information could potentially leak ; out of your application such as database usernames and passwords or worse. ; For production environments, we recommend logging errors rather than ; sending them to STDOUT. ; Possible Values: ; Off = Do not display any errors ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) ; On or stdout = Display errors to STDOUT ; ; Development Value: On ; Production Value: Off ; https://php.net/display-errors display_errors = Off -- //Aho