Matthias Englert example index.php for midgard libraries YOU MUST have set up .htaccess something like this. RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) /application/index.php */ /* SET UP INC PATH SO THAT include("$MIDGARD_LITE_DIR/XXXX"); WILL WORK NOT NEEDED IF YOU PUT THE MIDGARD DIRECTORY INTO YOUR PEAR DIR. */ define ('MIDGARD_LITE_DIR' , '/usr/local/Midgard'); define ('MIDGARD_LITE_PATH' , '/usr/local/Midgard'); //define ('MIDGARD_LITE_DIR' , 'Midgard'); //define ('MIDGARD_LITE_PATH' , 'Midgard'); function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } function show_exec_time() { global $time_start; $time = getmicrotime() - $time_start; // echo "$time seconds"; } $time_start = getmicrotime(); register_shutdown_function('show_exec_time'); require_once(MIDGARD_LITE_DIR."/midgard.php"); /* do any site specific stuff */ require_once(MIDGARD_LITE_DIR."/midgard_run.php"); //$time = getmicrotime() - $time_start; //echo "$time seconds"; ?>