You need to have a line something like:
// The string $server['HTTP_HOST'] will be replaced by the server name
$ESPCONFIG['base_url'] = 'http://' . $server['HTTP_HOST'] . '/moodle-1.4/mod/questionnaire/phpESP/';
In this case (my test server), the directory 'moodle-1.4' is the root for the site.
But, having said that, it would be so much easier if I just changed the phpESP config file to use the values already in your Moodle file. So I have!
Replace your '/mod/questionnaire/phpESP/admin/phpESP.ini.php' with the attached one, and your system should be setup correctly. I will also update CVS.
Also, when you access the admin page, use: 'http://[yoursite]/[yourroot]/mod/questionnaire/phpESP/'. Replace [yousite] with your Moodle url, and [yourroot] with any directory specific to your Moodle installation (you may not have one). If you are using the latest module, that link appears on the mod page when you add or update a questionnaire module to your course (Survey Management phpESP).
mike