hi,

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:
[CODE]
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
[/CODE]

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.
[CODE]
57,61c57,61
< //{{{PHPTAL_PHP_LIB_DIR
< 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';
63,67d62
< 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');
[/CODE]

i work with a
[CODE]
define(PHPTAL_PHP_LIB_DIR, $_DocRoot.'extlib/phptal/');
require_once(PHPTAL_PHP_LIB_DIR.'PHPTAL.php');
[/CODE]

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
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to