shell_exec('/usr/local/bin/csearch $searchText'); This isn't what you expect it to be:
<?php $searchText = 'foobar'; $cmd = '/usr/local/bin/csearch $searchText'; echo $cmd; ?>
Change the string to use double quotes and $searchText will actually be what you want to it be:
$output = shell_exec("/usr/local/bin/csearch $searchText");
As @uri2x hints in a comment:
$searchText=$_POST['$searchText']; should be changed to
$searchText=$_POST['searchText']; for a similar reason.