mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Add PHP arch check.
This commit is contained in:
parent
628836a201
commit
e0fc7043b5
3 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,7 @@ class Bootstrap {
|
|||
} else if ($context->is_info_request()) {
|
||||
$public_href = $setup->get('PUBLIC_HREF');
|
||||
$x_head_tags = $context->get_x_head_html();
|
||||
$fallback_mode = false;
|
||||
require __DIR__ . '/pages/info.php';
|
||||
} else {
|
||||
$public_href = $setup->get('PUBLIC_HREF');
|
||||
|
|
|
@ -48,6 +48,7 @@ class Setup {
|
|||
private function add_globals_and_envs() {
|
||||
$this->set('PHP_VERSION', PHP_VERSION);
|
||||
$this->set('MIN_PHP_VERSION', MIN_PHP_VERSION);
|
||||
$this->set('PHP_ARCH', (PHP_INT_SIZE * 8) . '-bit');
|
||||
|
||||
$this->set('REQUEST_METHOD', $_SERVER['REQUEST_METHOD']);
|
||||
$this->set('REQUEST_HREF', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
|
||||
|
@ -152,6 +153,7 @@ class Setup {
|
|||
|
||||
'PHP_VERSION',
|
||||
'MIN_PHP_VERSION',
|
||||
'PHP_ARCH',
|
||||
'HAS_PHP_EXIF',
|
||||
'HAS_PHP_JPEG',
|
||||
|
||||
|
|
|
@ -82,6 +82,11 @@ function addTests() {
|
|||
true, setup.PHP_VERSION
|
||||
);
|
||||
|
||||
addTest(
|
||||
'PHP arch', 'PHP arch is 64-bit',
|
||||
setup.PHP_ARCH === '64-bit', setup.PHP_ARCH
|
||||
);
|
||||
|
||||
addTest(
|
||||
'Public Cache directory', 'Web server has write access',
|
||||
setup.HAS_WRITABLE_CACHE_PUB
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue