On a FreeBSD 6.1 system, I installed the ruby-sqlite3 port and was rather
taken aback by seeing the list of other ports that were brought in as a
result, things which didn't look like they should be related to either
ruby or SQLite3 - in particular, I noticed PHP4 and Apache being built
and installed.

First off, how can I identify why these ports were installed? Doing

pkg_info -r php4-4.4.2_1

shows a dependency on apache, so that explains why apache was installed,
but why php4? If I understand the man page correctly,

pkg_info -R php4-4.4.2_1

should tell me, but this shows nothing.

Secondly, is it safe to simply deinstall php4 and apache or am I likely
to break something?

- Will