HELP PLEASE - Debian Lenny with ISPConfig upgrade to PHP 5.3 went wrong.

Discussion in 'Server Operation' started by nenad, Jan 18, 2013.

  1. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Hello to everyone,

    I tried to upgrade PHP 5.2 to 5.3 on Debian Lenny - installed according perfect install with ISPConfig3. It worked fine for almost one year when I got the idea (because I need it because of one project) to upgrade PHP to 5.3

    I thought it would be easy because of this
    http://www.onigoetz.ch/2010/10/03/update-php-to-the-latest-version-on-debian-lenny/

    or this

    http://www.web2works.co.uk/blog2works/how-to-upgrade-php-5-2-to-php-5-3-on-debian-lenny/

    But it didn't happen so.

    Now it looks like I am totally without PHP.

    Code:
    piks:~# php -v
    -bash: php: command not found
    http://ftniim.org:8080/

    gives internal server error.

    I don't know what happened but I guess that "upgrade" broke some configuration files made by ISPConfig?

    If that's of any help I have (at least) backup of /etc/mysql/my.cnf" , because during dist-upgrade it looks like database is upgraded too.

    What should I do to make system work again?

    When I try apt-get upgrade I got this:

    Code:
    piks:~# apt-get upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages have been kept back:
      mysql-client mysql-server php5-dev
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    piks:~#
    Sources list is:

    Code:
    #
    # deb cdrom:[Debian GNU/Linux 5.0.9 _Lenny_ - Official i386 NETINST Binary-1 20111002-08:57]/ lenny main
    
    #deb cdrom:[Debian GNU/Linux 5.0.9 _Lenny_ - Official i386 NETINST Binary-1 20111002-08:57]/ lenny main
    
    #deb http://ftp.us.debian.org/debian/ lenny main
    #deb-src http://ftp.us.debian.org/debian/ lenny main
    
    #deb http://security.debian.org/ lenny/updates main
    #deb-src http://security.debian.org/ lenny/updates main
    
    #deb http://volatile.debian.org/debian-volatile lenny/volatile main
    #deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
    #deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
    
    deb http://archive.debian.org/debian/ lenny main contrib
    deb-src http://archive.debian.org/debian/ lenny main contrib
    #deb http://security.debian.org/ lenny/updates main contrib
    #deb-src http://security.debian.org/ lenny/updates main contrib
    deb http://archive.debian.org/debian-volatile lenny/volatile main
    deb-src http://archive.debian.org/debian-volatile lenny/volatile main contrib non-free
    deb http://php53.dotdeb.org stable all
    deb-src http://php53.dotdeb.org stable all


    P.S. I can't upgrade to Lenny to Squeeze because machine is too old. That's why I am using Lenny in the first place.
     
    Last edited: Jan 18, 2013
  2. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Update

    OK, it looks liek that repo was wrong - actually outdated:

    This
    Code:
    deb http://php53.dotdeb.org stable all
    deb-src http://php53.dotdeb.org stable al
    points no more to Lenny but to Squezze and that make whole mess.

    So, I uninstalled removed that repository from sources list and then unisntalled all of the PHP

    Code:
    apt-get remove php5 libapache2-mod-php5 php5-gd php5-mysql 
    apt-get remove php5-curl php5-tidy php5-dev php-pear php5-cli
    apt-get remove php5-common php5-suhosin
    and then installed it back acording to http://www.howtoforge.com/perfect-server-debian-lenny-debian-5.0-with-bind-and-dovecot-ispconfig-3-p4

    Code:
    apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby libapache2-mod-ruby
    Now ISPConfing and websites are OK.

    However I have strange error in console?
    Code:
    piks:/tmp/php5# php -v
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/curl.so' - /usr/lib/php5/20060613+lfs/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/intl.so' - /usr/lib/php5/20060613+lfs/intl.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/tidy.so' - /usr/lib/php5/20060613+lfs/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/xmlrpc.so' - /usr/lib/php5/20060613+lfs/xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP 5.2.6-1+lenny16 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb  3 2012 13:17:21)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    piks:/tmp/php5#
    
    Any ideas what it might be?

    Moreover, according to comments people were just replacing 'stable' with either 'oldstable' or 'lenny' in
    Code:
    deb http://php53.dotdeb.org stable all
    deb-src http://php53.dotdeb.org stable al
    Unfortunatelly I can't make it work. What should I do?

    It looks like that lenny is moved to http://archives.dotdeb.org/dists/lenny/

    Code:
    deb http://archive.dotdeb.org lenny all
    
    But if I try to add that to sources list, it can't find it?

    I even tried this solution, but it didn't help either:
    http://mtehrani30.blogspot.com/2011/07/debian-lenny-update-php-52-to-53.html
     
    Last edited: Jan 18, 2013
  3. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Update

    This error
    Code:
    piks:/tmp/php5# php -v
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/curl.so' - /usr/lib/php5/20060613+lfs/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/intl.so' - /usr/lib/php5/20060613+lfs/intl.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/tidy.so' - /usr/lib/php5/20060613+lfs/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/xmlrpc.so' - /usr/lib/php5/20060613+lfs/xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0
    I resolved by commenting out loading of libraries in respective ini files such as:

    Code:
    piks:~# joe /etc/php5/conf.d/xmlrpc.ini
    piks:~# joe /etc/php5/conf.d/tidy.ini
    piks:~# joe /etc/php5/conf.d/intl.ini
    piks:~# joe /etc/php5/conf.d/curl.ini
    Is it a right way to deal with that error?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats ok. But it was not a error anyway,just a wrning which did not harm.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Why did you not upgrade Lenny to squeeze? Lenny is out of date and you wont get any updates for lenny anymore, so your server becomes insecure without security üatches. debian squeeze has php 5.3, so when you update to squeeze, you will get php 5.3 as well.
     
  6. nenad

    nenad ISPConfig Developer ISPConfig Developer

    It's an old P3 server which servers just fine for student projects :)
    For some strange reasons I couldn't install squeeze, I think that install would just freeze or so... That's why I gave up and installed Lenny. We are a small group of students and we use it as a proof of concept for moodle and for gensim/simserver and if the faculty staff approves it, then later they will buy new server... etc.

    Right now I would like to install PHP 5.3, but I am a little bit stuck with it.

    Can you please help me with this:


    How can I add http://archive.dotdeb.org lenny all to repository ?
     
  7. falko

    falko Super Moderator ISPConfig Developer

  8. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Thak you, but if I try to add this:
    Code:
    deb http://archives-php53.dotdeb.org/ lenny php5/5.3.9
    
    I get this

    Code:
    Err http://archives-php53.dotdeb.org lenny/php5/5.3.9 Packages
      404 Not Found
    Code:
    W: Failed to fetch http://archives-php53.dotdeb.org/dists/lenny/php5/5.3.9/binary-i386/Packages  404 Not Found
    :confused::confused::confused:
     
  9. nenad

    nenad ISPConfig Developer ISPConfig Developer

    I resolved it.

    1. I made new directory
    Code:
    mkdir /root/downloads/php5.3
    2. I downloaded all of the deb packages
    Code:
    wget -r -l 1 http://archives-php53.dotdeb.org/dists/lenny/php5/5.3.9/binary-i386/
    3. Created Packages.gz
    Code:
    sudo dpkg-scanpackages . /dev/null | gzip -c9 > Packages.gz
    4. added this to sources.list
    Code:
    deb file:///root/downloads/php5.3 ./
    5.
    Code:
     sudo apt-get update
    6.
    Code:
    apt-get upgrade
    7.
    Code:
    apt-get dist-upgrade
    And that's it

    8.
    Code:
    php -v
    PHP 5.3.9-1~dotdeb.2 with Suhosin-Patch (cli) (built: Jan 13 2012 01:21:19)
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    piks:~/downloads/php5.3#

    However, there's some error.
    What should I do with this? (websites are working just fine)

    Code:
    piks:~/downloads/php5.3# php -v
    PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
    PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/xmlrpc.ini on line 1 in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/imagick.so' - /usr/lib/php5/20090626+lfs/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Replace # with ; in these files.
     
  11. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Yes, I got it, but what should I do with:

    Code:
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/imagick.so' - /usr/lib/php5/20090626+lfs/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
     
  12. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    updatedb
    locate imagick.so
    ?
     
  13. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Output is none - looks like it's not installed?

    of course when I try

    apt-get install php5-imagick

    I het an error similiar to this

    But I realsed that most likely I haven't downloaded updted package for imagick , so I found it in anoter repo on same site:
    http://archives-php53.dotdeb.org/dists/lenny/php5-pecl/5.3.9/binary-i386/


    All-in all I resolved it with this steps:

     
    Last edited: Jan 23, 2013

Share This Page