Welcome to MacPorts, but nothing about your report suggests a problem in MacPorts. The only thing you said about MacPorts was that its PHP "doesn't seem to work" which doesn't give us anything to go on. I am the maintainer of PHP in MacPorts and it works fine for me.
The error message you showed mentions /private/etc/apache2/httpd.conf, which is the configuration of Apple's Apache server (not MacPorts'), and /usr/local/php5/libphp5.so, which could have come from anywhere (except MacPorts). The MacPorts prefix (unless you've changed it) is /opt/local, so if your problems concern software in a different location, it's not MacPorts software and we can't help you with it.
If you would like to try MacPorts PHP 5.5, install the php55 port by running "sudo port install php55
". Since I presume you'll want to run that inside a web server, perhaps Apache, you'll probably also want the PHP 5.5 Apache 2 module, which you can install by running "sudo port install php55-apache2handler
". You'll then need to configure MacPorts Apache to load that module and customize the server to your liking. We do have a wiki page about setting this up, but I hesitate to mention it because it is years out of date and does not address the current PHP 5.5 ports, so you'll have to make the appropriate adjustments to the instructions as you read them.
Note that /usr/local is a special location. Software installed there can interfere with software installed anywhere else, including MacPorts' /opt/local prefix. Therefore we do not support the use of MacPorts while software is installed in /usr/local, so if you wish to try MacPorts, remove or move aside /usr/local before doing so.
If you have any questions about how to use MacPorts, please write to the macports-users mailing list. If you encounter build failures, then please do file tickets in this issue tracker.