&1 -M'$dep' -e1"); $buf = ob_get_contents(); ob_end_clean(); if ($buf != "") { $errors .= " - failed to find perl module: $dep.\n"; $errors .= $buf; } } // test pygmentize ob_start(); passthru("pygmentize -V 2>&1", $buf); ob_end_clean(); if ($buf != "0") { $errors .= " - Error when testing pygmentize: Return code was \"$buf\".\n"; } // test ansi2html ob_start(); passthru("ansi2html -h 2>&1", $buf); ob_end_clean(); if ($buf != "0") { $errors .= " - Error when testing ansi2html: Return code was \"$buf\".\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" ); }