Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP version is wrong in phpinfo() output

Tags:

php

docker

nginx

I run my web application in nginx server with php-fpm version on debian wheezy, inside a docker container.

I update my php version to 5.6.1.

RUN echo "deb http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list
RUN echo "deb-src http://packages.dotdeb.org wheezy all" >> /etc/apt/sources.list
RUN echo "deb http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list
RUN echo "deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list
RUN wget http://www.dotdeb.org/dotdeb.gpg
RUN apt-key add dotdeb.gpg
RUN apt-get update
RUN apt-get install -y nginx php5-fpm php5-mysqlnd php5-cli supervisor

If I do the following commands inside my container, version is ok and seems correctly updated:

php -v // 5.6.6
/usr/sbin/php5-fpm -v // 5.6.6

But if I go to my document root and do phpinfo(), the php version is wrong in Core -> PHP version (5.4.36, the default one with debian:wheezy). More nginx version output is wrong too.

Any ideas ?

like image 860
kero_zen Avatar asked Jun 19 '26 17:06

kero_zen


1 Answers

Run the following command.

If apache

sudo service apache2 restart

If nginx

sudo service nginx restart

After you install any server modules, it is a good habit that you restart your apache,nginx.

like image 51
Gururaju Hiddenx Avatar answered Jun 21 '26 08:06

Gururaju Hiddenx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!