Re: Successful system call output going to error log

RoninTech escribió:
$cmd="xmllint --noout --schema validate.xsd file.xml";

Try providing the full path for validate.xsd and file.xml, just in case. You can remove it later if you learn it's not necessary.

$last_line = system($cmd,$retval);

Also, try using exec() instead, which allows you to capture the whole output. It's not unlikely that the last line is blank.

The weird thing is that I stumbled across this output in apache's
error log. Sure enough, every time I run the full command another
successful output gets tacked on the end of the error log.

It might be that xmllint sends its messages to the standard error. You can redirect it to stdout or /dev/null:

xmllint --noout --schema validate.xsd file.xml 2> /dev/null
xmllint --noout --schema validate.xsd file.xml 2>&1

-- - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:
-- Mi web de humor al baño María: