diff --git a/admin/support.php b/admin/support.php index c547ee2..8ab0f85 100644 --- a/admin/support.php +++ b/admin/support.php @@ -10,374 +10,427 @@ -
- -
+ For bug reports and help, visit the FlatPress forum,
+ report the bug on GitHub or send
+ an email.
Include these outputs (copy & paste) in English
+ with the following information: bug description, steps to reproduce.
+
[code]
+Base directory: ' . BASE_DIR . '
'; + + if ($BLOG_BASEURL) { + echo 'Blog base URL: ' . $BLOG_BASEURL . '
'; + } else { + echo 'Blog base URL: Could not be determined. '; + if (file_exists($setupfile)) { + echo 'Start setup
'; } else { - $fp_plugins = array(); - } - - echo 'FlatPress version: ' . SYSTEM_VER . '
'; - echo 'Basis directory: ' . BASE_DIR . '
'; - - if ($BLOG_BASEURL) { - echo 'Blog base URL: ' . $BLOG_BASEURL . '
'; - } else { - echo 'Blog base URL: Could not be determined. '; - if (file_exists($setupfile)) { - echo 'Start setup
'; - } else { - echo ''; - } - } - - if ($LANG_DEFAULT) { - echo 'Language (automatic): ' . $LANG_DEFAULT . '
'; - } else { - echo 'Language (automatic): ℹ not recognized
'; - } - - if ($lang) { - echo 'Language (set): ' . $lang . '
'; - } else { - echo 'Language (set): not set
'; - } - - if ($charset) { - echo 'Character set: ' . $charset . '
'; - } else { - echo 'Character set: not set (default is utf-8)
'; - } - - if ($theme) { - echo 'Theme: ' . $theme . '
'; - } else { - echo 'Theme: not set (default is leggero) '; - if (file_exists($setupfile)) { - echo 'Start setup
'; - } else { - echo ''; - } - } - - if ($style) { - echo 'Stil: ' . $style . '
'; - } else { - echo 'Stil: default style
'; - } - - if ($BLOG_BASEURL) { - echo 'Activated plugins:
'; - echo ''; - for($i = 0; $i < count($fp_plugins); $i++) { - echo ', ' . $fp_plugins [$i]; - } echo '
'; - } else { - echo 'Activated plugins: Could not be determined.
'; } + } + + if ($LANG_DEFAULT) { + echo 'Language (automatic): ' . $LANG_DEFAULT . '
'; + } else { + echo 'Language (automatic): ℹ not recognized
'; + } + + if ($lang) { + echo 'Language (set): ' . $lang . '
'; + } else { + echo 'Language (set): not set
'; + } + + if ($charset) { + echo 'Character set: ' . $charset . '
'; + } else { + echo 'Character set: not set (default is utf-8)
'; + } + + if ($theme) { + echo 'Theme: ' . $theme . '
'; + } else { + echo 'Theme: not set (default is leggero) '; + if (file_exists($setupfile)) { + echo 'Start setup
'; + } else { + echo ''; + } + } + + if ($style) { + echo 'Style: ' . $style . '
'; + } else { + echo 'Style: default style
'; + } + + if ($BLOG_BASEURL) { + echo 'Activated plugins: '; + echo implode(', ', $fp_plugins); + echo '
'; + } else { + echo 'Activated plugins: Could not be determined.
'; + } ?> -[/code]
+[/code]
-[code]
-As soon as the setup has been successfully executed, the setup.php file should be deleted before productive operation.
+[code]
+As soon as the setup has been successfully executed, the setup.php + file should be deleted before productive operation.
! The setup file is located in the main directory!'; - } else { - echo '✓ The setup file was not found in the main directory.
'; - } + if (file_exists($setupfile)) { + echo '! The setup file is located in the main directory!
'; + } else { + echo '✓ The setup file was not found in the main directory.
'; + } ?> -The defaults.php file should only be read-only for productive operation.
+The defaults.php file should only be read-only for productive + operation.
ℹ The defaults.php file can be changed!'; - } else { - echo '✓ The defaults.php file cannot be changed.
'; - } - @fclose($test_file); + $test_file = @fopen("{$BASE_DIR}/defaults.php", "a+"); + if ($test_file) { + echo 'ℹ The defaults.php file can be changed!
'; + } else { + echo '✓ The defaults.php file cannot be changed.
'; + } + @fclose($test_file); ?>The admin directory should be read-only for productive operation.
ℹ The core files in the admin directory are writable!'; - } else { - echo '✓ The core files in the admin directory are not writable.
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/admin/chmod-test-file"); + $test_file = @fopen("{$BASE_DIR}/admin/chmod-test-file", "a+"); + if ($test_file) { + echo 'ℹ The core files in the admin directory are writable!
'; + } else { + echo '✓ The core files in the admin directory are not writable.
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/admin/chmod-test-file"); ?> -The fp-includes directory should be read-only for productive operation.
+The fp-includes directory should be read-only for productive + operation.
ℹ The core files in the fp-includes directory are writable!'; - } else { - echo '✓ The core files in the fp-includes directory are not writable.
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-includes/chmod-test-file"); + $test_file = @fopen("{$BASE_DIR}/fp-includes/chmod-test-file", "a+"); + if ($test_file) { + echo 'ℹ The core files in the fp-includes directory are writable!
'; + } else { + echo '✓ The core files in the fp-includes directory are not writable.
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-includes/chmod-test-file"); ?>The main directory must be writable in order to be able to create or modify an .htaccess file with the PrettyURLs plugin.
-Note: Only web servers that are NCSA compatible, such as Apache, are familiar with the concept of .htaccess files.
+The main directory must be writable in order to be able to create or + modify an .htaccess file with the PrettyURLs plugin.
++ Note: Only web servers that are NCSA compatible, such + as Apache, are familiar with the concept of .htaccess files. +
The server software is ' . $_SERVER["SERVER_SOFTWARE"] . '.'; - $test_file = @fopen("{$BASE_DIR}/chmod-test-file", "a+"); - if ($test_file) { - echo '✓ The FlatPress main directory is writable.
'; - } else { - echo 'ℹ The FlatPress main directory is not writable!
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/chmod-test-file"); + echo 'The server software is ' . $_SERVER ["SERVER_SOFTWARE"] . '.
'; + $test_file = @fopen("{$BASE_DIR}/chmod-test-file", "a+"); + if ($test_file) { + echo '✓ The FlatPress main directory is writable.
'; + } else { + echo 'ℹ The FlatPress main directory is not writable!
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/chmod-test-file"); - // Do not create a .hthaccess file, otherwise the PrettyURLs plugin cannot create its own file. Better is .htaccess.txt - $test_file = @fopen("{$BASE_DIR}/.htaccess.txt", "a+"); - if ($test_file) { - echo '✓ The .htaccess file is writable.
'; - } else { - echo 'ℹ The .htaccess file is not writable!
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/.htaccess.txt"); + // Do not create a .hthaccess file, otherwise the PrettyURLs plugin cannot create its own file. Better is .htaccess.txt + $test_file = @fopen("{$BASE_DIR}/.htaccess.txt", "a+"); + if ($test_file) { + echo '✓ The .htaccess file is writable.
'; + } else { + echo 'ℹ The .htaccess file is not writable!
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/.htaccess.txt"); - $htaccess = BASE_DIR . '/.htaccess'; - if (file_exists($htaccess)) { - echo 'ℹ A .htaccess file already exists in the main directory!
'; - } else { - echo '✓ No .htaccess file was found in the main directory.
'; - } + $htaccess = BASE_DIR . '/.htaccess'; + if (file_exists($htaccess)) { + echo 'ℹ A .htaccess file already exists in the main directory!
'; + } else { + echo '✓ No .htaccess file was found in the main directory.
'; + } ?>The fp-interface directory should be read-only for productive operation.
+The fp-interface directory should be read-only for productive + operation.
ℹ The directory fp-interface writable!'; - } else { - echo '✓ The directory fp-interface is not writable.
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-interface/chmod-test-file"); + $test_file = @fopen("{$BASE_DIR}/fp-interface/chmod-test-file", "a+"); + if ($test_file) { + echo 'ℹ The directory fp-interface writable!
'; + } else { + echo '✓ The directory fp-interface is not writable.
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-interface/chmod-test-file"); ?>The themes directory should be read-only for productive operation.
ℹ The theme directory is writable!'; - } else { - echo '✓ The theme directory is not writable.
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-interface/themes/chmod-test-file"); + $test_file = @fopen("{$BASE_DIR}/fp-interface/themes/chmod-test-file", "a+"); + if ($test_file) { + echo 'ℹ The theme directory is writable!
'; + } else { + echo '✓ The theme directory is not writable.
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-interface/themes/chmod-test-file"); ?> -The fp-plugin directory should be read-only for productive operation.
+The fp-plugin directory should be read-only for productive + operation.
ℹ The plugin directory fp-plugins writable!'; - } else { - echo '✓ The plugin directory fp-plugins is not writable.
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-plugins/chmod-test-file"); + $test_file = @fopen("{$BASE_DIR}/fp-plugins/chmod-test-file", "a+"); + if ($test_file) { + echo 'ℹ The plugin directory fp-plugins writable!
'; + } else { + echo '✓ The plugin directory fp-plugins is not writable.
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-plugins/chmod-test-file"); ?>The fp-content directory must be writable for FlatPress to work.
+The fp-content directory must be writable for FlatPress to work.
✓ The fp-content directory is writable.'; + } else { + echo '! The fp-content directory is not writable!
'; + } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-content/chmod-test-file"); + ?> + +This images directory must have write permissions so that you can + upload images.
+ ✓ The fp-content directory is writable.'; + echo '✓ The images directory is writable.
'; } else { - echo '! The fp-content directory is not writable!
'; + echo '! The images directory is not writable!
'; } @fclose($test_file); - @unlink("{$BASE_DIR}/fp-content/chmod-test-file"); + @unlink("{$BASE_DIR}/fp-content/images/chmod-test-file"); + } else { + echo 'ℹ The images directory does not exist.
'; + } ?> -This images directory must have write permissions so that you can upload images.
+This thumbs directory must have write permissions so that scalable + images can be created.
✓ The images directory is writable.'; - } else { - echo '! The images directory is not writable!
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-content/images/chmod-test-file"); + if (file_exists("{$BASE_DIR}/fp-content/images/.thumbs")) { + $test_file = @fopen("{$BASE_DIR}/fp-content/images/.thumbs/chmod-test-file", "a+"); + if ($test_file) { + echo '✓ The images/.thumbs directory is writable.
'; } else { - echo 'ℹ The images directory does not exist.
'; + echo '! The images/.thumbs directory is not writable!
'; } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-content/images/chmod-test-file"); + } else { + echo 'ℹ The .thumbs directory does not exist, but is created automatically as soon as a thumbnail has been created with the Thumbnails plugin.
'; + } ?> -This thumbs directory must have write permissions so that scalable images can be created.
+This upload directory must have write permissions so that you can + upload something.
✓ The images/.thumbs directory is writable.'; - } else { - echo '! The images/.thumbs directory is not writable!
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-content/images/chmod-test-file"); + if (file_exists("{$BASE_DIR}/fp-content/attachs/")) { + $test_file = @fopen("{$BASE_DIR}/fp-content/attachs/chmod-test-file", "a+"); + if ($test_file) { + echo '✓ The upload directory is writable.
'; } else { - echo 'ℹ The .thumbs directory does not exist, but is created automatically as soon as a thumbnail has been created with the Thumbnails plugin.
'; + echo '! The upload directory is not writable!
'; } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-content/attachs/chmod-test-file"); + } else { + echo 'ℹ The upload directory does not exist, but is created automatically with the first upload.
'; + } ?> -This upload directory must have write permissions so that you can upload something.
+This cache directory must have write permission for the cache to + function correctly.
✓ The upload directory is writable.'; - } else { - echo '! The upload directory is not writable!
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-content/attachs/chmod-test-file"); + if (file_exists("{$BASE_DIR}/fp-content/cache/")) { + $test_file = @fopen("{$BASE_DIR}/fp-content/cache/chmod-test-file", "a+"); + if ($test_file) { + echo '✓ The cache directory is writable.
'; } else { - echo 'ℹ The upload directory does not exist, but is created automatically with the first upload.
'; - } - ?> - -This cache directory must have write permission for the cache to function correctly.
- ✓ The cache directory is writable.'; - } else { - echo '! The cache directory is not writable!
'; - } - @fclose($test_file); - @unlink("{$BASE_DIR}/fp-content/cache/chmod-test-file"); - } else { - echo '! The directory cache does not exist!
'; + echo '! The cache directory is not writable!
'; } + @fclose($test_file); + @unlink("{$BASE_DIR}/fp-content/cache/chmod-test-file"); + } else { + echo '! The directory cache does not exist!
'; + } ?>[/code]
-[code]
-The PHP version is
-The PHP-Intl extension must be activated.
+[code]
++ The PHP version is +
+The PHP-Intl extension must be activated.
! The intl Extension is not activated!'; - } else { - echo '✓ The intl Extension is activated.
'; - } + if (!function_exists("intl_error_name")) { + echo '! The intl Extension is not activated!
'; + } else { + echo '✓ The intl Extension is activated.
'; + } ?>The GDlib extension must be activated to create image thumbnails.
! The GD Extension is not activated!'; - } else { - echo '✓ The GD Extension is activated.
'; - } + if (!function_exists("gd_info")) { + echo '! The GD Extension is not activated!
'; + } else { + echo '✓ The GD Extension is activated.
'; + } ?>[/code]
-[code]
-The browser used is of interest if there are display errors.
+[code]
+The browser used is of interest if there are display errors.
'Internet explorer', - '/trident/i' => 'Internet explorer', - '/edge/i' => 'Edge', - '/firefox/i' => 'Firefox', - '/safari/i' => 'Safari', - '/chrome/i' => 'Chrome', - '/opera/i' => 'Opera', - '/opr/i' => 'Opera', - '/mobile/i' => 'Mobile browser', - '/konqueror/i' => 'Konqueror', - ]; + // Browser recognition does not always work correctly. + // This also depends on whether a current browscap has been set in php.ini or not. + function browser() { + $user_agent = $_SERVER ['HTTP_USER_AGENT']; + $browser = "Not recognized"; - foreach ($browsers as $regex => $value) { - if (preg_match($regex, $user_agent)) { - $browser = $value; - } + $browsers = [ + '/msie/i' => 'Internet explorer', + '/trident/i' => 'Internet explorer', + '/edge/i' => 'Edge', + '/firefox/i' => 'Firefox', + '/safari/i' => 'Safari', + '/chrome/i' => 'Chrome', + '/opera/i' => 'Opera', + '/opr/i' => 'Opera', + '/mobile/i' => 'Mobile browser', + '/konqueror/i' => 'Konqueror' + ]; + + foreach ($browsers as $regex => $value) { + if (preg_match($regex, $user_agent)) { + $browser = $value; } - return $browser; } - echo 'Browser: ' . browser() . '
'; + return $browser; + } + echo 'Browser: ' . browser() . '
'; ?> -If visitors to the FlatPress blog are to be informed about cookies, this is the cookie.
-Hint: The name of the cookie changes each time FlatPress is reinstalled.
+If visitors to the FlatPress blog are to be informed about cookies, + this is the cookie.
++ Hint: The name of the cookie changes each time + FlatPress is reinstalled. +
[/code]
-Symbols:
-✓ No action necessary
-ℹ Does not restrict functionality, but requires attention
-! Action urgently needed
-Powered by FlatPress.
- ++ Symbols: +
++ ✓ No action necessary +
++ ℹ Does not restrict functionality, but requires + attention +
++ ! Action urgently needed +
++ Powered by FlatPress. +
+