[docker] error_log() not work

SupaPlex <[email protected]>
Newsgroups comp.lang.php
Organization Aioe.org NNTP Server
Message-ID <[email protected]>
$ cat master/.htaccess
RewriteEngine On
RewriteRule ^(.*)$ src/index-debug.php [L]

$ cat docker-compose.yml
services:
     web:
         build: .
         ports:
             - 8014:80
         volumes:
             - .:/var/www/html
             - ./docker/volumes/etc/php.ini:/usr/local/etc/php/php.ini

$ cat Dockerfile
FROM php:apache
RUN a2enmod rewrite

$ 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'),
);

$ cat docker/volumes/etc/php.ini
log_errors = On
error_log = /var/log/error.log

$ docker-compose up -d
WARNING: Found orphan containers (xxx) for this project. If you removed 
or renamed this service in your compose file, you can run this command 
with the --remove-orphans flag to clean it up.
Starting xxx... done

$ 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?

-----BEGIN PGP MESSAGE-----

hQGMAyHa6HqE1N3qAQv+LshhnqeyR4QoIyyuSKO0K7FlB1CiB6m9p7UwoiZzbhcl
l0bvq71ZwqXxnhsmB1NLD6Asxt/oOSEq/jMKOmYMTQrPxJmFZ4kgj2VjKzvYYghE
GtPD4lLTVLANvq39vzLCiW0Xqi7qUSRHOUeeRDiwmUxte3hRQxAHq5W5rA2frdWz
jrVrdgIWFztYOuuhwoQJ8EUSxSQ9vDpwTfg8AB+RtjbhEnKjQcbXLoq8ab64+/4G
L4p98rc8kTSPL/9EKm/g1kjXXUk+R8wTCxSYxI2PsQ8YNbpv9ECyVX1ndZzbFgV5
G8VEQcTRsZ3G8K2BnVIVbb08YxmqtqnFteGWULwMC7X/vvlozrmhRi1cf9wjNJCB
dgA/PEA2jxPPyHyFpsA1oxD1bxgiuxCMLlp+6XGCLioTDYidtV91g1WleQS+Vn1j
dYKBNzCPaGPpg1gW305v26q0cRwcvxgzKBFDI1/oq1DFYERLmA/KWKw/9+An9C1a
g/y/wHvEE4m/b96P/9fL0n8BncWPV00QAGihEa1LU5Vt8O8pWA9BulAQGG+RzxUb
0hwcOpR+BQ8kwq08fHDc2FB2QLM3g5adR5UpAq4Nlow9uO1AkRfbO8Lq14sDErCG
zmoKkEansQ2AQSLoo6Cirb+CmsqnxsE71SJICDsh9EPazXIZq+qFPStq+7vCPPtv
=bZWC
-----END PGP MESSAGE-----
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.