No output from passthru() function
Posted: Fri Jan 08, 2010 7:00 pm
Here is my code:
My problem is the output from passthru($linuxCommand) is empty. Nothing is being output. However, when i run the exact same code in the php cli everything works fine. Why would i be getting an empty string when i run this code through the browser?
Code: Select all
ob_start();
passthru ($linuxCommand);
$rawXml = ob_get_contents();
ob_end_clean();
$xmlParser = xml_parser_create();
xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, "UTF-8");
xml_parse_into_struct($xmlParser, $rawXml, $vals, $index);
xml_parser_free($xmlParser);
return $vals;