Re: [docker] error_log() not work
"J.O. Aho" <[email protected]>
| Newsgroups | comp.lang.php |
|---|---|
| Message-ID | <[email protected]> |
On 26/11/2022 12.18, SupaPlex wrote:
> $ cat master/src/index-debug.php
> <?php
> error_log("error message 123");
> var_dump(
> ini_get('error_log'),
> ini_get('log_errors'),
> file_get_contents('/var/log/error.log'),
> );
> $ curl http://localhost:8014/master/src/index-debug.php
> string(18) "/var/log/error.log"
> string(1) "1"
> <b>Warning</b>: file_get_contents(/var/log/error.log): Failed to open
> stream: No such file or directory in
> <b>/var/www/html/master/src/index-debug.php</b> on line <b>4</b><br />
> bool(false)
>
> Why?
Does the /var/log directory exist?
Does the user which runs the process have the right to write into the
directory?
--
//Aho