the path to php can be found by using the function phpinfo().
But sorry phpinfo() is disabled at x10 for some security issues.
Edit:
path to perl is /usr/bin/perl
i think path to php is /usr/bin/php (mine is not the final word,some staff will confirm it for you.)
sorry if i am wrong....