Fixed stdin, apache and Elgg script warnings/errors.