]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Summary.php
friendica-6379 Monolog - logfile permission denied
[friendica.git] / src / Module / Admin / Summary.php
index 901a4b081feaafeaeb5b3881b3b1b269c7555561..6261ac75caf937057c7ffacf8906726e013d4b8e 100644 (file)
@@ -26,7 +26,7 @@ class Summary extends BaseAdminModule
 
                // are there MyISAM tables in the DB? If so, trigger a warning message
                $warningtext = [];
-               if (DBA::count('`information_schema`.`tables`', ['engine' => 'myisam', 'table_schema' => DBA::databaseName()])) {
+               if (DBA::count(['information_schema' => 'tables'], ['engine' => 'myisam', 'table_schema' => DBA::databaseName()])) {
                        $warningtext[] = L10n::t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See <a href="%s">here</a> for a guide that may be helpful converting the table engines. You may also use the command <tt>php bin/console.php dbstructure toinnodb</tt> of your Friendica installation for an automatic conversion.<br />', 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html');
                }
 
@@ -74,6 +74,23 @@ class Summary extends BaseAdminModule
                                $well_known, $well_known, $a->getBaseURL() . '/help/Install');
                }
 
+               // Check logfile permission
+               if (Config::get('system', 'debugging')) {
+                       $stream = Config::get('system', 'logfile');
+
+                       if (is_file($stream) &&
+                           !is_writeable($stream)) {
+                               $warningtext[] = L10n::t('The logfile \'%s\' is not writable. No logging possible', $stream);
+                       }
+
+                       $stream = Config::get('system', 'dlogfile');
+
+                       if (is_file($stream) &&
+                           !is_writeable($stream)) {
+                               $warningtext[] = L10n::t('The logfile \'%s\' is not writable. No logging possible', $stream);
+                       }
+               }
+
                // check legacy basepath settings
                $configLoader = new ConfigFileLoader($a->getBasePath(), $a->getMode());
                $configCache = new Config\Cache\ConfigCache();