I would like to update my php 5 in my server. At this moment, I use php 5.2.0 so I want to update it to php 5.2.4 (not php 5.3). I tried to do this:

aptitude update
aptitude upgrade

63 packets were updated but not php which is always in 5.0

How can I update my php please ?

Edit: here is the output of commands asked by David:

aptitude search php5
p   libapache-mod-php5              - server-side, HTML-embedded scripting langu
i A libapache2-mod-php5             - server-side, HTML-embedded scripting langu
i   php5                            - server-side, HTML-embedded scripting langu
p   php5-apache2-mod-bt             - PHP bindings for mod_bt
p   php5-auth-pam                   - A PHP5 extension for PAM authentication
i   php5-cgi                        - server-side, HTML-embedded scripting langu
p   php5-clamavlib                  - PHP ClamAV Lib - ClamAV Interface for PHP5
p   php5-cli                        - command-line interpreter for the php5 scri
i A php5-common                     - Common files for packages built from the p
i   php5-curl                       - CURL module for php5
p   php5-dev                        - Files for PHP5 module development
i A php5-gd                         - GD module for php5
p   php5-idn                        - PHP api for the IDNA library
p   php5-imagick                    - ImageMagick module for php5
p   php5-imap                       - IMAP module for php5
p   php5-interbase                  - interbase/firebird module for php5
p   php5-json                       - JSON serialiser for PHP5
p   php5-ldap                       - LDAP module for php5
p   php5-mapscript                  - module for php5-cgi to use mapserver
p   php5-maxdb                      - PHP extension to access MaxDB databases fo
i A php5-mcrypt                     - MCrypt module for php5
p   php5-memcache                   - memcache extension module for PHP5
p   php5-mhash                      - MHASH module for php5
p   php5-ming                       - Ming module for php5
i A php5-mysql                      - MySQL module for php5
p   php5-odbc                       - ODBC module for php5
p   php5-pgsql                      - PostgreSQL module for php5
p   php5-ps                         - ps module for PHP 5
p   php5-pspell                     - pspell module for php5
p   php5-radius                     - PECL radius module for PHP 5
p   php5-recode                     - recode module for php5
p   php5-snmp                       - SNMP module for php5
p   php5-sqlite                     - SQLite module for php5
p   php5-sqlite3                    - SQLite3 module for php5
p   php5-sqlrelay                   - SQL Relay PHP API
p   php5-suhosin                    - advanced protection module for php5
p   php5-sybase                     - Sybase / MS SQL Server module for php5
p   php5-tidy                       - tidy module for php5
p   php5-uuid                       - OSSP uuid module for php5
p   php5-xapian                     - Xapian search engine interface for PHP5
p   php5-xcache                     - Fast, stable PHP opcode cacher
p   php5-xmlrpc                     - XML-RPC module for php5
p   php5-xsl                        - XSL module for php5



aptitude show php5 | grep Version
VersionĀ : 5.2.0-8+etch13


aptitude show php5-cgi | grep Version
VersionĀ : 5.2.0-8+etch13



php5 --version
-bash: php5: command not found


php-cgi --version
PHP 5.2.0-8+etch13 (cgi-fcgi) (built: Oct  2 2008 08:21:17)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
link|improve this question

60% accept rate
1  
Which distro/version are you using? (the output of cat /etc/debian_version will help if you don't know). Also, how did you install PHP5 in the first place? If you installed it from source rather than from apt-get/aptitude than you can not upgrade it via apt. aptitude search php5 should tell you if it was installed via apt: the left hand character in the output will be "i" instead of "p" if the package was installed via apt. – David Spillett Mar 8 '10 at 11:44
@David, this is a great comment. I think you should move it to an answer and pick up some votes. – Randolph West Mar 8 '10 at 12:54
@Randolph - I nearly put it in as an answer, but erred on the side of a comment as I figured I was suggesting more info be checked/supplied rather than providing a direct answer. – David Spillett Mar 8 '10 at 15:07
@David, my distro is a debian etch. I install php5 with aptitude one year ago. – Kiva Mar 9 '10 at 8:36
Could you edit your question to add the output of aptitude search php5?. Also the output of aptitude show php5 | grep Version, aptitude show php5-cgi | grep Version, php5 --version and php-cgi --version (one of those last two may give an error depending whether you are usnig PHP via mod_php or the cgi method). – David Spillett Mar 9 '10 at 12:21
show 1 more comment
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.