From 14e53344d8e80ba697e9cf41628ffc13fcb953e0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 13 Nov 2023 09:20:20 +0100 Subject: [PATCH] use libphp on PHP 8+, else libphp7 --- plugins/php/uwsgiplugin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/php/uwsgiplugin.py b/plugins/php/uwsgiplugin.py index 8657eb704d..8a3e71b5e7 100644 --- a/plugins/php/uwsgiplugin.py +++ b/plugins/php/uwsgiplugin.py @@ -21,7 +21,12 @@ LDFLAGS.append('-L%s' % ld_run_path) os.environ['LD_RUN_PATH'] = ld_run_path -LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version] +# PHP8 and above does not add the version to the library +# name +if int(php_version) < 8: + LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp' + php_version] +else: + LIBS = [os.popen(PHPPATH + ' --libs').read().rstrip(), '-lphp'] phplibdir = os.environ.get('UWSGICONFIG_PHPLIBDIR') if phplibdir: