Bug #19920


php exec() warning, on a host with exec blocked, when trying to edit localized content

Added by Kim Pihlstrm over 15 years ago. Updated over 6 years ago.

Should have
Content Rendering
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


My typo3 site is hosted on a server that has the exec() php command disabled in its configuration. This causes the typo3 backend to show a warning message when I try to edit content that has been localized and the default translation has been edited.

What the system does is that it tries to run diff through exec(), which it is not allowed to do. The exec call happens in class.t3lib_diff.php on line 173. The error message I get is:

Warning: exec() has been disabled for security reasons in /var/www/typo3_src-4.2.4/t3lib/class.t3lib_diff.php on line 173

I have tried to change [BE][disable_exec_function] in localconf.php but it does not help.

The system I am running is version 4.2.4

Possible solution would be to replace the exec() call in class.t3lib_diff.php with a purely php-coded function that does the exact same thing as the exec-call in this file.

Such a function can be found here: (released under the GPL). It should produce the exact same output as the *nix version of diff.

I am no expert at php (to be honest, this was my first time ever I wrote anything in php) but changing line 173 to be


and copying the php-diff function, from the link above, to the end of the class.t3lib_diff.php file seems to have solved my problems. At least now I do not get any warning messages and the translated content element show up as it should and I am able to edit it.
(issue imported from #M10274)


class.t3lib_diff.php.patch (477 Bytes) class.t3lib_diff.php.patch Administrator Admin, 2009-02-03 10:13
Actions #1

Updated by Rob Vonk about 15 years ago

Nice idea.

I'm wondering what happens on Windows systems in the current situation. There's no diff by default on Windows.

Actions #2

Updated by Santiago over 13 years ago


I am using Typo3 4.4.4 and this issue is still happening as described above, it triggers when I try to edit localized content:

Core: Error handler (BE): PHP Warning: exec() has been disabled for security reasons in /**removed**/t3lib/class.t3lib_diff.php line 172

I have set in localconf.php this option too:
$TYPO3_CONF_VARS['BE']['disable_exec_function'] = '1';

Actions #3

Updated by Thomas Hucke about 12 years ago

  • Target version deleted (0)

TYPO3 4.5.13 still has this issue included.
As a workaround it could be avoided if 'transOrigDiffSourceField' won´t be used in TCA config.

Hopefully bug will be fixed once....

Actions #4

Updated by Mathias Schreiber over 9 years ago

  • Description updated (diff)
  • Target version set to 7.1 (Cleanup)
  • TYPO3 Version set to 4.4
  • Is Regression set to No
Actions #5

Updated by Benni Mack almost 9 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Actions #6

Updated by Susanne Moog almost 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #7

Updated by Georg Ringer over 8 years ago

  • Status changed from New to Resolved

resolved in 7.5

Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF