Commit c0caf183 authored by Antoine Catton's avatar Antoine Catton

Add php error logging.

parent d2daf998
......@@ -42,10 +42,14 @@ class Recipe(GenericBaseRecipe):
self.options['htdocs'])
# Install php.ini
if not os.path.exists(self.options['php-error-log']):
open(self.options['php-error-log'], 'w').close() # Just a touch
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
'php.ini'),
self.substituteTemplate(self.getTemplateFilename('php.ini.in'),
dict(tmp_directory=self.options['tmp-dir']))
dict(tmp_directory=self.options['tmp-dir'],
error_log=self.options['php-error-log']))
)
path_list.append(php_ini)
......
......@@ -3,9 +3,10 @@ engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~(E_DEPRECATED|E_NOTICE|E_WARNING)
display_errors = On
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = "%(error_log)s"
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
......
......@@ -83,7 +83,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg
md5sum = 45bc82dc468e7f418d95c846d1a33d74
md5sum = e2b116cb97c99a19124a07f521d2ac5a
mode = 0644
[template-apache-backup]
......
......@@ -38,6 +38,7 @@ ip = $${slap-network-information:global-ipv6}
port = 8080
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
php-error-log = $${basedirectory:log}/php.log
php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php}
httpd-conf = $${rootdirectory:etc}/apache.conf
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment