Unit building PHP modules. Version confusion. #1072
Replies: 7 comments 1 reply
-
Hi @skillslasher, you'd also need to specify a proper path to php7.4-config, via --config option. |
Beta Was this translation helpful? Give feedback.
-
Hi @thresheek I've had the same idea before, but it raises an error. |
Beta Was this translation helpful? Give feedback.
-
Please check the |
Beta Was this translation helpful? Give feedback.
-
All I found in this file is this: checking for PHP zend_signal_startup() I tried to find this file on the system, but it doesn't exist. I don't know where he's supposed to be either. The Unit's documentation states simply It worked like this with past versions of Unit |
Beta Was this translation helpful? Give feedback.
-
Well, you need to specify a proper path to Looking at Ubuntu packages, though, I don't see 7.4 in 22.04, only in 20.04: https://packages.ubuntu.com/search?keywords=php7.4-dev so I'm not sure where it can be found on your system - probably a self-installed PHP from somewhere else? |
Beta Was this translation helpful? Give feedback.
-
@thresheek Thank you so much, for your help and advice. Yeah, I found it. This file. It was called |
Beta Was this translation helpful? Give feedback.
-
@skillslasher sorry for comming back to this a little late but before closing it - would you say there are some missing steps in our documentation about building PHP modules? Is there anything we can improve that would helped you doing it right in the first place? |
Beta Was this translation helpful? Give feedback.
-
When trying to build modules for PHP of different versions, at the moment of configuring the build, the latest PHP package is picked up, not the one specified in the configuration parameters.
For example.
The system has php7.4, php8.1, php8.2 installed.
./configure php --module=php7.4 --config=php-config --lib-path=/usr/lib/php/7.4/sapi
configuring PHP module
checking for PHP ... found
checking for PHP version ... 8.2.12
checking for PHP embed SAPI ... found
checking for PHP Zend Thread Safety ... not found
checking for PHP zend_signal_startup() ... found
With these ./configure settings, it will still pick up the most recent package on the system, which is php8.2
Naturally, such a module does not work properly afterwards.
Forcing the default PHP interpreter to be changed to php7.4 did nothing.
Can you please tell me how to fix the problem?
System: Ubuntu 22.04.3.
Unit version 1.31.1
PHP 7.4.33
PHP 8.1.25
PHP 8.2.12
Beta Was this translation helpful? Give feedback.
All reactions