It's not so much your version of Apache/PHP have been reverted - it's just the wrong version is loaded.
If you have Mac OS X's Web Sharing enabled it will auto enable the version of Apache and PHP Apple provides using the LaunchDaemon
/System/Library/LaunchDaemons (this will override MacPorts version). You'll want to disable this by either turning off Web Sharing in the Sharing Preference Pane or by running
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist.
When you installed Apache for MacPorts it installed a LaunchDaemon into
/Library/LaunchDaemons which if enabled will start up the MacPorts version of Apache automatically. To enable it run
sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist and you're off to the races.
If you're running
apachectl to restart - make sure you've selected the right version. You may need to alter your $PATH to have
As for what version of PHP is being used; on the command line this will depend on your $PATH while for Apache it's entirely in your configuration of where the libphp5 module is. (
/etc/apache2/ for the built in version,
/opt/local/apache2/conf for the version MacPorts installed)