<?php
function find_dsaphp($print_found=TRUE, $path=__FILE__) {
	$dsa_path = null;
	$curpath = $path;
	do {
		$oldpath = $curpath;
		$curpath = dirname($curpath);
		# XXX: is there no equiv to os.path.join?
		$test = $curpath."/dsa.php";
		if (is_file($test)) {
			$dsa_path = $test;
			if ($print_found) {
				echo "found dsa.php at ".$dsa_path."\n";
			}
			break;
		}
	} while ($oldpath != $curpath);
	return $dsa_path;
}
?>
