Bug #45178

Reconsider passed-by ini file on subprocess command execution

Added by Adrian Föder over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
-
Start date:
2013-02-05
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

currently, the subprocess is executed with the currently loaded ini,

Core\Booting\Scripts #541
$command .= sprintf('%s -c %s %s %s', $phpBinaryPathAndFilename, escapeshellarg(php_ini_loaded_file()), ...

This results into, for example,

FLOW_ROOTPATH='/var/www/vhosts/acme.com/' FLOW_CONTEXT='Development' XDEBUG_CONFIG='idekey=FLOW_SUBREQUEST remote_port=9001' "/usr/bin/php" -c '/etc/php5/apache2/php.ini' '/var/www/vhosts/acme.com/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/../../../../Scripts/flow.php' 'typo3.flow:core:compile'

see, apache2/php.ini is included and used as ini for the subprocess.
In default cases, especially in apache's ini config a memory_limit is set; which therefore also engages CLI with a memory limit; which is surely not intended.

I think we should make this ini file configurable. Any ideas where and with what naming?

#1

Updated by Adrian Föder over 8 years ago

How could the configuration for this look like?
IMO we have three states to cover:

  • don't use any INI file explicitly
  • use a defined path to an INI file
  • use the php_ini_loaded_file() (default)

We could introduce a core setting similar to core.phpBinaryPathAndFilename, where

  core:
     # true: use the one from the current request, usually apache's
    subprocessIniFile: true

     # anything !== true: consider it a path
    subprocessIniFile: '/my/deriving/php.ini'

If not set at all or FALSE, don't use this setting...

I'm a bit unlucky of this of course because of the type flagging.

// edit: most logical, if at all, would be:
FALSE: don't use the setting
string: use that path
not set: behave like before

#2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18024

#3

Updated by Gerrit Code Review over 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18024

#4

Updated by Gerrit Code Review over 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18024

#5

Updated by Gerrit Code Review over 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18024

#6

Updated by Gerrit Code Review over 8 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18024

#7

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19829

#8

Updated by Adrian Föder about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF