This bug is hopefully fixed in version 0.25. Solution as indicated below by using passthru(), and in addition doing some preventive testing. In addition $TempDir has gotten a better default value. -EvenHolen

Running in PHP Safe Mode

My ISP runs in PHP safe mode. Among other things, the backtics in "diff.php" are not allowed. Changing the backtics to passthrough appears to clear the error, but this has not yet been verified (I have not yet located the diff executable on my ISP's system)

Also on this server, I was unable to turn register_globals off in my .htaccess file, as I was afterwards unable to take any action other than viewing the default page.

Is there a version of the diff.php, what does not work with temporary files, but with the MySQL database?

--

I solved this problem by making sure that there was a symbolic link to diff in the safe_mode_exec_dir directory and then changing the code in /tavi/lib/diff.php as follows:

from:

$diff = `$DiffCmd $temp1 $temp2`;

to:

exec("$DiffCmd $temp1 $temp2", $diffArray);
foreach($diffArray as $diffElement) $diff.="$diffElement\n";
//should be faster
$diff = implode("\n",$diffArray);

I then had to add values for $TempDir and $DiffCmd to my config.php.

--John-Mason P. Shackelford

Thanks John, that really helped! Just running on the latest 0.23 and it's rock solid :-) --DanieleRussolillo?

Are you aware that linking 'diff' in your safe mode exec dir completely defeats the safety of your system? This is equivalent with turning off safe mode altogether, since 'diff' can be used to open any file on the system. (willem@byte.nl - http://www.byte.nl)


This method did not work for me.


Have you tried NoExecuteOnServer? It worked for me! I wish the authors would address this issue in the documentation... --morpheus