Re: [SMARTY] Problem of using Smarty on Windows XP Pro with IIS

From: Date: Fri, 21 Mar 2003 01:08:43 +0000
Subject: Re: [SMARTY] Problem of using Smarty on Windows XP Pro with IIS
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8794@lists.php.net to get a copy of this message
With forward slashes "/" I get this error : Warning: Smarty error: problem creating directory "C:/Inetpub/wwwroot/bheller/templates_c\%%-19\%%-1935653680" in C:\Inetpub\wwwroot\bheller\Smarty.class.php on line 999 (I only put the text of the first error as others are in the same kind as my previous mail) So there is a mess somewhere with slashes and rights but I really don't get where to correct that :( Thanks anyway for helping ;) --------------------- A+++ Bruce http://www.bheller.com ----- Original Message ----- From: "Paul Lockaby" <lockaby@vt.edu> To: "Bruce Heller" <bheller@bheller.com> Cc: <smarty-general@lists.php.net> Sent: Friday, March 21, 2003 1:56 AM Subject: Re: [SMARTY] Problem of using Smarty on Windows XP Pro with IIS > Bruce Heller wrote: > > Hello, it's my first post on this list so sorry if I ask something already > > asked many times, the "search" function of the MARC (mailling list archive) > > is quite unusable :( > > I've already used Smarty on linux server with no problems, but I need to use > > it on my windows box and I face a problem... > > I've created a virtual host with IIS. > > I then added the three Smarty files in it (Config_File.class.php, > > Smarty.class.php and Smarty_Compiler.class.php). > > I've created the directory needed (templates, templates_c). > > Under IIS I've given the writing right to the "templates_c" directory. > > Here is then my source code : > > > > <? > > define('SMARTY_DIR', 'C:\\Inetpub\\wwwroot\\bheller\\'); > > require_once(SMARTY_DIR . 'Smarty.class.php'); > > > > $smarty = new Smarty; > > $smarty->compile_dir = SMARTY_DIR . 'templates_c'; > > > > $smarty->display('menu.tpl'); > > ?> > > > > And here is the content of the "menu.tpl" template : > > > > <HTML> > > <HEAD> > > <TITLE>Test</TITLE> > > </HEAD> > > <BODY> > > rtjsoe > > </BODY> > > </HTML> > > > > When I try to see the page I get this : > > > > Warning: Smarty error: problem creating directory > > "C:\Inetpub\wwwroot\bheller\templates_c\%%-19\%%-1935653680" in > > C:\Inetpub\wwwroot\bheller\Smarty.class.php on line 999 > > > > Warning: Smarty error: problem writing > > 'C:\Inetpub\wwwroot\bheller\templates_c\%%-19\%%-1935653680\menu.tpl.php.' > > in C:\Inetpub\wwwroot\bheller\Smarty.class.php on line 999 > > > > Warning: touch() [function.touch]: Unable to create file > > C:\Inetpub\wwwroot\bheller\templates_c\%%-19\%%-1935653680\menu.tpl.php > > because No such file or directory in > > C:\Inetpub\wwwroot\bheller\Smarty.class.php on line 1518 > > > > Warning: > > fetch(C:\Inetpub\wwwroot\bheller\templates_c\%%-19\%%-1935653680\menu.tpl.ph > > p) [function.fetch]: failed to create stream: No such file or directory in > > C:\Inetpub\wwwroot\bheller\Smarty.class.php on line 1112 > > > > Warning: fetch() [function.fetch]: Failed opening > > 'C:\Inetpub\wwwroot\bheller\templates_c\%%-19\%%-1935653680\menu.tpl.php' > > for inclusion (include_path='.;c:\php4\pear') in > > C:\Inetpub\wwwroot\bheller\Smarty.class.php on line 1112 > > > > What can I do then ? What have I done wrong ? > > > > Thanks for all ! > > > > I used Smarty on Win2k for a while, and I'm assuming that XP and 2k > aren't that much different. I actually found that I couldn't refer to > smarty using backslashes, even if I escaped them. Try using forward > slashes. Like this: C:/Inetpub/wwwroot/bheller/ > > One thing I did notice about 2k and not Linux is that when I downloaded > a new version of Smarty from CVS and overwrote the old version, PHP > reported that it could not find the file (Smarty.class.php and > Smarty_compiler.class.php) even if I restarted IIS and even the > computer. The only way I could get PHP to recognize smarty is if I > copied the file, deleted the original and renamed the copy to what it > should be. It was weird, but I dont' have to use Windows anymore, so > it's all good. > > > -- > Paul Lockaby > paul@paullockaby.com > http://www.paullockaby.com > > >

« previous php.smarty.general (#8794) next »