1

I just upgraded PHP to V5.4 on my laptop, using the technique described in this answer, How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release?.

I did the same for my desktop a while back and it all worked fine. On my laptop however the old version (5.3.10) is still showing at the CLI (php -v) and the SAPI (phpinfo()). why is it so?

Presumably there is a config file (or two) that needs updating?

I am using Ubuntu 12.04.

EDIT: output of dpkg -l '*php5*' as requested: (sorry about the formatting)

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  libapache2-mod 5.3.10-1ubuntu server-side, HTML-embedded scripting languag
un  libapache2-mod <none>         (no description available)
ii  php5           5.3.10-1ubuntu server-side, HTML-embedded scripting languag
un  php5-cgi       <none>         (no description available)
ii  php5-cli       5.3.10-1ubuntu command-line interpreter for the php5 script
ii  php5-common    5.3.10-1ubuntu Common files for packages built from the php
ii  php5-curl      5.3.10-1ubuntu CURL module for php5
ii  php5-dev       5.3.10-1ubuntu Files for PHP5 module development
un  php5-fpm       <none>         (no description available)
ii  php5-gd        5.3.10-1ubuntu GD module for php5
ii  php5-gmp       5.3.10-1ubuntu GMP module for php5
un  php5-idn       <none>         (no description available)
un  php5-imap      <none>         (no description available)
ii  php5-intl      5.3.10-1ubuntu internationalisation module for php5
un  php5-json      <none>         (no description available)
un  php5-ldap      <none>         (no description available)
ii  php5-mcrypt    5.3.5-0ubuntu1 MCrypt module for php5
un  php5-mhash     <none>         (no description available)
ii  php5-mysql     5.3.10-1ubuntu MySQL module for php5
un  php5-mysqli    <none>         (no description available)
un  php5-mysqlnd   <none>         (no description available)
un  php5-pgsql     <none>         (no description available)
un  php5-sqlite    <none>         (no description available)
un  php5-sqlite3   <none>         (no description available)
un  php5-suhosin   <none>         (no description available)
ii  php5-xdebug    2.1.0-1        Xdebug Module for PHP 5
ii  php5-xmlrpc    5.3.10-1ubuntu XML-RPC module for php5
ii  php5-xsl       5.3.10-1ubuntu XSL module for php5

ANOTHER EDIT: Problem solved

Hi, Ubuntu suddenly decided it had numerous other updates to apply, including a kernel upgrade, so I let that happen and we now have v 5.4! (The CLI is saying it can't load xdebug, but I've seen this before and should be able to sort it out. If I can't I'll raise another question).

3
  • Did you restart apache, or the web server you are running?
    – NickW
    Jun 6 '13 at 8:51
  • Yep, restarted the laptop.
    – DatsunBing
    Jun 6 '13 at 12:37
  • please add output of: dpkg -l '*php5*'
    – oerdnj
    Jun 6 '13 at 20:30
1

See last edit above. Basically, Ubuntu needed to install some updates, and once this had happened, php 5.4 was in use.

1
  • Please flag the question as answered (You always need to do apt-get update && apt-get (dist-)upgrade). There should be a php5-xcache package in my PHP PPA prepared for PHP5.4 as well, so it might be a matter of installing php5-xcache (apt-get install php5-xcache).
    – oerdnj
    Jun 7 '13 at 8:55
0

I had the same issue. Adding this:

LoadFile "d:/Apache24/php/php-5.6.29/php5ts.dll"

in httpd.conf

fixed it for me

-2

Since you were using ubuntu, you could've just done an update using aptitude or apt-get. Eitherway, you need to update httpd.conf and make sure that php5_module points to the place where your new php is.

LoadModule php5_module modules/libphp5.so

The reason why it still points to an older version of php might be due to your computer having multiple copies of php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.