• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Update to PHP5 on debian

U

Unrated

Guest
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
 
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
 
tx for the info but i dont have the sources.list file. I only have sources.list.d and thats a empty directory...
 
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
 
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...
 
unrated:/etc/apt# dpkg -l | grep php4
rc libapache2-mod-php4 4.4.4-8+etch4 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

cant i just install PHP5 straight away? Cuz i am kinda screwed now without any php
 
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
 
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
 
why stable ?

try this:


apt-get update
apt-get upgrade

and then try again to install php5

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...
 
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
 
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
 
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' ?
 
try to install both in one command

apt-get install libapache2-mod-php5 psa-php5-configurator
 
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
 
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 ...
 
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...
 
you can "check" with:
a2enmod php5

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