The exact situation is this: I had installed version 5.29, working fine except that GD wasn't completelly installed (I need JPG Support)I read that it's necessary to rebuild PHP to add that feature.
I did cd /usr/ports/lang/php5 && make install , and now I have version 5.1.6 (older then the original) with less components than before (no MySql, no GD, etc).
Version 5.1.6 was on /usr/ports/lang/php5 but it appears that the server had built with version 5.29
What can I do to install the 5.29 version with all the components?