From 35c5b469a0f0ac51e6c39636c7e2ee5f1caa0dd3 Mon Sep 17 00:00:00 2001 From: printempw Date: Thu, 22 Feb 2018 23:07:23 +0800 Subject: [PATCH] Add check for escapeshellarg function --- app/Http/Controllers/SetupController.php | 4 ++++ resources/lang/en/setup.yml | 3 +++ resources/lang/zh_CN/setup.yml | 3 +++ 3 files changed, 10 insertions(+) diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 76363a20..05dc86e9 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -45,6 +45,10 @@ class SetupController extends Controller throw new PrettyPageException(trans('setup.database.table-already-exists', ['tables' => json_encode($existingTables)]), 1); } + if (! function_exists('escapeshellarg')) { + throw new PrettyPageException(trans('setup.disabled-functions.escapeshellarg'), 1); + } + return view('setup.wizard.info'); } diff --git a/resources/lang/en/setup.yml b/resources/lang/en/setup.yml index 0e63e196..fca50047 100644 --- a/resources/lang/en/setup.yml +++ b/resources/lang/en/setup.yml @@ -10,6 +10,9 @@ file: permissions: storage: Unable to write to storage directory, please check the permissions. +disabled-functions: + escapeshellarg: "The escapeshellarg function is disabled in your php.ini configuration. Please contact your web hosting provider to enable it or perform the installation manually: http://t.cn/REzBZUe" + locked: title: Already installed text: You appear to have already installed Blessing Skin Server. To reinstall please clear your old database tables first, or use a new database table prefix. diff --git a/resources/lang/zh_CN/setup.yml b/resources/lang/zh_CN/setup.yml index aaa10f6e..b04e071e 100644 --- a/resources/lang/zh_CN/setup.yml +++ b/resources/lang/zh_CN/setup.yml @@ -10,6 +10,9 @@ file: permissions: storage: 无法写入 storage 目录,请检查目录权限是否正确 +disabled-functions: + escapeshellarg: 你的主机提供商禁用了 escapeshellarg 函数,而此函数是本安装程序必须使用的。请联系你的主机提供商解决,或者参照这篇文章进行手动安装:http://t.cn/REzBZUe + locked: title: 已安装过 text: Blessing Skin Server 看起来已经安装妥当。如果想重新安装,请删除数据库中的旧数据表,或者换一个数据表前缀。