Skip to content

Commit

Permalink
Sync translations & hide UNIX commands on Windows
Browse files Browse the repository at this point in the history
Closes #19
  • Loading branch information
MrMicky-FR committed May 1, 2024
1 parent 5801045 commit 4b6432f
Show file tree
Hide file tree
Showing 8 changed files with 642 additions and 857 deletions.
30 changes: 30 additions & 0 deletions backend/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
<?php

/*
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Azuriom</title>
</head>
<body style="font-family: sans-serif; text-align: center; margin-top: 1rem">
<h1>Azuriom - PHP installation issue</h1>
<h2>PHP is not executed</h2>
<p>If you see this page in your browser, it means that PHP is not installed or not configured properly on your server.</p>
<p>On Linux with Apache2 you can try the following command: <code>apt install libapache2-mod-php</code></p>
<p>If you are using another setup, please refer to your web server documentation.</p>
<hr>
<p>This is NOT an issue related to Azuriom.</p>
</body>
</html><!--
*/

/**
* The Azuriom installer.
*
Expand Down Expand Up @@ -231,6 +250,16 @@ function has_function($function)
}
}

/**
* Check if the current OS is Windows.
*
* @return bool
*/
function is_windows()
{
return stripos(PHP_OS, 'WIN') === 0;
}

if (array_get($_GET, 'phpinfo') === '') {
phpinfo();
exit();
Expand All @@ -251,6 +280,7 @@ function has_function($function)
'path' => __DIR__,
'file' => __FILE__,
'htaccess' => file_exists(__DIR__.'/.htaccess') && file_exists(__DIR__.'/public/.htaccess'),
'windows' => is_windows(),
];

$step = 'check';
Expand Down
19 changes: 19 additions & 0 deletions backend/public/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
<?php

/*
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Azuriom</title>
</head>
<body style="font-family: sans-serif; text-align: center; margin-top: 1rem">
<h1>Azuriom - PHP installation issue</h1>
<h2>PHP is not executed</h2>
<p>If you see this page in your browser, it means that PHP is not installed or not configured properly on your server.</p>
<p>On Linux with Apache2 you can try the following command: <code>apt install libapache2-mod-php</code></p>
<p>If you are using another setup, please refer to your web server documentation.</p>
<hr>
<p>This is NOT an issue related to Azuriom.</p>
</body>
</html><!--
*/

$validInstallationUrlRewrite = true;

require __DIR__.'/../index.php';
Loading

0 comments on commit 4b6432f

Please sign in to comment.