Missing trailing slash in FLOW3_ROOTPATH causes fatal error
Trailing slash "/" at environment variable FLOW3_ROOTPATH is absolutely required in file .htaccess - a missing trailing slash causes a fatal error and FLOW3 isn't executed.
SetEnv FLOW3_ROOTPATH /var/www/myapp/
Causes a fatal error:
SetEnv FLOW3_ROOTPATH /var/www/myapp
The path to FLOW3.php is generated in file "Web/index.php" at run time and a more tolerant behaviour would be desirable.
Fatal error in logfile (caused by missing slash between FLOW3_ROOTPATH and "Packages/...":
[Thu May 20 07:06:29 2010] [error] [client 10.9.8.101] PHP Fatal error: require(): Failed opening required '/var/www/myappPackages/Framework/FLOW3/Scripts/FLOW3.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/myapp/Web/index.php on line 31
Update "index.php" as follows (or similar)
require(preg_replace('/\/*$/', '', $rootPath) . '/Packages/Framework/FLOW3/Scripts/FLOW3.php');
This regular expression removes trailing slash/slashes (if exist/s) of $rootPath and adds one between $rootPath and "Packages/...". So, path to FLOW3.php is always as expected, regardless of
SetEnv FLOW3_ROOTPATH in .htaccess (with/without trailing slash).