&1 -M'$dep' -e1"); $buf = ob_get_contents(); ob_end_clean(); if ($buf != "") { $errors .= " - failed to find perl module: $dep.\n"; $errors .= $buf; } } // test memcache if (!class_exists("Memcache")) { $errors .= " - Missing \"Memcache\" php class. Please install your distribution's package of http://pecl.php.net/package/memcache\n"; } // test qrencode ob_start(); passthru("qrencode -V 2>&1", $buf); ob_end_clean(); if ($buf != "0") { $errors .= " - Error when testing qrencode: Return code was \"$buf\".\n"; } if ($errors != "") { echo nl2br("Errors occured:\n"); echo nl2br($errors); } else { // TODO: Make this an actual installer file_put_contents(FCPATH."is_installed", "true"); echo nl2br("Tests completed.\n" ."The following steps remain:\n" ." - copy the files from ./application/config/example/ to ./application/config/ and edit them to suit your setup\n" ." - the database will be set up automatically\n" ); }