git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
44570e8
)
try to improve php logging; set error_log in the right section of the .ini; enable...
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Thu, 28 Apr 2022 11:55:24 +0000
(13:55 +0200)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Thu, 28 Apr 2022 11:55:24 +0000
(13:55 +0200)
plc.d/httpd
patch
|
blob
|
history
diff --git
a/plc.d/httpd
b/plc.d/httpd
index
ce5e42e
..
4002309
100755
(executable)
--- a/
plc.d/httpd
+++ b/
plc.d/httpd
@@
-79,9
+79,12
@@
case "$1" in
# log_errors : is On by default
# error_log
if ! grep '^error_log *=' $php_ini > /dev/null ; then
# log_errors : is On by default
# error_log
if ! grep '^error_log *=' $php_ini > /dev/null ; then
- echo 'error_log = /var/log/php.log' >> $php_ini
- touch /var/log/php.log
- chmod 666 /var/log/php.log
+ sed -i -e '/^;error_log = syslog/a error_log = /var/log/php.log' $php_ini
+ sed -i -e 's/display_errors =.*/display_errors = On/' $php_ini
+ sed -i -e 's/display_startup_errors =.*/display_startup_errors = On/' $php_ini
+ # create the log file and make it writable by apache
+ touch /var/log/php.log
+ chmod 666 /var/log/php.log
fi
# configure php-fpm as well if present (starting with f27)
fi
# configure php-fpm as well if present (starting with f27)