Skip to content

./configure: error: no PHP embed SAPI found when there is no libphp.so #1163

@vt-alt

Description

@vt-alt

On ALT Linux (which allows multiple php versions, currently 8.1, 8.2, and 8.3):

00:34:40 configuring PHP module
00:34:40 checking for PHP ... found
00:34:40  + PHP SAPI: [cli info phpdbg]
00:34:40 checking for PHP version ... not found
00:34:40 checking for PHP embed SAPI ... not found
00:34:40
00:34:40 ./configure: error: no PHP embed SAPI found.

This is because of this heuristic in auto/modules/php:

        if [ $NXT_PHP_MAJOR_VERSION -ge 8 ]; then
            NXT_PHP_LIB="-lphp"
        else
            NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
        fi

We have NXT_PHP_MAJOR_VERSION 8 but library is /usr/lib64/libphp-8.1.27.so so -lphp-8.1.27 should be used.

Can you please add parameter to override that value from configure? Like for example --libphp-ldflags=-lphp-8.1.27

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions