hmmm.....
i've verified the path to pstotext which is right
/usr/local/bin/pstotext
the output goes to STDOUT ...? the results of pstotext command goes directly on the console ? that's ok ?
i've got this code now in my robot_functions.php
PHP Code:
if ($usetool) {
rename($tempfile1,$tempfile2);
exec($command,$result,$retval);
echo $command . "<br>"; // try running this from shell in admin dir
print_r($result); // holds the output sent to STDOUT
echo "<br>" . $retval; // is zero if command succeeded
unlink($tempfile2);
if (!$retval) {
// the replacement if š is for unbreaking spaces
// returned by catdoc parsing msword files
// and '0xAD' "tiret quadratin" returned by pstotext
// in iso-8859-1
// Adjust with your encoding and/or your tools
if ((is_array($result)) && (count($result) > 0)) {
$f_handler = fopen($tempfile1,'wb');
fwrite($f_handler,str_replace('š',' ',str_replace(chr(0xad),'-',implode(' ',$result))));
fclose($f_handler);
}
}
else {
return array('tempfile'=>0,'tempfilesize'=>0);
}
}
Is this ok, with the code u gave ?
i've try to delete and re-index the avare html & pdf..
i can't see the "echo $command . "<br>"; result...
but still no "harpagon" in text_contents neither in the results of a search..
argh...