Comments (6)
It's not a PHP extension. It's a unit module. It should be in the unit modules directory (exactly where it's installed).
## Copy the library to extensions directory
cp /opt/unit/modules/php56.unit.so /opt/build/php56/lib64/extensions/no-debug-non-zts-20131226/php56.unit.so
echo "extension=php56.unit.so" >> /etc/php56/php.ini
These steps are excessive and wrong.
from unit.
Got it. But is there any way to check that compiled module works? Cause for now I'm experiencing some weird behaviours from my application and not sure where is the problem: in application itself or in Unit misconfiguration.
from unit.
You can check unit.log for these lines:
2017/09/28 16:43:15 [info] 10678#10678 discovery started
2017/09/28 16:43:15 [notice] 10678#10678 module: php 5.6.23-pl0-gentoo "build/php56.unit.so"
2017/09/28 16:43:15 [notice] 10678#10678 module: php 7.0.8-pl0-gentoo "build/php70.unit.so"
2017/09/28 16:43:15 [notice] 10678#10678 module: php 7.1.7 "build/php71.unit.so"
2017/09/28 16:43:15 [notice] 10678#10678 module: python 2.7.10 "build/py27.unit.so"
2017/09/28 16:43:15 [notice] 10678#10678 module: python 3.3.5 "build/py33.unit.so"
2017/09/28 16:43:15 [notice] 10678#10678 module: python 3.4.5 "build/py34.unit.so"
2017/09/28 16:43:15 [notice] 10678#10678 module: ruby 2.2 "build/ruby.unit.so"
from unit.
Great. I just checked my logs and found the message that I have a PHP 5.4 module installed instead of 5.6. And that's where my problem lies.
2017/09/28 13:57:05.810 [notice] 5012#5012 module: php 5.4.16 "/usr/lib64/unit/modules/php.unit.so"
2017/09/28 13:57:05.810 [notice] 5012#5012 module: python 2.7.5 "/usr/lib64/unit/modules/python.unit.so"
2017/09/28 13:57:05.810 [debug] 5012#5012 module: php 5.4.16 /usr/lib64/unit/modules/php.unit.so
2017/09/28 13:57:05.810 [debug] 5012#5012 module: python 2.7.5 /usr/lib64/unit/modules/python.unit.so
How that could happen if I compiled the module with 5.6 version?
[root@8bfb94ce2765 unit]# /opt/build/php56/bin/php-config
Usage: /opt/build/php56/bin/php-config [OPTION]
Options:
--prefix [/opt/build/php56]
--includes [-I/opt/build/php56/include/php -I/opt/build/php56/include/php/main -I/opt/build/php56/include/php/TSRM -I/opt/build/php56/include/php/Zend -I/opt/build/php56/include/php/ext -I/opt/build/php56/include/php/ext/date/lib]
--ldflags [ -L/usr/lib64]
--libs [-lcrypt -lz -lexslt -lresolv -lcrypt -lreadline -lncurses -lrt -lmcrypt -lgmp -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -lfreetype -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxslt -lxml2 -lz -ldl -lm -lssl -lcrypto -lcrypt ]
--extension-dir [/opt/build/php56/lib64/extensions/no-debug-non-zts-20131226]
--include-dir [/opt/build/php56/include/php]
--man-dir [/opt/build/php56/share/man]
--php-binary [/opt/build/php56/bin/php]
--php-sapis [ apache2handler cli fpm]
--configure-options [--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/opt/build/php56 --exec-prefix=/opt/build/php56 --bindir=/opt/build/php56/bin --sbindir=/opt/build/php56/sbin --sysconfdir=/etc --datadir=/opt/build/php56/share --includedir=/opt/build/php56/include --libdir=/opt/build/php56/lib64 --libexecdir=/opt/build/php56/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/opt/build/php56/share/man --infodir=/opt/build/php56/share/info --without-pear --with-config-file-path=/etc/build-php56/ --with-config-file-scan-dir=/etc/build-php56/conf.d --sysconfdir=/etc/build-php56/ --with-gnu-ld --enable-inline-optimization --enable-cli --enable-fpm --disable-cgi --enable-ftp --with-gettext --with-mhash --with-readline --enable-wddx --with-xsl --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-zip --with-zlib --enable-sockets --enable-pcntl --with-mcrypt --with-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-pdo-mysql --enable-libxml --enable-bcmath --enable-session --enable-xml --enable-simplexml --with-jpeg-dir --with-png-dir --with-bz2 --with-curl --enable-exif --enable-soap --with-pic --disable-rpath --enable-mbstring --enable-calendar --with-openssl --with-pcre-regex --with-iconv --with-gmp --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr --disable-intl --enable-json --enable-opcache --with-apxs2 build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=ccache CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic LDFLAGS=-Wl,-z,relro CXX=ccache CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic]
--version [5.6.31]
--vernum [50631]
from unit.
It seems you have two different versions of unit in your system.
The one you have installed from official packages and it's configured with /usr/lib64/unit/modules/
modules directory. This version you actually run.
The second one you have compiled yourself into /opt/unit
directory with a PHP 5.6 module.
from unit.
That's right, I also installed unit from package manager. Now it works fine. Thanks!
from unit.
Related Issues (20)
- RHEL Packages: GPG check fails when explicitly enabled HOT 9
- Query control API to show the loaded modules HOT 9
- Change server name header HOT 1
- Add error code and error message as variables at error page HOT 1
- Docker: for python based images, use the -slim version HOT 14
- Building Containers for amd64 on ARM instances fails HOT 5
- Crypto HOT 2
- Coredump if port 443 is occupied by another process ( Almalinux 9 ) HOT 4
- Problem Too many redirect
- nginx configuration to redirect to existing maintenance page with env var condition HOT 1
- Support Python 3.11/3.12 on RHEL 8/9 HOT 2
- unitctl: fix up the output format tag's default HOT 1
- Inconsistency in Supported Language Count Between Repository Description and README HOT 1
- build fails on freebsd and libressl HOT 1
- grpc idle timeout is affected by `client_header_timeout header` HOT 2
- The issue about try_files cmd HOT 2
- review unit type choice HOT 1
- How to modify the value of nginx-unit backlog parameter? I want to increase it to meet my performance needs. It's time to change the default value, 511 is no longer applicable HOT 26
- Listeners 127.0.0.1:xx is not working, The prompt already exists, but I haven't seen the configuration anywhere HOT 3
- Upgrade wasm-wasi-component to latest Wasmtime HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unit.