You shouldn’t alter the installation files. I have no idea what state they’re in or what they’re actually doing now, making it impossible to assist.
The only problem you had was that PHP5.3 was installed and that a newer version needed to get installed. The installer has ways of managing that, no need to alter the scripts themselves.
So, remove your FOG svn folder and pull a fresh version to make sure everything is as it should be.
Then remove the packages= line from /opt/fog/.fogsettings (otherwise it will continue to select PHP5.3 packages as previously defined by 1.2 installer)
Remove every trace of PHP 5.3 from your system.
Run the commands Tom gave.
Then run the installer.