View previous topic :: View next topic |
Author |
Message |
askhelp Smarty n00b
Joined: 05 May 2005 Posts: 1
|
Posted: Thu May 05, 2005 8:56 pm Post subject: Smarty for Windows? |
|
|
I was guided by a book to download smarty from the url: http://smarty.php.net/download.php for windows
operation system. But on the download page all download packages are for
Unix. Can you please tell me where, how to get the version for windows? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu May 05, 2005 9:40 pm Post subject: |
|
|
Like all PHP code, Smarty can be run on multiple platforms (including Windows) without requiring separate "versions" for each platform. If you are referring to the .tar.gz extension, don't let it worry you. All the major zip programs on Windows (including WinZip and 7-Zip) can handle .tar.gz archives. |
|
Back to top |
|
jaishal Smarty n00b
Joined: 12 May 2005 Posts: 1
|
Posted: Thu May 12, 2005 1:29 pm Post subject: Smarty installtion in windows |
|
|
Hey all
I had downloaded the latest version(stable version) of the smarty 2.6.9 from the www.smarty.php.net. now
i want to install and configure this for windows (i m using localy windows XP)
can anyone guide me how to install the smarty in the windowsXP and if after this i want to upload the files on the linux server wat i have to do??? is there any extra effort i have to do so that i can run the script with smarty.
I know PHP well but
please guide me from where i can learn the SMARTY.. this will be very help ful ...
waiting for someones positive reply
|
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
GSX1400 Smarty n00b
Joined: 26 May 2005 Posts: 1
|
Posted: Thu May 26, 2005 3:39 pm Post subject: |
|
|
I have played around with the Smarty install on Windows 2000 for a while and also read some security articles in PHP and Apache.
It seems to me that the best thing to do is to keep smarty OFF the document root (the directories served by your webserver) to protect it from any potential hostile act.
I have done the following and it seems to work well
Extract Smarty into c:\smarty
Edit the include_path in your php.ini file to be something like
include_path = ".;c:\PHP\includes;c:\smarty\libs"
the important bit being c:\smarty\libs
When you create a new website add the directories to your document root i.e.
c:\inetpub\wwwroot\my_new_smarty_app if your daft enough to use IIS
OR
<wherever apache htdocs are>\my_new_smarty_app
Under that directory add the \configs, \cache , \templates and templates_c directories
(i.e. \my_new_smarty_app\configs etc.)
get the demo app that comes with the install and put the right files in the right directories. Restart your server and away you go.
this way, if and when smarty gets update you only have the one directory to consider which is off the server's document tree and therefore more secure and you are not adding things under the smarty directory in your document root which can get confusing. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu May 26, 2005 3:44 pm Post subject: |
|
|
Just an FYI, it is not necessary to put these directories under the doc root:
configs
cache
templates
templates_c
A browser should never browse directly into these directories. Typically there isn't a problem with putting them there, but if you have sensitive data in your config files or don't want the possiblity of loading the template sources into a browser, move them to another directory. Or at least protect them with something like Apache .htaccess files. |
|
Back to top |
|
leiandra Smarty n00b
Joined: 28 May 2005 Posts: 1
|
Posted: Sat May 28, 2005 7:35 pm Post subject: |
|
|
i am having kinda the same problem, i edited the php.ini file to C:\smarty\libs and it isn't working i am still getting this error
Warning: main(Smarty.class.php): failed to open stream: No such file or directory in C:\Server\Apache2\htdocs\index.php on line 4
Fatal error: main(): Failed opening required 'Smarty.class.php' (include_path='.;c:\php4\pear') in C:\Server\Apache2\htdocs\index.php on line 4
its driving me crazy..lol...any help would be appreciated |
|
Back to top |
|
Nathan Smarty n00b
Joined: 08 Sep 2005 Posts: 2
|
Posted: Thu Sep 08, 2005 2:10 pm Post subject: |
|
|
Yeah, I'm having exactly the same problem. If you look at phpinfo() the include_path is set to .;C:\php5\pear (or php4\pear in your case), and it editing php.ini doesn't affect that. In fact, I searched php.ini for "pear", and the only occurence I found was in the word "appear" in one of the comments. So the include directory is set to one that doesn't exist, and I have no clue how to change it. Ideas anyone? |
|
Back to top |
|
Nathan Smarty n00b
Joined: 08 Sep 2005 Posts: 2
|
Posted: Thu Sep 08, 2005 2:19 pm Post subject: |
|
|
oh, forgot to mention.
A workaround in relation to Smarty is to put the full path in the require(), so for me, that's
require('C:/web/smarty/libs/Smarty.class.php');
or, you can use
set_include_path('C:/web/smarty/libs');
which changes the path for the duration of the script. It means Smarty works fine, but the mysterious location of the include path configuration is getting to me. |
|
Back to top |
|
Duncan Smarty Pro
Joined: 16 Dec 2003 Posts: 166
|
Posted: Fri Sep 09, 2005 7:51 pm Post subject: |
|
|
Nathan wrote: | A workaround in relation to Smarty is to put the full path |
I wouldn't consider this a workaround if you make it a config setting for the script path + smarty libs dir.
That way you won't have to worry about finding that line again and edit it when you move the script to another location, but only need to edit the config file/setting.
Especially comes in handy when you make it available for 3rd parties, since they won't have to mess around with your code but only need to edit the config settings. |
|
Back to top |
|
phantom90ro Smarty n00b
Joined: 20 Jul 2011 Posts: 2
|
Posted: Wed Jul 20, 2011 9:44 pm Post subject: |
|
|
OMG im so noob ( it's because im tired please forgive me i posted something stupid and i realized what i've done after i posted it ((( sryyy |
|
Back to top |
|
wantho Smarty Rookie
Joined: 21 Sep 2011 Posts: 8
|
Posted: Fri Sep 23, 2011 2:44 pm Post subject: pre and post version 3 |
|
|
I am learning and copying from a book. I have Smarty 3.1.0 installed while the book example uses a version from 2007. From the book version the example libs folder contains:
directories/folders: internals and plugins
and files: debug.tpl
Config_File.class.php
Smarty.class.php
Smarty_compiler.class.php
How can I relate these described folders and files in the newer Smarty 3.1.0 'libs' folder. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Sep 23, 2011 2:57 pm Post subject: Re: pre and post version 3 |
|
|
wantho wrote: | I am learning and copying from a book. I have Smarty 3.1.0 installed while the book example uses a version from 2007. From the book version the example libs folder contains:
directories/folders: internals and plugins
and files: debug.tpl
Config_File.class.php
Smarty.class.php
Smarty_compiler.class.php
How can I relate these described folders and files in the newer Smarty 3.1.0 'libs' folder. |
It should work very similar, you only need to worry about installing the "libs" folder and using the Smarty.class.php file, same as before. Don't worry about what other files are in there, just leave them as-is. |
|
Back to top |
|
TedEBare1970 Smarty n00b
Joined: 16 Jun 2014 Posts: 4
|
Posted: Mon Jun 16, 2014 7:20 am Post subject: Installing on Windows 8 |
|
|
I'm running xampp on Windows 8.1
I've done as all the instructions state.
I've located my php.ini file in xampp/php and edited the include_path to reflect "include_path=".;c:\xampp\php\PEAR;c:\smarty\libs""
Unzipped everything into c:\smarty
Made my smarty folder in my webroot "htdocs" with the configs and templates folders inside
I made my cache and templates_c folders inside the c:\smarty directory
I made the index.tpl in the templates folder and the index.php in the htdocs folder
I run the script, and I get this:
Fatal error: Uncaught --> Smarty: Unable to load template file 'index.tpl' <-- thrown in C:\smarty\libs\sysplugins\smarty_internal_templatebase.php on line 127
any ideas? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
|
Back to top |
|
|