compile redis or any module together to php

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
oscaroxy
Forum Newbie
Posts: 4
Joined: Wed May 31, 2017 2:16 am

compile redis or any module together to php

Post by oscaroxy »

I would install phpredis with php, that is, I would download php 7.1.5, download phpredis (master) and both compile together.
what is the line to add in ./configure of php?

an alternative is compile phpredis (./configure && make && make install into php7.1.5/ext)
after

cd php7.1.5

./configure \
-with-config-file-path=/etc \
-with-libdir=lib64 \
-prefix=/usr/local \
-with-layout=PHP \
-with-pear \
-with-apxs2 \
-enable-calendar \
-enable-bcmath \
-with-gmp \
-enable-exif \
-with-mcrypt \
-with-mhash \
-with-zlib \
-with-bz2 \
-enable-zip \
-enable-ftp \
-enable-mbstring \
-with-iconv \
-enable-intl \
-with-icu-dir=/usr \
-with-gettext \
-with-pspell \
-enable-sockets \
-with-openssl=/usr/local \
-with-curl \
-with-curlwrappers \
-with-gd \
-enable-gd-native-ttf \
-with-jpeg-dir=/usr \
-with-png-dir=/usr \
-with-zlib-dir=/usr \
-with-xpm-dir=/usr \
-with-vpx-dir=/usr \
-with-freetype-dir=/usr \
-with-libxml-dir=/usr \
-with-mysqli=mysqlnd \
-with-pdo-mysql=mysqlnd \
-enable-soap \
-with-xmlrpc \
-with-xsl \
-with-tidy=/usr \
-with-readline \
-enable-pcntl \
-enable-sysvshm \
-enable-sysvmsg \
-enable-shmop

make && make install

and add into php.ini extension=redis.so

thanks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: compile redis or any module together to php

Post by requinix »

./configure only works with "core" extensions. Those that are bundled together with PHP. The redis extension is not in the core so it needs to be built separately.
oscaroxy
Forum Newbie
Posts: 4
Joined: Wed May 31, 2017 2:16 am

Re: compile redis or any module together to php

Post by oscaroxy »

thanks a lot, you have removed a doubt
:D
oscaroxy
Forum Newbie
Posts: 4
Joined: Wed May 31, 2017 2:16 am

Re: compile redis or any module together to php

Post by oscaroxy »

another doubt, if I can...

in the self condition of before, if I don't use phpize command what happens?
that is:

you suppose I have php 7.0.0 installed

Code: Select all

download php7.1.5
cd php7.1.5/ext
download phpredis
cd phpredis
configure
make && make install
cd ../../ (pwd php7.1.5)

.configure -with=..... 
make && make install
vi php.ini -> extension=redis.so
have I php 7.1.5 installed now?
is phpredis enabled?

thanks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: compile redis or any module together to php

Post by requinix »

oscaroxy wrote:in the self condition of before, if I don't use phpize command what happens?
You won't be able to build the extension correctly.
oscaroxy wrote:have I php 7.1.5 installed now?
Yes, because you followed the steps for how to build and install PHP.
oscaroxy wrote:is phpredis enabled?
Probably not, because you can't build and install a PHP extension until you have PHP itself built and installed. Also I don't think you followed the steps for building an extension.
oscaroxy
Forum Newbie
Posts: 4
Joined: Wed May 31, 2017 2:16 am

Re: compile redis or any module together to php

Post by oscaroxy »

so without phpize I don't install correctly the extension.
thanks for your patience
bye
Post Reply