Part of my MOODLE application sends a CURL request to an external server to get some user information.
This request gets a successful response when run with require_once(dirname(__FILE__) . '/lib/setup.php') commented out.
However when run with this line open the POST data is being encoded to html entities by something in setup.php i.e. "variable=a&aa" would become "variable=a&aa" - which is causing the post to fail.
Does anyone have any ideas what might be causing this?