Skip to content

Commit

Permalink
修复安装好PHP扩展后在PHP探针中没有立即显示的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Apr 15, 2022
1 parent 530f656 commit 23e828f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions class/ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,9 +1343,10 @@ def php_info(self,args):
php_path = '/usr/local/lsws/lsphp'
php_bin = php_path + php_version + '/bin/php'
php_ini = php_path + php_version + '/etc/php.ini'
if not os.path.exists('/etc/redhat-release'):
php_ini = php_path + php_version + '/etc/php/'+args.php_version+'/litespeed/php.ini'
tmp = public.ExecShell(php_bin + ' /www/server/panel/class/php_info.php')[0]
php_ini_lit = "/www/server/php/80/etc/php/80/litespeed/php.ini"
if os.path.exists(php_ini_lit):
php_ini = php_ini_lit
tmp = public.ExecShell(php_bin + ' -c {} /www/server/panel/class/php_info.php'.format(php_ini))[0]
if tmp.find('Warning: JIT is incompatible') != -1:
tmp = tmp.strip().split('\n')[-1]
result = json.loads(tmp)
Expand Down

0 comments on commit 23e828f

Please sign in to comment.