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

Problem installing Smarty on WinXP with Apache2.0

 
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 -> Installation and Setup
View previous topic :: View next topic  
Author Message
fadingjava
Smarty n00b


Joined: 19 Feb 2004
Posts: 4

PostPosted: Thu Feb 19, 2004 3:09 pm    Post subject: Problem installing Smarty on WinXP with Apache2.0 Reply with quote

hi,

i am just begining to use smarty and i was installing it on windows XP/Apache2.0. I did everything as directed in basic and extended installation and created 'templates', 'templates_c' and 'cache' directories but the server shows a blank page, no errors , nothing whatsoever. I have gone through the posts in this forum regarding this partcular enivironment but nothing works. can anybody help me? here's what my index.php looks like.


<?php

define('SMARTY_DIR','C:\\Smarty\\');
require(SMARTY_DIR.'Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'C:\\Smarty\\templates';
$smarty->compile_dir = 'C:\\Smarty\\templates_c';
$smarty->config_dir = 'C:\\Smarty\\configs'

$smarty->compile_check = true;
$smarty->debugging = true;

$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
array("I", "J", "K", "L"), array("M", "N", "O", "P")));

$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));

$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
$smarty->assign("option_selected", "NE");

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

?>
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Feb 19, 2004 9:55 pm    Post subject: Reply with quote

hmm, do you have set error_reporting and display_errors in you php.ini?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
fadingjava
Smarty n00b


Joined: 19 Feb 2004
Posts: 4

PostPosted: Thu Feb 19, 2004 10:17 pm    Post subject: Reply with quote

yeah, i did set error_reporting and display_errors to on in php.ini , but still i do not get any errors whatsoever and there is just a blank page.
Back to top
View user's profile Send private message
boots
Administrator


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

PostPosted: Thu Feb 19, 2004 10:50 pm    Post subject: Reply with quote

I hate to ask: all of these directories exist and you placed the index.tpl file in the template_dir?

$smarty->template_dir = 'C:\\Smarty\\templates';
$smarty->compile_dir = 'C:\\Smarty\\templates_c';

IIR, a blank page usually indicates an error in the template.

Assuming everything checks out, try clearing out the compile_dir directory (if anything exists in it) and make sure that error_reporting is at E_ALL and try again.

Note: the Apache process's user/owner will have to have read/write access to the specified compile_dir directory. To ensure this is the case, you can write a php script to create the directory (instead of creating it manually with the logged in user).

Not sure that will help, but there is a solution as I am running a similar setup without these problems.
Back to top
View user's profile Send private message
fadingjava
Smarty n00b


Joined: 19 Feb 2004
Posts: 4

PostPosted: Fri Feb 20, 2004 4:06 am    Post subject: Reply with quote

nope!! nothing works. the directories do exist and the index.tpl is exactly where it is supposed to be. i cannot think of anything why this should not work. and i am the owner/administrator for this system so there is no question of issues about access to the directory.
Back to top
View user's profile Send private message
Duncan
Smarty Pro


Joined: 16 Dec 2003
Posts: 166

PostPosted: Fri Feb 20, 2004 12:29 pm    Post subject: Reply with quote

Just to rule out any php problems: you should add an echo statement somewhere in your php file and see if it gets displayed.
If not, then I assume s.th. is wrong with the php webserver setup, otherwise try setting the error reporting level to E_ALL and see if that produces any output.
Back to top
View user's profile Send private message
rick
Smarty n00b


Joined: 27 Mar 2004
Posts: 1

PostPosted: Sat Mar 27, 2004 7:07 pm    Post subject: Winxp/Smarty installation Problem Reply with quote

I had the same problem and remembered that I also had an index.html file in the same directory and of course it is first in my config file and so kept loading first. Change the name of the file and the problem goes away.
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 -> Installation and Setup 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