Bug #3568
PHP version check comes too late on non-namespaced PHP versions
Status: | Resolved | Start date: | 2009-06-04 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | - | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 2 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
Using FLOW3 on PHP < 5.3 ends with a fatal error about an illegal input character (backspace). There is a version check in FLOW3.php, but it comes too late: The parsing is done before any execution, so the backslash in Public/index.php causes a fatal error (as would any backslashes in FLOW3.php).
Associated revisions
- [FIX] FLOW3 (Core): FLOW3's index.php now checks if the PHP version supports namespaces before including the FLOW3 bootstrap. For PHP versions below 5.3.0RC2 an error message will be displayed. Resolves #3568
- [TASK] FLOW3 (Package): String change in the UnknownPackage exception thrown in the Package Manager.
- [FIX] FLOW3 (Core): Adjusted the file permissions set by the setfilepermissions.sh script. Now conflicts between command line and web user should be solved. If you experience file permission errors, please run this script. Resolves #3569
- [TASK] FLOW3: The ./flow3 script now assumes Development to be the default context. Please use -p or --production for switching into production context.
- [FIX] FLOW3 (Core): FLOW3's index.php now checks if the PHP version supports namespaces before including the FLOW3 bootstrap. For PHP versions below 5.3.0RC2 an error message will be displayed. Resolves #3568
- [TASK] FLOW3 (Package): String change in the UnknownPackage exception thrown in the Package Manager.
- [FIX] FLOW3 (Core): Adjusted the file permissions set by the setfilepermissions.sh script. Now conflicts between command line and web user should be solved. If you experience file permission errors, please run this script. Resolves #3569
- [TASK] FLOW3: The ./flow3 script now assumes Development to be the default context. Please use -p or --production for switching into production context.
[FIX] FLOW3: PHP versions below 5.3 now die with a meaningful error message, fixes #3568
[FIX] FLOW3: PHP versions below 5.3 now die with a meaningful error message, fixes #3568
History
#1 Updated by Tim Eilers about 6 years ago
What about adding this after "BOOTSTRAPDEV"?
PHPCHECK=$($PHP -v | head -n 1) if [ ${PHPCHECK:4:1} -lt 5 -o ${PHPCHECK:4:1} -eq 5 -a ${PHPCHECK:6:1} -lt 3 ]; then echo 'FLOW3 requires at least PHP 5.3' exit 1 fi
#2 Updated by Robert Lemke about 6 years ago
- Target version set to 1.0 alpha 2
#3 Updated by Robert Lemke about 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset r2655.
#4 Updated by Karsten Dambekalns about 6 years ago
- Status changed from Resolved to Accepted
- Assigned To set to Robert Lemke
- % Done changed from 100 to 0
The parsing is done before the execution... See:
kmac:Public karsten$ /usr/bin/php -v
PHP 5.2.8 (cli) (built: Feb 6 2009 12:33:08)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
kmac:Public karsten$ /usr/bin/php ~/Sites/flow3/Public/index.php
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /Users/karsten/Sites/flow3/Public/index.php on line 40
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /Users/karsten/Sites/flow3/Public/index.php on line 40
Parse error: syntax error, unexpected T_STRING in /Users/karsten/Sites/flow3/Public/index.php on line 40
kmac:Public karsten$
#5 Updated by Karsten Dambekalns about 6 years ago
- Assigned To changed from Robert Lemke to Karsten Dambekalns
#6 Updated by Karsten Dambekalns about 6 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r2668.