i have a problem with a webhosting server. this server has very restrictiv
rules. so i can't modify or override any php.ini rules and i have limited
htaccess syntax (only accept, deny, Auth*, etc), ...

so all described path including ways won't work, like init_set,
set_include_path or php_value. i'd tried all.

result was every time like that:
Warning: main() [function.main]: open_basedir restriction in effect.
File(/PHPTAL/FileSource.php) is not within the allowed path(s):
(/pathto/phptal-login/httpdocs:/tmp) in
/pathto/phptal-login/httpdocs/extlib/phptal/PHPTAL.php on line 57

Warning: main(PHPTAL/FileSource.php) [function.main]: failed to open stream:
Die Operation ist nicht erlaubt in
/pathto/phptal-login/httpdocs/extlib/phptal/PHPTAL.php on line 57

Fatal error: main() [function.require]: Failed opening required
'PHPTAL/FileSource.php' (include_path='.:.:.:') in
/pathto/phptal-login/httpdocs/extlib/phptal/PHPTAL.php on line 57

so i decided to try the following patch for main PHPTAL.php. i hope this
will not destroy the other include ways and it's your code-style.
< if (!defined('PHPTAL_PHP_LIB_DIR')){
<     define('PHPTAL_PHP_LIB_DIR', '');
< }
< //}}}
> require_once 'PHPTAL/FileSource.php';
> require_once 'PHPTAL/RepeatController.php';
> require_once 'PHPTAL/Context.php';
> require_once 'PHPTAL/Exception.php';
> require_once 'PHPTAL/TalesRegistry.php';
< require_once(PHPTAL_PHP_LIB_DIR.'PHPTAL/FileSource.php');
< require_once(PHPTAL_PHP_LIB_DIR.'PHPTAL/RepeatController.php');
< require_once(PHPTAL_PHP_LIB_DIR.'PHPTAL/Context.php');
< require_once(PHPTAL_PHP_LIB_DIR.'PHPTAL/Exception.php');
< require_once(PHPTAL_PHP_LIB_DIR.'PHPTAL/TalesRegistry.php');

i work with a
define(PHPTAL_PHP_LIB_DIR, $_DocRoot.'extlib/phptal/');

that works fine (including patch-style to all other phptal-files).
a syntax/semantic question beside, why you don't use require_once in a not
methode-call syntax?

greetings, thomas mueller

ps: sorry for my not so good english

PHPTAL mailing list

Reply via email to