Project

General

Profile

Actions

Bug #19920

closed

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

Added by Kim Pihlstrm almost 16 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2009-01-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

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: http://www.holomind.de/phpnet/diff2.src.php (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

$res=PHPDiff($str1,$str2);

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)


Files

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 over 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 about 14 years ago

Hi,

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 over 12 years ago

  • Target version deleted (0)

Hi,
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 almost 10 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 over 9 years ago

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

Updated by Susanne Moog over 9 years ago

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

Updated by Georg Ringer about 9 years ago

  • Status changed from New to Resolved

resolved in 7.5

Actions #8

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF