Upgrading to PHP 5.4 may cause issues in a 1.1 installation as 5.4 is much more strict on the declaration of variables - most of those issues have been resolved in Totara 2.2 though.
Most such issues would only be apparent if debugging was turned on, and would only clog up the Apache error log, so this would have little or no effect on any Totara installation from a users point of view. But for performance reasons for a Totara 1.0 or 1.1 installation we would still recommend the latest version of PHP 5.3.
(note the latest Totara 1.0 and 1.1 are based of the latest version of Moodle 1.9, and Totara 2.2 is currently based off Moodle 2.2.6)
For Apache, Postgres, mySQL or MSSQL the version number should not matter as long as the version is equal or over to the version specified in the Moodle Release Notes - though consult the INSTALL.txt for some configuration settings that may be important if the postgres is updated from an early version to 9.0+.