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

Arno Welzel <[email protected]>
Newsgroups comp.lang.php
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.