Giter VIP home page Giter VIP logo

Comments (6)

VBart avatar VBart commented on July 26, 2024

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.

cazorla19 avatar cazorla19 commented on July 26, 2024

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.

VBart avatar VBart commented on July 26, 2024

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.

cazorla19 avatar cazorla19 commented on July 26, 2024

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.

VBart avatar VBart commented on July 26, 2024

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.

cazorla19 avatar cazorla19 commented on July 26, 2024

That's right, I also installed unit from package manager. Now it works fine. Thanks!

from unit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.