Because webcp-httpd is itself a PHP script, certain functions have undesirable side effects. By default webcp-httpd will refuse to execute files with these unsafe calls, but it might be tricky to find out why things don't work. Here's a list of things you shouldn't do (feel free to add to the list)
  • die('xxx'): kills webcp-httpd instead of the script, use echo 'xxx'; return; instead
  • header(): sends header to stdout instead of the browser, use send_header()
  • setcookie: same as above, use send_cookie()
  • defining new functions: when loading the page again, it will crash with a "function already defined" error. Put your function in functions.inc.phps or in another file that you include with the following construct: $tmp = 'file.inc.phps'; include_once($tmp);
  • defining new classes: same as above.