Re: [SMARTY] install issue
| From: | Bill Angus | Date: | Sat, 17 May 2003 19:41:30 +0000 |
| Subject: | Re: [SMARTY] install issue | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9570@lists.php.net to get a copy of this message | ||
Kool: I get it now -- no : allowed in fully specified filenames
I got a similar problem with your workaround. Results below
Debug session started.
Debug Warning: C:\PHP\Smarty\libs\Smarty.class.php line 1998 -
fopen("E:\Tester\templates\index.tpl", "r") - No such file or directory
Debug Warning: C:\PHP\Smarty\libs\Smarty.class.php line 1650 - stat failed for
E:\Tester\templates\index.tpl (errno=2 - No such file or directory)
Notice: C:\PHP\Smarty\libs\Smarty_Compiler.class.php line 320 - Uninitialized string offset: -1
Debug Warning: C:\PHP\Smarty\libs\Smarty.class.php line 1575 - utime failed: Invalid argument
Debug session ended.
Actually there is such a file and directory. This is problematic for windows use -- but not for
Linux I presume. I will try to use relative addressing from a document root directory without
actually using the drive-letter part of file_path_spec
Thanks for your suggestions Messju and have a great day!
Bill Angus
http://www.psychtest.com
----- Original Message -----
From: messju mohr
To: Bill Angus
Cc: smarty-general@lists.php.net
Sent: Saturday, May 17, 2003 11:44 AM
Subject: Re: [SMARTY] install issue
On Sat, May 17, 2003 at 10:22:22AM -0700, Bill Angus wrote:
> All installation steps completed. Smarty seems able to create "new Smarty", but
> compile fails with call to blank function when trying to access template.
>
> following instructions at
> http://smarty.php.net/manual/en/installing.smarty.basic.php
>
> compile error msg. follows
> -----------------
> Debug session started.
> Debug Error: C:\PHP\Smarty\libs\Smarty.class.php line 1658 - Call to undefined function: ()
> Debug session ended.
>
> -----------------------------
> //index.php source
> <?PHP
> define('SMARTY_DIR','C:\\PHP\\Smarty\\libs\\');
> define('Project_DIR','E:\\Tester\\');
> require(SMARTY_DIR.'Smarty.class.php');
> $smarty = new Smarty;
> $smarty->template_dir =Project_DIR.'templates\\';
> $smarty->compile_dir = Project_DIR.'templates_c\\';
> $smarty->config_dir = Project_DIR.'configs\\';
> $smarty->cache_dir = Project_DIR.'cache\\';
> echo "Template_dir=".$smarty->template_dir."<br>";
> echo "Compile_dir=".$smarty->compile_dir."<br>";
> echo "Config_dir=".$smarty->config_dir."<br>";
> echo "Cache_dir=".$smarty->cache_dir."<br>";
>
> // crashes next line
> $smarty->assign('name','BillAngus');
> $smarty->display($smarty->template_dir.'index.tpl');
hmm, it seems smarty (mis-)interprets "E:" as a resource type.
try:
$smarty->display('file:'.$smarty->template_dir.'index.tpl');
> ?>
>
>
> ----------------------------
> // template source file_name=index.tp1
>
> {* Smarty *}
>
> Hello, {$name}!
> -------------------------
> //output is as below
> Template_dir=E:\Tester\templates\
> Compile_dir=E:\Tester\templates_c\
> Config_dir=E:\Tester\configs\
> Cache_dir=E:\Tester\cache\
> -------------------
> //notes
>
> no output of "Hello ...name..." in output due to compilation failure
>
> fails with or without smarty established and configured in same physical/logical disk-drive
> as resource.
>
> //Versions
> PHP 4.3.0 Win-32 as SAPI
> Smarty 2.50
> Zend IDE 2.6
> Apache 2.0.44
> --------------------
> Thanks for any help, and have a great day!
>
> Bill Angus
> http://www.psychtest.com
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php