Project

General

Profile

Actions

Bug #18926

closed

class.tx_impexp.php sets 256m memory_limit without checking php.ini

Added by Sebastiaan Wiersema over 16 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
-
Start date:
2008-06-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

There is no check in class.tx_impexp.php to see if it is necessary to alter the memory_limit setting. Even when the value is altered in php.ini to a higher value (say, 512MB) this is set back to 256MB.

I bumped into this when exporting a huge site. I tried to alter the php.ini memory_limit setting up to 512MB, which didn't have any effect. I still got a memory exceeded fatal error...

The following patch should do the trick:

--- typo3/sysext/impexp/class.tx_impexp.php 2007-12-14 15:08:55.000000000 0100
++ typo3/sysext/impexp/class.tx_impexp.php 2008-06-09 11:51:29.000000000 +0200
@ -180,7 +180,10 @
require_once (PATH_t3lib.'class.t3lib_refindex.php');

@ini_set('max_execution_time',600);
-@ini_set('memory_limit','256m');
$memory_limit = ini_get('memory_limit');
+if (strtolower(substr($memory_limit, -1)) == 'm' && substr($memory_limit, 0, -1) < 256) {
@ini_set('memory_limit','256m');
+}

(issue imported from #M8649)


Files

8649.diff (439 Bytes) 8649.diff Administrator Admin, 2009-02-27 16:23

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #17045: T3D Export crashes with memory exhaustedClosedGeorg Ringer2007-02-27

Actions
Related to TYPO3 Core - Feature #27272: Configurable T3D export memory limitClosed2011-06-07

Actions
Is duplicate of TYPO3 Core - Bug #17020: class.tx_impexp.php wants 256m memory_limitClosedGeorg Ringer2007-02-20

Actions
Actions

Also available in: Atom PDF