Replies: 5 comments 14 replies
-
What does this show? $ curl --unix-socket /path/to/control.unit.sock http://localhost/status/modules (Adjust the path to Unit's control socket) Then for each of the module paths returned (the "lib" value) E.g. $ ldd /path/to/phpxx.unit.so |
Beta Was this translation helpful? Give feedback.
-
Ah, your Unit doesn't have the But OK, I think your ldd outputs show the issue
and
They are both using the same PHP shared library (DSO) I think your |
Beta Was this translation helpful? Give feedback.
-
I created a folder for 8.2 and put a symlink inside for libphp8.2.so
then I tried to configure the php8.2 module with the new path :
but got SAPI not found error:
|
Beta Was this translation helpful? Give feedback.
-
Hmm, maybe you can spot some difference... $ ls -l /usr/lib64/libphp*
-rwxr-xr-x. 1 root root 4829528 Oct 6 2023 /usr/lib64/libphp-8.0.so
lrwxrwxrwx. 1 root root 13 Oct 6 2023 /usr/lib64/libphp.so -> libphp-8.0.so
$ cd /tmp
$ ln -s ../usr/lib64/libphp-8.0.so libphp-8.0.so
$ ls -l libphp-8.0.so
lrwxrwxrwx. 1 andrew andrew 26 Feb 22 14:50 libphp-8.0.so -> ../usr/lib64/libphp-8.0.so
$ cd ~/src/unit/
$ ./configure php --module=php80 --config=/usr/bin/php-config --lib-path=/tmp
configuring PHP module
checking for PHP ... found
+ PHP SAPI: [apache2handler litespeed fpm phpdbg cli embed cgi]
checking for PHP version ... 8.0.30
checking for PHP embed SAPI ... found
checking for PHP Zend Thread Safety ... not found
checking for PHP zend_signal_startup() ... found
+ PHP module: php80.unit.so
$ make
CC build/src/nxt_php_sapi-php80.o
LD build/lib/unit/modules/php80.unit.so
$ readelf -a build/lib/unit/modules/php80.unit.so | grep R*PATH
0x000000000000000f (RPATH) Library rpath: [/tmp]
$ ldd build/lib/unit/modules/php80.unit.so | grep php
libphp-8.0.so => /tmp/libphp-8.0.so (0x00007f8f44e00000) |
Beta Was this translation helpful? Give feedback.
-
With full path no sapi error but still looking for /lib/libphp.so
|
Beta Was this translation helpful? Give feedback.
-
Building multiple PHP8 versions end up using the latest one. I have tried many time without being able to choose the former php version.
Sys info :
22.04.5
1.32.1
The system has
php8.2
,php8.4
installed :And
where both
/usr/lib/php/8.X/sapi
folders contains a symlinklibphp8.so
tolibphp8.X.so
located in/usr/lib/
,which I created as suggested by @VBart here#284$ /usr/bin/php-config8.2 output :
$ /usr/bin/php-config8.4 output :
My app config:
both phpmyadmin and engine-api-demo must use php 8.2 but instead 8.4 is used :
phpmyadmin :

engine-api-demo :

Beta Was this translation helpful? Give feedback.
All reactions