Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Windows 2000 Server

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
jkmcgrath
Smarty n00b


Joined: 14 May 2003
Posts: 4

PostPosted: Wed May 14, 2003 7:38 pm    Post subject: Windows 2000 Server Reply with quote

Hi all,

I am using 2.5 smarty on a w2k server and all I get is a white screen and no errors.

Even if I intentionaly create an error in the code it will not generate an error.

I read in the documentation where this has been fixed after 1.4 but I am having the problem.

Same code right out of the smarty doc works on linux and apache but not windows?
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed May 14, 2003 7:48 pm    Post subject: Reply with quote

More details please. What does the php error log say?

Ensure that you are using absolute paths.
Back to top
View user's profile Send private message
jkmcgrath
Smarty n00b


Joined: 14 May 2003
Posts: 4

PostPosted: Wed May 14, 2003 8:20 pm    Post subject: Reply with quote

[14-May-2003 15:17:47] PHP Parse error: parse error, unexpected T_REQUIRE in c:\inetpub\wwwroot\test\index.php on line 3


here is my file

Code:

<?php
error_reporting(E_ALL); ini_set('display_errors', TRUE)
require('Smarty.class.php');

$smarty = new Smarty

$smarty->template_dir = 'test/templates/';
$smarty->compile_dir = 'test/templates_c/';
$smarty->config_dir = 'test/configs/';
$smarty->cache_dir = 'test/cache/';
$smarty->caching = false;


$name = 'John'
$smarty->assign('name','$name');

$smarty->display('index.tpl');
?>
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed May 14, 2003 8:28 pm    Post subject: Reply with quote

hmmm.

Quote:
[14-May-2003 15:17:47] PHP Parse error: parse error, unexpected T_REQUIRE in c:\inetpub\wwwroot\test\index.php on line 3


That should tell you that something is wrong in YOUR code Wink

line 3:

Quote:
$smarty = new Smarty


is missing a ; at the end of the line.
Back to top
View user's profile Send private message
jkmcgrath
Smarty n00b


Joined: 14 May 2003
Posts: 4

PostPosted: Thu May 15, 2003 12:22 pm    Post subject: same error Reply with quote

Code:

<?php
require('Smarty.class.php');

$smarty = new Smarty;

$smarty->template_dir = 'test/templates/';
$smarty->compile_dir = 'test/templates_c/';
$smarty->config_dir = 'test/configs/';
$smarty->cache_dir = 'test/cache/';
$smarty->caching = false;


$name = 'John'
$smarty->assign('name','$name');

$smarty->display('index.tpl');
?>


Quote:

[15-May-2003 07:09:13] PHP Parse error: parse error, unexpected T_VARIABLE in c:\inetpub\wwwroot\test\index.php on line 14


But this code did not. The only difference is in the $name = "John";

Code:

<?php
require('Smarty.class.php');

$smarty = new Smarty;

$smarty->template_dir = 'test/templates/';
$smarty->compile_dir = 'test/templates_c/';
$smarty->config_dir = 'test/configs/';
$smarty->cache_dir = 'test/cache/';
$smarty->caching = false;


$smarty->assign('name','John');

$smarty->display('index.tpl');
?>


Then I tried this both with single and double quotes
Code:

<?php
require('Smarty.class.php');

$smarty = new Smarty;

$smarty->template_dir = 'test/templates/';
$smarty->compile_dir = 'test/templates_c/';
$smarty->config_dir = 'test/configs/';
$smarty->cache_dir = 'test/cache/';
$smarty->caching = false;

$name = "John";

$smarty->assign('name','$name');

$smarty->display('index.tpl');
?>


and get this

Quote:
Hello, $name!


Why will it not pick up the variable I wonder?
Back to top
View user's profile Send private message
sweatje
Smarty Regular


Joined: 17 Apr 2003
Posts: 70
Location: Bettendorf, Iowa, USA

PostPosted: Thu May 15, 2003 1:16 pm    Post subject: Reply with quote

single quotes disables php variable replacement.
Code:
$smarty->assign('name',$name);

_________________
Jason
jsweat_php AT yahoo DOT com
Back to top
View user's profile Send private message
jkmcgrath
Smarty n00b


Joined: 14 May 2003
Posts: 4

PostPosted: Thu May 15, 2003 1:34 pm    Post subject: Reply with quote

dOh

the basics Wink

Thats what I get for taking on too much at one lol

Thanks for all the help guys!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP