RE: [SMARTY] installation under win2k
| From: | Nikolai Devereaux | Date: | Tue, 23 Jul 2002 23:23:37 +0000 |
| Subject: | RE: [SMARTY] installation under win2k | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5399@lists.php.net to get a copy of this message | ||
Hi, thanks for the reply.
> You definitely do not need Cygwin to get Smarty working on
> Windows with Apache/PHP. Can you provide more detail about
> the problems you are having? What version of Apache/PHP,
> Smarty version, etc?
Sure thing.
Software versions:
Apache 1.3.26
PHP 4.2.2
Smarty 2.2.0
What I've done:
1) Unzipped Smarty source into C:\php\include\
2) Added "c:\php-4.2.2-Win32\include\Smarty-2.2.0" to include_path
3) Created web user dir for ~smartytest
(c:\WebHome\smartytest\public_html\)
4) Created index.tpl in smartytest\public_html\templates\:
--- index.tpl ---
{* Smarty *}
Hello, {$name}!
------
5) Created index.php in smartytest\public_html:
--- index.php ---
<?php
require('Smarty.class.php');
$smarty = new Smarty;
$UNIX_STYLE = true;
if($UNIX_STYLE)
{
$smarty->template_dir =
'c:/WebHome/smartytest/public_html/templates/';
$smarty->compile_dir =
'c:/WebHome/smartytest/public_html/templates_c/';
$smarty->config_dir =
'c:/WebHome/smartytest/public_html/configs/';
$smarty->cache_dir =
'c:/WebHome/smartytest/public_html/cache/';
}
else
{
$smarty->template_dir =
'c:\\WebHome\\smartytest\\public_html\\templates\\';
$smarty->compile_dir =
'c:\\WebHome\\smartytest\\public_html\\templates_c\\';
$smarty->config_dir =
'c:\\WebHome\\smartytest\\public_html\\configs\\';
$smarty->cache_dir =
'c:\\WebHome\\smartytest\\public_html\\cache\\';
}
$smarty->assign('name','Ned');
$smarty->display('index.tpl');
?>
------
6) Opened http://localhost/~smartytest/ in a browser.
For the $smarty->xxx_dir assignments, I've tried unix-style paths AND
windows style paths. I use a (imho) pretty cool block commenting trick I
thought of to easily toggle between the two styles.
When using either paths style, I get this error:
Warning: Failed opening '\N117\N1172603085\index.tpl.php' for inclusion
(include_path='.;c:\php-4.2.2-Win32\include\Smarty-2.2.0') in
c:\php-4.2.2-Win32\include\Smarty-2.2.0\Smarty.class.php on line 650
Interesting, I don't know where the N117 stuff is coming from...
Those N117 directories and ARE created, and the template gets compiled in
that dir:
--- index.tpl.php ---
<?php /* Smarty version 2.2.0, created on 2002-07-23 13:23:50
compiled from index.tpl */ ?>
Hello, <?php echo $this->_tpl_vars['name']; ?>
!
------
So I'm at a total loss... Any help you've got to offer would be
appreciated!
Nik