http://seclists.org/snort/2004/q3/412
If you read paragraph 1, you will see "FreeBSD ports". Since you are running Ubuntu I don't believe this applies to you as the php you installed was most likely not a freebsd port.
As far as what the guy actually did, removed the package he installed and then he compiled from source after editing the make file.
I looked at the original page you followed and it appears if you followed the destructions you should have php5.
Unfortunately I think you are back to square 1 with troubleshooting. There are a lot of steps involved with that setup with lots of opportunities for mistakes. Best suggestion I have is do it again, pay extrordinary attention to version numbers of everything and any quotes in config files. If any versions are different, your probably going to have to go to the release notes to see what might require a different syntax or something else altogether.
Lastly, ask your question on that page, they wrote it and most likley have the t-shirt and know how to fix it. Posting here is always a good idea but do both.
Thanks for the linux digest site, gonna go poke around in there.
Kevin