had same error
my failure was: at the same machine 2 versions of php were running, 4.x and then 5.x ..
just check it if u do 'php -v' in your shell..
i used manualy the path to the 5.x php and it worked ^^
can be "fixed" to "overwrite" the old php with editing the .bashrc in your homedir..
*open the file with 'pico .bashrc' (or other favorite editor)
*find a nice place for the line, can be on end (scroll down with "page down")
*add new line --> alias php='/usr/local/php/bin/php'
(adjust the path to your path!)
*reload the bashrc.. with 'source .bashrc'
check now with 'php -v' ^^
and it should work then with 'php update.php' otherwise : '/usr/local/php/bin/php update.php' ^^