diff --git a/lang/en_US.ini b/lang/en_US.ini
index 2392a8b..d5706d7 100644
--- a/lang/en_US.ini
+++ b/lang/en_US.ini
@@ -407,4 +407,15 @@ backtotop = "Back to top"
subpages = "Sub pages"
getstarted = "Get started"
onthispage = "On this page"
-cache_folder_not_writable = "/cache/ directory is not writable, please update the permissions/ownership to continue."
\ No newline at end of file
+cache_folder_not_writable = "/cache/ directory is not writable, please update the permissions/ownership to continue."
+health_check = "Health Check"
+directory_permissions = "Directory Permissions"
+cache_folder_writable = "/cache/ directory is writable."
+content_folder_not_writable = "/content/ directory is not writable, please update the permissions/ownership to continue."
+content_folder_writable = "/content/ directory is writable."
+users_folder_not_writable = "/config/users/ directory is not writable, please update the permissions/ownership to continue."
+users_folder_writable = "/config/users/ directory is writable."
+php_check = "PHP Version"
+php_version_check_passed = "PHP version meets the minimum requirement."
+php_version_check_failed = "PHP version does not meet the minimum requirement. Please upgrade your PHP version."
+php_modules = "PHP Modules"
diff --git a/system/admin/admin.php b/system/admin/admin.php
index 1e4a09f..ce766e1 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -1674,6 +1674,7 @@ EOF;
}
if ($role === 'editor' || $role === 'admin') {
$toolbar .= '
' . i18n('Clear_cache') . '';
+ $toolbar .= '' . i18n('health_check') . '';
}
$toolbar .= '' . i18n('Edit_profile') . '';
$toolbar .= '' . i18n('Logout') . '';
diff --git a/system/admin/views/health.html.php b/system/admin/views/health.html.php
new file mode 100644
index 0000000..fda25b8
--- /dev/null
+++ b/system/admin/views/health.html.php
@@ -0,0 +1,70 @@
+
+'.i18n('health_check').'
';
+
+echo ''.i18n('php_check').'
';
+
+$requiredPhpVersion = '7.2';
+if (version_compare(PHP_VERSION, $requiredPhpVersion, '>=')) {
+ echo ' ✅ '.i18n('php_version_check_passed').' (Current: '.PHP_VERSION.', Required: '.$requiredPhpVersion.')
';
+} else {
+ echo ' ❌ '.i18n('php_version_check_failed').' (Current: '.PHP_VERSION.', Required: '.$requiredPhpVersion.')
';
+}
+
+echo ''.i18n('directory_permissions').'
';
+
+$cachedir = 'cache/';
+if (!is_writable($cachedir)) {
+ echo ' ❌ '.i18n('cache_folder_not_writable').'
';
+} else {
+ echo ' ✅ '.i18n('cache_folder_writable').'
';
+}
+
+$contentdir = 'content/';
+if (!is_writable($contentdir)) {
+ echo ' ❌ '.i18n('content_folder_not_writable').'
';
+} else {
+ echo ' ✅ '.i18n('content_folder_writable').'
';
+}
+
+$usersdir = 'config/users/';
+if (!is_writable($usersdir)) {
+ echo ' ❌ '.i18n('users_folder_not_writable').'
';
+} else {
+ echo ' ✅ '.i18n('users_folder_writable').'
';
+}
+
+echo ''.i18n('php_modules').'
';
+
+$requiredChecks = array(
+ 'json' => extension_loaded('json'),
+ 'mbstring' => extension_loaded('mbstring'),
+ 'libxml' => extension_loaded('libxml'),
+ 'dom' => extension_loaded('dom') && class_exists('DOMDocument'),
+ 'simplexml' => extension_loaded('simplexml') && class_exists('SimpleXMLElement'),
+ 'xml' => extension_loaded('xml'),
+ 'hash' => extension_loaded('hash'),
+ 'session' => extension_loaded('session'),
+ 'pcre' => extension_loaded('pcre'),
+ 'filter' => extension_loaded('filter'),
+ 'ctype' => extension_loaded('ctype'),
+ 'openssl' => extension_loaded('openssl'),
+ 'zip' => extension_loaded('zip') && class_exists('ZipArchive'),
+ 'gd' => extension_loaded('gd') && function_exists('gd_info'),
+ 'iconv' => extension_loaded('iconv') && function_exists('iconv'),
+ 'intl' => extension_loaded('intl'),
+ 'apcu' => extension_loaded('apcu'),
+ 'mcrypt' => extension_loaded('mcrypt'),
+);
+
+foreach ($requiredChecks as $label => $ok) {
+ if ($ok) {
+ echo ' ✅ '.$label.'
';
+ } else {
+ echo ' ❌ '.$label.'
';
+ }
+}
+
diff --git a/system/admin/views/layout.html.php b/system/admin/views/layout.html.php
index 6df46d2..760d423 100644
--- a/system/admin/views/layout.html.php
+++ b/system/admin/views/layout.html.php
@@ -262,6 +262,13 @@ if (isset($author[0])) {
+
+
+
+
+
+
+
diff --git a/system/htmly.php b/system/htmly.php
index 6ae4e69..3253ee6 100644
--- a/system/htmly.php
+++ b/system/htmly.php
@@ -2626,6 +2626,41 @@ get('/admin/clear-cache', function () {
}
});
+// Show health status page
+get('/admin/health', function () {
+ $user = $_SESSION[site_url()]['user'] ?? null;
+ $role = user('role', $user) ?? null;
+ if (login()) {
+ config('views.root', 'system/admin/views');
+ if ($role === 'editor' || $role === 'admin') {
+ render('health', array(
+ 'title' => generate_title('is_default', i18n('Health_check')),
+ 'description' => safe_html(strip_tags(blog_description())),
+ 'canonical' => site_url(),
+ 'metatags' => generate_meta(null, null),
+ 'type' => 'is_admin-health',
+ 'is_admin' => true,
+ 'bodyclass' => 'admin-health',
+ 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Health_check')
+ ));
+ } else {
+ render('denied', array(
+ 'title' => generate_title('is_default', i18n('Denied')),
+ 'description' => safe_html(strip_tags(blog_description())),
+ 'canonical' => site_url(),
+ 'metatags' => generate_meta(null, null),
+ 'type' => 'is_admin-health',
+ 'is_admin' => true,
+ 'bodyclass' => 'denied',
+ 'breadcrumb' => '' . config('breadcrumb.home') . ' » ' . i18n('Denied')
+ ));
+ }
+ } else {
+ $login = site_url() . 'login';
+ header("location: $login");
+ }
+});
+
// Show Update page
get('/admin/update', function () {
$user = $_SESSION[site_url()]['user'] ?? null;