1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Update to PHP5 on debian

Discussion in 'Plesk for Linux - 8.x and Older' started by Unrated, Feb 20, 2008.

  1. Unrated

    Unrated Guest

    0
     
    hey, I am trying to update my php version from PHP4 to PHP5. I heard from a friend that you cant just upgrade it because you could screw up plesk...

    I searched the forums here and did found a thread about updating to PHP5 but it was not on debian! Google didnt help me here either

    So if you somebody could point me in the right direction it would be much appreciated
     
  2. Monica@

    Monica@ Guest

    0
     
    Hi.

    Try this way:

    1. Comment the Plesk source in the /etc/apt/sources.list file, something like:

    # deb http://autoinstall.plesk.com/debian/PSA_8.1.0 sarge all

    and update:

    # apt-get update

    2. run 'apt-cache search | grep php5' to see wich packages are available

    3. install the necessary php5 packages, for example:


    # apt-get install php5 php5-common php5-gd php5-imap php5-mysql php5-xmlrpc php5-cgi php5-xsl php5-curl php5-cli

    4. remove libapache2-mod-php4 and psa-php4-configurator:

    # dpkg -r --force-depends libapache2-mod-php4 psa-php4-configurator

    5. activated Plesk source in the file /etc/apt/sources.list

    and updated:

    # apt-get update

    6. install libapache2-mod-php5 psa-php5-configurator:

    # apt-get install libapache2-mod-php5 psa-php5-configurator
     
  3. Unrated

    Unrated Guest

    0
     
    tx for the info but i dont have the sources.list file. I only have sources.list.d and thats a empty directory...
     
  4. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    are you sure?, it must be there ...
     
  5. Unrated

    Unrated Guest

    0
     
    it wasnt there but i added it myself now and its using it in updates.

    Anyway now i did what is described above but i keep getting dependency errors:

    Code:
    unrated:/etc/apt# apt-get install -f libapache2-mod-php5 psa-php5-configurator
    Reading package lists... Done
    Building dependency tree... Done
    You might want to run `apt-get -f install' to correct these:
    The following packages have unmet dependencies:
      psa-php5-configurator: Depends: php5-curl but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    and another error after trying again:
    Code:
    unrated:/etc/apt# apt-get install libapache2-mod-php5 psa-php5-configurator
    Reading package lists... Done
    Building dependency tree... Done
    Package psa-php5-configurator is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    W: Couldn't stat source package list http://autoinstall.plesk.com etch/all Packages (/var/lib/apt/lists/autoinstall.plesk.com_debian_PSA%5f8.3.0_dists_etch_all_binary-i386_Packages) - stat (2 No such file or directory)
    W: You may want to run apt-get update to correct these problems
    E: Package psa-php5-configurator has no installation candidate
    
    sorry i am doing this for the 1st time

    btw PHP isnt working at all now... I cant select PHP anymore in the hostsetup
     
  6. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    have a look to dpkg -l | grep php4
    and install all the php4 modules you had for the new php5 version

    maybe a apt-get install php5-curl helps for you ...


    the described above is crazy i think, i never done it this way ...

    and i think your /etc/apt/sources.list is not good, please show it to us...
     
  7. Unrated

    Unrated Guest

    0
     
    cant i just install PHP5 straight away? Cuz i am kinda screwed now without any php
     
  8. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    first show us cat /etc/apt/sources.list

    install php5 packages:
    apt-get install php5 php5-cli php5-common php5-curl php5-domxml php5-gd php5-imap php5-mysql ... and what else you need ...

    try to install the php5 apache modul:
    apt-get install libapache2-mod-php5

    and try to install the php5 plesk package:
    apt-get install psa-php5-configurator
     
  9. Unrated

    Unrated Guest

    0
     
    k

    the sources.list
    Code:
    deb ftp://ftp.be.debian.org/debian/ stable main contrib non-free
    deb http://security.debian.org stable/updates main contrib non-free
    #deb http://autoinstall.plesk.com/debian/PSA_8.3.0/ etch all
    
    and i thought this might help to:
    Code:
    unrated:/etc/apt# dpkg -l | grep php5
    rc  libapache2-mod-php5            5.2.0-8+etch10                           server-side, HTML-embedded scripting language (
    ii  php5                           5.2.0-8+etch10                           server-side, HTML-embedded scripting language (
    ii  php5-cgi                       5.2.0-8+etch10                           server-side, HTML-embedded scripting language (
    ii  php5-cli                       5.2.0-8+etch10                           command-line interpreter for the php5 scripting
    ii  php5-common                    5.2.0-8+etch10                           Common files for packages built from the php5 s
    ii  php5-gd                        5.2.0-8+etch10                           GD module for php5
    ii  php5-imap                      5.2.0-8+etch10                           IMAP module for php5
    ii  php5-ldap                      5.2.0-8+etch10                           LDAP module for php5
    ii  php5-mhash                     5.2.0-8+etch10                           MHASH module for php5
    ii  php5-mysql                     5.2.0-8+etch10                           MySQL module for php5
    ii  php5-odbc                      5.2.0-8+etch10                           ODBC module for php5
    ii  php5-recode                    5.2.0-8+etch10                           recode module for php5
    ii  php5-snmp                      5.2.0-8+etch10                           SNMP module for php5
    ii  php5-sybase                    5.2.0-8+etch10                           Sybase / MS SQL Server module for php5
    
     
  10. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
  11. Unrated

    Unrated Guest

    0
     
    k i tried that but still getting the same error

    If i try to install psa-php5-configurator i get this error

    Code:
    unrated:/etc/apt# apt-get install psa-php5-configurator
    Reading package lists... Done
    Building dependency tree... Done
    You might want to run `apt-get -f install' to correct these:
    The following packages have unmet dependencies:
      psa-php5-configurator: Depends: libapache2-mod-php5 but it is not going to be installed
                             Depends: php5-curl but it is not going to be installed
                             PreDepends: libapache2-mod-php5 but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    and when i want to install php5-curl i get this error:
    Code:
    unrated:/etc/apt# apt-get install php5-curl
    Reading package lists... Done
    Building dependency tree... Done
    You might want to run `apt-get -f install' to correct these:
    The following packages have unmet dependencies:
      psa: Depends: psa-php4-configurator (>= 1.3.0) but it is not going to be installed or
                    psa-php5-configurator (>= 1.3.0) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    so i really dont know what to do here...

    btw it seems like you are running the same debian and plesk. Can you tell me how you update? Maybe i forgot a step...
     
  12. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    do understand it better please show me

    dpkg -l | grep php
     
  13. Unrated

    Unrated Guest

    0
     
    Code:
    unrated:/etc/apt# dpkg -l | grep php
    rc  libapache2-mod-php4            4.4.4-8+etch4                            server-side, HTML-embedded scripting language (
    rc  libapache2-mod-php5            5.2.0-8+etch10                           server-side, HTML-embedded scripting language (
    ii  php4-cli                       4.4.4-8+etch4                            command-line interpreter for the php4 scripting
    ii  php4-common                    4.4.4-8+etch4                            Common files for packages built from the php4 s
    ii  php4-curl                      4.4.4-8+etch4                            CURL module for php4
    ii  php4-domxml                    4.4.4-8+etch4                            XMLv2 module for php4
    ii  php4-gd                        4.4.4-8+etch4                            GD module for php4
    ii  php4-imap                      4.4.4-8+etch4                            IMAP module for php4
    ii  php4-mysql                     4.4.4-8+etch4                            MySQL module for php4
    ii  php5                           5.2.0-8+etch10                           server-side, HTML-embedded scripting language (
    ii  php5-cgi                       5.2.0-8+etch10                           server-side, HTML-embedded scripting language (
    ii  php5-cli                       5.2.0-8+etch10                           command-line interpreter for the php5 scripting
    ii  php5-common                    5.2.0-8+etch10                           Common files for packages built from the php5 s
    ii  php5-gd                        5.2.0-8+etch10                           GD module for php5
    ii  php5-imap                      5.2.0-8+etch10                           IMAP module for php5
    ii  php5-ldap                      5.2.0-8+etch10                           LDAP module for php5
    ii  php5-mhash                     5.2.0-8+etch10                           MHASH module for php5
    ii  php5-mysql                     5.2.0-8+etch10                           MySQL module for php5
    ii  php5-odbc                      5.2.0-8+etch10                           ODBC module for php5
    ii  php5-recode                    5.2.0-8+etch10                           recode module for php5
    ii  php5-snmp                      5.2.0-8+etch10                           SNMP module for php5
    ii  php5-sybase                    5.2.0-8+etch10                           Sybase / MS SQL Server module for php5
    ii  phpmyadmin                     2.9.1.1-6                                Administrate MySQL over the WWW
    
    tx for the help so far
     
  14. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    what's happen if you try to remove php4 packages

    dpkg --purge libapache2-mod-php4 php4-cli php4-common php4-curl php4-domxml php4-gd php4-imap php4-mysql

    if this works try:
    apt-get install libapache2-mod-php5
     
  15. Unrated

    Unrated Guest

    0
     
    deleting was succesful but i still cant instal:

    Code:
    unrated:/etc/apt# apt-get install libapache2-mod-php5
    Reading package lists... Done
    Building dependency tree... Done
    You might want to run `apt-get -f install' to correct these:
    The following packages have unmet dependencies:
      psa: Depends: psa-php4-configurator (>= 1.3.0) but it is not going to be installed or
                    psa-php5-configurator (>= 1.3.0) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    should i try 'apt-get -f install' ?
     
  16. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    try to install both in one command

    apt-get install libapache2-mod-php5 psa-php5-configurator
     
  17. Unrated

    Unrated Guest

    0
     
    nice! i did

    apt-get install php5-curl libapache2-mod-php5 psa-php5-configurator

    and it works now!

    Only problem now is when i got to a php page is that i get a download box "application/x-httpd-php". Started after i added "AddHandler x-httpd-php5 .php" in a htaccess... But this probably isnt the place to discus this.

    Tx for all your help danlinker
     
  18. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    check that the modul is loaded -> a2enmod php5
    try to restart apache (/etc/init.d/apache2 restart) and check that php is activated for this domain in plesk ...
     
  19. Unrated

    Unrated Guest

    0
     
    Apache has been restarted a few times, in console and via plesk...

    PHP is enabled on the domain.

    i dont know how to check if a PHPmodule is running but if its via "dpkg -l | grep php", its not in that list...
     
  20. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    you can "check" with:
    a2enmod php5

    maybe send the output of "dpkg -l | grep php" again to check ...
     
Loading...