Bug #31642

call a cli script with absolute path doesn't work

Added by Dietrich Heise about 9 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Should have
Category:
Cli
Start date:
2011-11-07
Due date:
% Done:

100%

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

Description

[foobar ~]$ /var/www/htdocs/flow3
string(59) "/var/www/htdocs/Packages/Framework/TYPO3.FLOW3/Classes/Core"
string(0) ""
FLOW3: Invalid root path. (Error #1248964375)
"/" does not lead to
"/var/www/htdocs/Packages/Framework/TYPO3.FLOW3/"

If the script is called from the directory /var/www/htdocs

[foobar /var/www/htdocs]$ ./flow3
FLOW3 1.0.0 ("Development" context)
usage: ./flow3 <command identifier>

See './flow3 help' for a list of all available commands.


Files

flow3-abspath.diff (616 Bytes) flow3-abspath.diff Helmut Hummel, 2011-11-07 13:27

Related issues

Related to TYPO3.Flow - Bug #44000: Flow CLI on Windows does not work anymoreResolvedBastian Waidelich2012-12-14

Actions
#1

Updated by Helmut Hummel about 9 years ago

Can anybody with the permissions, mov this to the FLOW3 project?

#2

Updated by Dietrich Heise about 9 years ago

  • Project changed from Base Distribution to TYPO3 Flow Base Distribution
#3

Updated by Helmut Hummel about 9 years ago

This works:

FLOW3_ROOTPATH='/var/www/FLOW3-1.0.0/'
export FLOW3_ROOTPATH
/var/www/FLOW3-1.0.0/flow3 help

Is this documented somewhere?

#4

Updated by Bastian Waidelich about 9 years ago

  • Project changed from TYPO3 Flow Base Distribution to TYPO3.Flow
#5

Updated by Helmut Hummel about 9 years ago

One problem is, that in TYPO3.FLOW3/Scripts/flow3.php

$_SERVER['FLOW3_ROOTPATH'] = trim(getenv('FLOW3_ROOTPATH'), '"\' ') ?: '';

$_SERVER['FLOW3_ROOTPATH'] is set to an empty string whereas in
TYPO3.FLOW3/Classes/Core/Bootstrap.php

$rootPath = isset($_SERVER['FLOW3_ROOTPATH']) ? $_SERVER['FLOW3_ROOTPATH'] : FALSE;

The other problem of course is that setting the environment variable is necessary.

Attached a possible solution.

#6

Updated by Karsten Dambekalns over 8 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Has patch set to No
#7

Updated by Karsten Dambekalns over 8 years ago

  • Category set to Cli
#8

Updated by Bastian Waidelich about 8 years ago

  • Assignee changed from Karsten Dambekalns to Bastian Waidelich
  • Target version set to 2.0 beta 1

FYI I stumbled upon this issue the other day and Helmuts patch solves it for me.
Karsten Hachmeister I'll take over, hope you don't mind – Robert said you wouldn't ;)

#9

Updated by Gerrit Code Review about 8 years ago

  • Status changed from Accepted to Under Review

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

#10

Updated by Karsten Dambekalns about 8 years ago

Bastian Waidelich wrote:

Karsten Hachmeister I'll take over, hope you don't mind

Not at all!

#11

Updated by Gerrit Code Review about 8 years ago

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

#12

Updated by Gerrit Code Review about 8 years ago

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

#13

Updated by Karsten Dambekalns about 8 years ago

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

Updated by Gerrit Code Review about 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at https://review.typo3.org/17120

#15

Updated by Karsten Dambekalns about 8 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF