Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #19185

Re: [docker] error_log() not write inside web page

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: [docker] error_log() not write inside web page
Date Tue, 29 Nov 2022 21:20:13 +0100
Lines 29
Message-ID <jun7rtFtd3rU4@mid.individual.net> (permalink)
References <tltt21$1t5m$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace individual.net zQaYPiwj+bszyYzneBAaagYtIRUwB/8NkI+VNjrag1w0AU4vWQ
Cancel-Lock sha1:lM02+Be/KGO2Gunuyf2T8DGsZgQ=
Content-Language de-DE
In-Reply-To <tltt21$1t5m$1@gioia.aioe.org>
Xref csiph.com comp.lang.php:19185

Show key headers only | View raw


SupaPlex, 2022-11-26 21:30:

[...]
> <?php
> echo "BEFORE\n";
> error_log("abc");
> echo "AFTER\n";
[...]
> supaplex$ curl http://localhost:8013/
> BEFORE
> AFTER
> 
> Why *abc* does not appear?

Because error_log() does not produce any output:

<https://www.php.net/manual/en/function.error-log.php>

"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.

-- 
Arno Welzel
https://arnowelzel.de

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[docker] error_log() not write inside web page SupaPlex <old@gamer.s> - 2022-11-26 21:30 +0100
  Re: [docker] error_log() not write inside web page Arno Welzel <usenet@arnowelzel.de> - 2022-11-29 21:20 +0100
    Re: [docker] error_log() not write inside web page SupaPlex <old@gamer.s> - 2022-11-30 10:24 +0100
      Re: [docker] error_log() not write inside web page SupaPlex <old@gamer.s> - 2022-11-30 10:33 +0100
      Re: [docker] error_log() not write inside web page "J.O. Aho" <user@example.net> - 2022-11-30 11:26 +0100

csiph-web