I have this simple code:
<?php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->get('/hello', function() { return 'Hello!'; });
//$app->register(new Silex\Provider\MonologServiceProvider(), array(
// 'monolog.logfile' => __DIR__.'/development.log',
//));
$app->run();
?>
It works. If I have try to register the Monolog service (removing the 3 beginning ‘//’ comments keywords), nothing works anymore:
$app->register(new Silex\Provider\MonologServiceProvider(), array(
'monolog.logfile' => __DIR__.'/development.log',
));
I have try the installation through fat zip, and by composer but, same results. I am out of ideas ?
Any help would be appreciated.
Problem solved by extensively tracing the simple code. It appears that the web directory was not writable by the server.
chmod 777 ./web# Solves itWhich bring me to these final questions:
What should be the permissions and ownership of the web directory in a secured production environment ?
From Maerlyn
logs should be contained in a directory apart from the web apis directory.
Where the errors are logged when the log service does not work, or when no log service is registered and we definitely needs the developers attention ? Is there any fallback low low level service ?
From Maerlyn
Look into your web server logs for those type of errors.