upgrade-db.php: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/share/gforge/bin/upgrade-db.php - from package: gforge-common

You may install the required package with command apt-get install {package}
Error in other languages:
upgrade-db.php: bevel nie gevind nie
upgrade-db.php: comandă negăsită
upgrade-db.php: comando não encontrado
upgrade-db.php: commande introuvable
upgrade-db.php: command not found
upgrade-db.php: käsku ei ole
upgrade-db.php: không tìm thấy lệnh
upgrade-db.php: komanda nerasta
upgrade-db.php: Kommando nicht gefunden.
upgrade-db.php: kommandot finns inte
upgrade-db.php: komut yok
upgrade-db.php: nie znaleziono polecenia
upgrade-db.php: níor aimsíodh an t-ordú
upgrade-db.php: no se encontró la orden
upgrade-db.php: no s'ha trobat l'ordre
upgrade-db.php: opdracht niet gevonden
upgrade-db.php: parancs nem található
upgrade-db.php: perintah tidak ditemukan
upgrade-db.php: príkaz nenájdený
upgrade-db.php: příkaz nenalezen
upgrade-db.php: команда не найдена
upgrade-db.php: командата не е открита
upgrade-db.php: 命令找不到
upgrade-db.php: コマンドが見つかりません