Skip to content

Commit

Permalink
fix: enable error logging
Browse files Browse the repository at this point in the history
Need to keep an eye on docker-library/php#358 to find out what is the reason that the `php_admin_flag[log_errors]` is necessary.
  • Loading branch information
gajus committed Jan 3, 2017
1 parent 31942ea commit 8bf7df8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ COPY ./php.ini /usr/local/etc/php/php.ini
RUN apt-get update && \
apt-get install -y libzip-dev git && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-install zip pdo pdo_mysql
docker-php-ext-install zip pdo pdo_mysql && \
echo "php_admin_flag[log_errors] = On">>/usr/local/etc/php-fpm.conf

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === '61069fe8c6436a4468d0371454cf38a812e451a14ab1691543f25a9627b97ff96d8753d92a00654c21e2212a5ae1ff36') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
Expand Down
18 changes: 4 additions & 14 deletions php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,18 @@ memory_limit=256M
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

error_reporting=0
error_reporting=E_ALL
display_errors=0
display_startup_errors=1
display_startup_errors=0
log_errors=1
log_errors_max_len=2048
ignore_repeated_errors=0
ignore_repeated_source=0
report_memleaks=1

; This setting is on by default.
;report_zend_debug=0

report_zend_debug=0
track_errors=0

; Turn off normal error reporting and emit XML-RPC error XML
; http://php.net/xmlrpc-errors
;xmlrpc_errors=0

; An XML-RPC faultCode
;xmlrpc_error_number=0

html_errors=0
error_log = /var/log/php-errors.log

;;;;;;;;;;;;;;;;;
; Data Handling ;
Expand Down

0 comments on commit 8bf7df8

Please sign in to comment.