How to update PHP?

Discussion in 'Installation/Configuration' started by BorderAmigos, Jan 12, 2010.

  1. BorderAmigos

    BorderAmigos New Member

    I'm running ISPConfig3 with sites set up to use suPHP. I want to upgrade the PHP installation in my Debian Lenny box from the distro of 5.2.6 to the newer 5.2.12 or 5.3.

    When I try compiling the source and installing PHP package 5.2.12 it seems to install ok but phpinfo() says I am still using 5.2.6. Looking at Synaptic shows both PHP's installed.

    What am I missing here? Something to do with suPHP maybe? Thanks in advance.
  2. till

    till Super Moderator

    You have to install the new php 5.3 as mod_php, cli php and cgi php, so compiling php from source is not a good solution. Better use the debian packages from dotdeb:
  3. BorderAmigos

    BorderAmigos New Member

    Thank you for the link. Didn't know that one.

    (Edit) Did the above only to find out that 5.3 doesn't work well with Drupal 6, Gallery2, etc.
    Was able to downgrade back to PHP 5.2.6 then upgrade to 5.2.12.
    aptitude install php5=5.2.6.dfsg.1-1+lenny4
    aptitude install php5=5.2.12-0.dotdeb.1
    Last edited: Jan 12, 2010
  4. BorderAmigos

    BorderAmigos New Member

    Drupal is working fine now with PHP 5.2.12. But ISPConfig 3 admin is giving some errors. They don't really affect anything but probably should be addressed.

    Strict Standards: ob_start() [function.ob-start]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PST/-8.0/no DST' instead in /usr/local/ispconfig/interface/lib/ on line 35
    Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /usr/local/ispconfig/interface/lib/ on line 35
    EDIT: It seems zlib compression was enabled after the update and was causing this error. I disabled it and the error went away. Not sure how that happened.
    Last edited: Jan 15, 2010
  5. DaRKNeSS666NL

    DaRKNeSS666NL HowtoForge Supporter

    Trying to update my php also so I am using this link. After following the instructions I am stuck at:
    cat dotdeb.gpg | sudo apt-key add -
    Any help would be appreciated...
  6. till

    till Super Moderator

    Which error do you get?
  7. DaRKNeSS666NL

    DaRKNeSS666NL HowtoForge Supporter

    I am getting:
    server1:~# cat dotdeb.gpg | sudo apt-key add -
    -bash: sudo: command not found
  8. till

    till Super Moderator

    run the command without sudo:

    cat dotdeb.gpg | apt-key add -
  9. DaRKNeSS666NL

    DaRKNeSS666NL HowtoForge Supporter

    That indeed got rid of the error, thanks for that Till.
    But now I ran apt-get update/upgrade but still no update from my php version?
    It sees the update fine if I am correct
    server1:~# apt-get update
    Hit lenny/updates Release.gpg
    Ign lenny/updates/main Translation-en_US
    Get:1 oldstable Release.gpg [836B]
    Ign oldstable/all Translation-en_US
    Hit oldstable Release
    Hit lenny/updates Release
    Ign oldstable/all Packages/DiffIndex
    Ign oldstable/all Sources/DiffIndex
    Hit oldstable/all Packages
    Hit oldstable/all Sources
    Ign lenny/updates/main Packages/DiffIndex
    Get:2 oldstable Release.gpg [836B]
    Ign oldstable/all Translation-en_US
    Ign lenny/updates/main Sources/DiffIndex
    Hit lenny/updates/main Packages
    Hit oldstable Release
    Hit lenny/updates/main Sources
    Ign oldstable/all Packages/DiffIndex
    Ign oldstable/all Sources/DiffIndex
    Hit oldstable/all Packages
    Hit oldstable/all Sources
    Hit lenny Release.gpg
    Ign lenny/main Translation-en_US
    Hit lenny Release
    Ign lenny/main Packages/DiffIndex
    Hit lenny/volatile Release.gpg
    Ign lenny/volatile/main Translation-en_US
    Ign lenny/volatile/contrib Translation-en_US
    Ign lenny/main Sources/DiffIndex
    Hit lenny/main Packages
    Ign lenny/volatile/non-free Translation-en_US
    Hit lenny/volatile Release
    Hit lenny/main Sources
    Ign lenny/volatile/main Packages/DiffIndex
    Ign lenny/volatile/main Sources/DiffIndex
    Ign lenny/volatile/contrib Packages/DiffIndex
    Ign lenny/volatile/non-free Packages/DiffIndex
    Hit lenny/volatile/main Packages
    Hit lenny/volatile/main Sources
    Hit lenny/volatile/contrib Packages
    Hit lenny/volatile/non-free Packages
    Fetched 1672B in 1s (1654B/s)
    Reading package lists... Done
    server1:~# apt-get upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages have been kept back:
      bind9-host dnsutils libapache2-mod-php5 libbind9-50 libisccc50 libisccfg50
      liblwres50 mysql-client mysql-server php-pear php5 php5-cgi php5-cli
      php5-common php5-curl php5-gd php5-imagick php5-imap php5-mcrypt php5-mysql
    The following packages will be upgraded:
    1 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
    Need to get 75.4kB of archives.
    After this operation, 28.7kB disk space will be freed.
    Do you want to continue [Y/n]? y
    Get:1 oldstable/all mysql-common 5.1.58-1~dotdeb.0 [75.4kB]
    Fetched 75.4kB in 0s (1645kB/s)
    Reading changelogs... Done
    (Reading database ... 38037 files and directories currently installed.)
    Preparing to replace mysql-common 5.0.51a-24+lenny5 (using .../mysql-common_5.1.58-1~dotdeb.0_all.deb) ...
    Unpacking replacement mysql-common ...
    Setting up mysql-common (5.1.58-1~dotdeb.0) ...
    Configuration file `/etc/mysql/my.cnf'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : background this process to examine the situation
     The default action is to keep your current version.
    *** my.cnf (Y/I/N/O/D/Z) [default=N] ?
  10. falko

    falko Super Moderator

  11. vaio

    vaio New Member

    Hello ISP community,
    can someone please confirm if ISPconfig has problems with Php 5.3?

    Has anyone tried php 5.3.9?

    Is there any easy way updating 5.2.6 to 5.3 (read: apt-update?).

    Thank you,
  12. till

    till Super Moderator

    ISPConfig works fine with any php 5.3 version. The message that one user posted here was caused by a wrong error_reporting level in his php.ini.

    Yes, see other posts in this thread about dotedb.
  13. vaio

    vaio New Member

    Ok, i have found out solution and am sharing with you..

    For Debian LENNY:

    1. Open sources list:
    vi /etc/apt/sources.list
    2. Add lines to list -> Press 'a' and in new line insert (i supose you have VI editor, otherviwe use appropriate key):
    deb lenny all
    3. Save and exit -> Press ':wq' to save and exit in VI editor

    4. Import dotdeb keys:
    cat dotdeb.gpg | apt-key add -
    5. Update:
    apt-get update
    apt-get upgrade
    apt-get dist-upgrade
    Follow on screen instructions...

    You will get latest stable version for lenny: PHP 5.2.17 if you want 5.3.x, than add these lines in apt sources:

    deb oldstable all
    deb-src oldstable all
    If you use Debian Squeeze, than instead of 'oldstable' use 'stable' in apt list. Other is the same...

    P.s: I am not responsible for any issues, it is just my experience shared with you...

    To check PHP version, use: 'php -v' in terminal...

  14. falko

    falko Super Moderator

    ISPConfig works fine for me with PHP 5.3.9 (on Debian testing).
  15. PermaNoob

    PermaNoob New Member

    trying to upgrade php 5.2.6 to 5.3 using vaio's method and it appears no longer offers the php 5.3 packages for Lenny.

    Any other safe way to upgrade to php 5.3?

    I'm using ispconfig 3 on Lenny.

    (trying to install ownCloud, but it required php 5.3)
    Last edited: Jul 14, 2012
  16. DaRKNeSS666NL

    DaRKNeSS666NL HowtoForge Supporter

    Also still trying to update my old lenny server. to php5.2.7 or higher.

    I have red the info at
    deb squeeze all
    deb-src squeeze all
    But because its an older debian version I used

    deb lenny all
    deb-src lenny all
    deb oldstable all
    deb-src oldstable all
    but getting a 404 error.

    server1:~# wget
    --2012-12-28 15:50:22--
    Connecting to||:80... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2012-12-28 15:50:22 ERROR 404: Not Found.
    If I check the dotdeb site the php for lenny is located at:
    So I am guessing I have to chanse the links in the sources list but I dont know witch format to use?
    Can anybody give me a hand please....

  17. falko

    falko Super Moderator

Share This Page