diff --git a/plugins/php/index_php.py b/plugins/php/index_php.py index 688c42e50..e23f9490c 100755 --- a/plugins/php/index_php.py +++ b/plugins/php/index_php.py @@ -132,6 +132,14 @@ def libConfCommon(version): libpath = getPluginDir() + '/versions/phplib.conf' phplib = json.loads(mw.readFile(libpath)) + php_dir = getServerDir() + "/" + version + ext_dir = php_dir+"/lib/php/extensions" + + ext_list = os.listdir(ext_dir) + for sodir in ext_list: + if sodir.find("no-debug-non-zts") > -1: + ext_dir += "/"+ sodir + libs = [] tasks = mw.M('tasks').where("status!=?", ('1',)).field('status,name').select() for lib in phplib: @@ -145,10 +153,15 @@ def libConfCommon(version): lib['task'] = task['status'] lib['phpversions'] = [] lib['phpversions'].append(tmp1[1]) - if phpini.find(lib['check']) == -1: - lib['status'] = False - else: + + lib['status'] = False + if phpini.find(lib['check']) > -1: lib['status'] = True + sofile = ext_dir+"/"+lib['check'] + if os.path.exists(sofile): + # print(os.path.getsize(sofile)) + if os.path.getsize(sofile) == 7: + lib['status'] = True libs.append(lib) return libs