Closed Smurfs-xxl closed 9 years ago
Phpiredis use hiredis lib, you need install it before. After, if configuration script is unable to locate hiredis you can specify in which directory it can be found using --with-hiredis-dir= (e.g. --with-hiredis-dir=/usr/local)
Regards
So how did find hiredis installation dir?
Having also some issue here
/app/src # apk add --no-cache hiredis
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/1) Installing hiredis (0.14.0-r0)
OK: 65 MiB in 43 packages
Then searching for it:
/tmp/phpiredis # find / -name *hire*
/usr/share/terminfo/h/hirez100-w
/usr/share/terminfo/h/hirez100
/usr/lib/libhiredis.so.0.14
Still I can't use:--with-hiredis-dir
I get:
/tmp/phpiredis # phpize && ./configure --enable-phpiredis --with-hiredis-dir=/usr/lib/
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.1.1 (ok)
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable phpiredis support... yes, shared
checking for hiredis library... yes, shared
checking for hiredis installation... configure: error: not found
After install hiredis from git the installation of phpiredis is but after i enable the module it doesn't work:
/app # php -m
PHP Warning: PHP Startup: Unable to load dynamic library 'phpiredis.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/phpiredis.so (Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20180731/phpiredis.so: redisReplyReaderGetReply: symbol not found), /usr/local/lib/php/extensions/no-debug-non-zts-20180731/phpiredis.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20180731/phpiredis.so.so: No such file or directory)) in Unknown on line 0
but its there:
/app # ls -lah /usr/local/lib/php/extensions/no-debug-non-zts-20180731/phpiredis.so
-rwxr-xr-x 1 root root 117.3K Jun 11 18:49 /usr/local/lib/php/extensions/no-debug-non-zts-20180731/phpiredis.so
Fixed using:
cd /tmp && git clone -b 'v0.13.3' https://github.com/redis/hiredis.git && cd hiredis; \
make && make install; \
cd /tmp && git clone https://github.com/nrk/phpiredis.git && cd phpiredis; \
phpize && ./configure --enable-phpiredis; \
make && make install; \
echo 'extension=phpiredis.so' > /usr/local/etc/php/conf.d/docker-php-ext-phpiredis.ini; \
checking for hiredis installation... configure: error: not found