Skip to content

Commit

Permalink
php error reporting to syslog (issue #53)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x17de committed Jun 9, 2017
1 parent 121b440 commit 17561f8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
web:
image: richarvey/nginx-php-fpm
build: docker
dockerfile: DockerfileNginx
links:
- db
ports:
Expand Down
6 changes: 6 additions & 0 deletions docker/DockerfileNginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM richarvey/nginx-php-fpm

ADD run-web.sh /
RUN chmod 755 /run-web.sh

CMD ["/run-web.sh"]
Empty file modified docker/run-mariadb.sh
100644 → 100755
Empty file.
27 changes: 27 additions & 0 deletions docker/run-web.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

sed -ri '
/^php_flag\[display_errors\]/ d
$ a php_flag[display_errors] = on
' /usr/local/etc/php-fpm.conf

sed -ri '
/^;?error_log/ c error_log = syslog
/^;?syslog.facility/ c syslog.facility = daemon
/^;?syslog.ident/ c syslog.ident = php-fpm
/^;?log_level/ c log_level = notice
' /usr/local/etc/php-fpm.d/*.conf

tee /usr/local/etc/php/conf.d/zzz-registration-system.ini << END
[PHP]
error_reporting = E_ALL & ~E_NOTICE
display_errors = On
display_startup_errors = On
log_errors = On
ignore_repeated_errors = Off
ignore_repeated_source = Off
track_errors = On
html_errors = On
END

exec /start.sh

0 comments on commit 17561f8

Please sign in to comment.