Skip to content

Commit

Permalink
use libphp on PHP 8+, else libphp7
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet authored and xrmx committed Feb 8, 2024
1 parent 2fc06c5 commit 88b3d30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/php/uwsgiplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 88b3d30

Please sign in to comment.