0

I have an installation of Fedora20. I have the Apache server and php packages installed using yum. When i run the command line:

php -version i get:
[root@host ~]# php -version
PHP 5.5.20 (cli) (built: Dec 18 2014 05:55:32)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
[root@host ~]#

however when i go to

http://host/phpinfo.php I get the following version:

PHP logo
PHP Version 5.5.10

I have run an md5 sum on libphp5.so and libphp5-zts.so.

[root@host modules]# md5sum libphp5.so
05687868a52f9f20960e8471fd10ebce  libphp5.so
[root@host modules]# md5sum libphp5-zts.so
4a16156ba70db7e13cd6722618332c46  libphp5-zts.so
[root@host  modules]#

I have compared them to an install that works fine and reports the version as the same for both apache and command line.

[root@host modules]# cd /etc/httpd/conf.modules.d/
[root@host conf.modules.d]# ls
00-base.conf  00-lua.conf  00-proxy.conf  00-systemd.conf  10-php.conf
00-dav.conf   00-mpm.conf  00-ssl.conf    01-cgi.conf      README
[root@host conf.modules.d]# more 10-php.conf
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>

<IfModule !prefork.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

[root@host conf.modules.d]#

I have the run yum update as well.

I am at a complete loss as to where to look next. What am I missing? Any help would be greatly appreciated.

Here is an update: ran yum info php-cli

[root@host ~]# yum info php-cli
Loaded plugins: langpacks, refresh-packagekit
Installed Packages
Name        : php-cli
Arch        : x86_64
Version     : 5.5.20
Release     : 2.fc20
Size        : 13 M
Repo        : installed
From repo   : updates
Summary     : Command-line interface for PHP
URL         : http://www.php.net/
License     : PHP and Zend and BSD
Description : The php-cli package contains the command-line interface
            : executing PHP scripts, /usr/bin/php, and the CGI interface.

It appears to be 5.5.20

3
  • apachectl restart? Commented Feb 6, 2015 at 15:09
  • yes i did a restart several times. Commented Feb 10, 2015 at 7:56
  • 1
    Then uninstalling and reinstalling all PHP related packages may be the easiest next step with a high probability of success. Commented Feb 10, 2015 at 8:53

1 Answer 1

1

There is a yum package called php-cli which is different from the standard php package apache uses.

Try $ yum info php-cli and see what it says. You may need to uninstall that and force install the desired version.

Sign up to request clarification or add additional context in comments.

1 Comment

I updated the question with the yum info php-cli. it appears to be the same version as everything else (5.5.20)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.