473,503 Members | 9,836 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble Installing Smarty could really do with some help

M
Hi Folks,

I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS
v6

The following PHP File:

<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Title here!</title>
</head>
<body>
<?php
require('Smarty.class.php');
$smarty = new Smarty;

$smarty->template_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates';
$smarty->compile_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c';
$smarty->config_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/configs/';
$smarty->cache_dir = '/Program Files/PhpIncludes/Smarty-2.6.9/demo/cache/';

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

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

?>
</body>
</html>
Gives the following error:

Warning: Smarty::fetch(/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c\%%93^934^9348F8B7%%index2.tpl.php)
[function.fetch]: failed to open stream: No such file or directory in
C:\Program Files\PhpIncludes\Smarty-2.6.9\libs\Smarty.class.php on line 1251

Warning: Smarty::fetch() [function.include]: Failed opening '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c\%%93^934^9348F8B7%%index2.tpl.php'
for inclusion (include_path='.;C:\Program
Files\PhpIncludes\Smarty-2.6.9\libs') in C:\Program
Files\PhpIncludes\Smarty-2.6.9\libs\Smarty.class.php on line 1251
Any Ideas please?

Thanks,

Martin
Jul 17 '05 #1
2 2591
On Tue, 28 Jun 2005 18:54:48 GMT, "M" <ih*****************@spamgourmet.com>
wrote:
I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS
v6

<?php
require('Smarty.class.php');
$smarty = new Smarty;

$smarty->template_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates';
Using directory names with spaces in is a recipe for pain and annoyance, if
not outright disaster. I'd recommend moving everything into a directory without
spaces in it.

Might not be the cause of your problem but you'll likely avoid headaches
later.
$smarty->compile_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c';
$smarty->config_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/configs/';
$smarty->cache_dir = '/Program Files/PhpIncludes/Smarty-2.6.9/demo/cache/';

Gives the following error:

Warning: Smarty::fetch(/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c\%%93^934^9348F8B7%%index2.tpl.php)
[function.fetch]: failed to open stream: No such file or directory in
C:\Program Files\PhpIncludes\Smarty-2.6.9\libs\Smarty.class.php on line 1251
OK, obvious question first, does the directory given exist?
Does the filename referenced exist?
Any Ideas please?


Next on the list is checking permissions, since Smarty needs to write to the
template_c directory - have permissions been loosened sufficiently? (If I
remember correctly, for IIS it's the IUSR_<machinename> account needs write
access to the directory). Same again for the cache directory, too.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
M
Yep that di the trick!

Many Thanks.

Martin

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:l2********************************@4ax.com...
On Tue, 28 Jun 2005 18:54:48 GMT, "M"
<ih*****************@spamgourmet.com>
wrote:
I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS
v6

<?php
require('Smarty.class.php');
$smarty = new Smarty;

$smarty->template_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates';


Using directory names with spaces in is a recipe for pain and annoyance,
if
not outright disaster. I'd recommend moving everything into a directory
without
spaces in it.

Might not be the cause of your problem but you'll likely avoid headaches
later.
$smarty->compile_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c';
$smarty->config_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/configs/';
$smarty->cache_dir = '/Program
Files/PhpIncludes/Smarty-2.6.9/demo/cache/';

Gives the following error:

Warning: Smarty::fetch(/Program
Files/PhpIncludes/Smarty-2.6.9/demo/templates_c\%%93^934^9348F8B7%%index2.tpl.php)
[function.fetch]: failed to open stream: No such file or directory in
C:\Program Files\PhpIncludes\Smarty-2.6.9\libs\Smarty.class.php on line
1251


OK, obvious question first, does the directory given exist?
Does the filename referenced exist?
Any Ideas please?


Next on the list is checking permissions, since Smarty needs to write to
the
template_c directory - have permissions been loosened sufficiently? (If I
remember correctly, for IIS it's the IUSR_<machinename> account needs
write
access to the directory). Same again for the cache directory, too.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2892
by: Daan | last post by:
Hello all, I'm having a little problem with Smarty. Getting it to work in a simple case went fine, but now I have the following situation: / /smarty /templates template.tpl /templates_c
1
2293
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem...
2
14144
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
1
2038
by: DJ Majestik | last post by:
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to setup my directory structure correctly. If someone could weigh in and see if I have this setup "right", I would appreciate it....
2
4943
by: Freebird | last post by:
Hello you all, =] I've a smarty var, like this: {$var} that is equal to: ttttttttttttt|zzzzzzzzzzzz It can be any size, the important is that they are separated by the '|' How do I...
7
3010
by: William Krick | last post by:
I'm fairly new to PHP and Smarty templates and I don't understand... $smarty = new Smarty; ....vs... $smarty = new Smarty(); ....vs...
7
2682
by: diane100 | last post by:
Hi I am new to PHP and Smarty (I know only very basic things) and I need help with a warning message I get when I call a page in a browser. I purchased some software from a company who are no...
1
18626
by: sksksk | last post by:
I want to achieve the following process in the smarty for $item one i should be able to get the value using loop.index, but without any luck. any help is appreciated. <?php for ($i = 1; $i...
6
3078
by: K. | last post by:
Hello! I have a problem with using php on smarty web page I would like to use a php code from this web page: http://www.money.pl/webmaster/# i.e.. <?php readfile...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.