0
我有一個碼頭工人,容器,其中我看到所有的PHP模塊:如何使用cli啓用php5-redis?
[email protected]:~# php -m
[PHP Modules]
Core
ctype
curl
date
dom
ereg
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
正如我們可以看到有沒有PHP5-的Redis在該列表中。 當我嘗試安裝它,我得到一個消息,說已經安裝:
[email protected]:~# apt-get install php5-redis
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-redis is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
我的PHP版本是5.6
[email protected]:~# php -v
PHP 5.6.31 (cli) (built: Sep 15 2017 01:12:36)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
那麼唯一的結論(如果我不是錯了)就是PHP5 -redis已安裝但未啓用。
這是我在Dockerfile:
FROM php:5-apache
RUN a2enmod rewrite
RUN a2enmod expires
RUN service apache2 restart
RUN apachectl -M
RUN apt-get update
RUN apt-get install -y php5-redis
RUN apt-get install -y redis-server
RUN php -m
COPY src/ /var/www/html
EXPOSE 80
CMD ["redis-server"]
所以,我怎樣才能使此方案PHP5,Redis的?
喜的朋友能不能幫我這個問題呢?它與REDIS相關https://stackoverflow.com/questions/46331300/how-to-debug-redis-apache-issues-a-docker-container – zwitterion