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

baasic instalation problem

 
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
mvnholio
Smarty n00b


Joined: 06 Jul 2004
Posts: 1
Location: bali

PostPosted: Tue Jul 06, 2004 8:12 am    Post subject: baasic instalation problem Reply with quote

Hi All,

Be smart....yea..

SMARTY is smart...

I have seen any site using SMARTY, I want use SMARTY as well but I have some problems of Basic instalation.

since I am really new in php, but for now i can do some design webpage in php...
SMARTY make me get new idea of template design i like it...

But my problem is in basic instalation, I don,t know at all of the instruction of basic instalation EVEN I have already READ the basic instalation instruction(install file) But i still get problem. i have many experieces of instalation of any other portal and i success to do that but for SMARTY,It is really hard for me.because I don,t how to start and how to end it up.

ok here is what i have done with SMARTY.

1. I have downloaded the SMARTY version 2.6.2 (done well)
2. I extracted all the file into the directory called "smarty" (c:/program files/apache group/apache/htdocs/smarty ) so i call it in browser like (http://localhost/smarty ) for testing it...

*******************************************************************************
INSTALLATION (quick):

* copy the files under the libs/ directory to a directory that is in your PHP
include_path, or set the SMARTY_DIR constant and put them in this directory.
(if you upgrade from versions before 2.5.0 be aware that up to Smarty 2.4.2
all necessary files where in the distribution's root directory, but are now
in libs/.)
*******************************************************************************

3. above is the instalation instruction within install.txt ----> with this instruction i have just did my smarty like below

*** I move all the file in libs/directory TO C:--program files
--apache groups
--apache
--htdocs
--smarty
--/core/*.php (all of them
--/plugins/*.php (all of them)
--plugins
--Smarty.class.php
--Smarty_Compiler.class.php --Config_File.class.php --debug.tpl


4. So...My question is Does this correct way for putting libs file to the folder that I used.
5. If doesn,t, what should I do?
6. If you want to help me pls explain it in detail(explicit) because i am really new in this instalation.
7. the instruction in basic intalation file are really hard to me to understand it.

for you help, I am really appreciate it. and thanks in advance.
_________________
hello my name julius
Back to top
View user's profile Send private message
tk
Smarty Regular


Joined: 31 Oct 2003
Posts: 49
Location: London, UK

PostPosted: Tue Jul 06, 2004 1:16 pm    Post subject: Reply with quote

Hi Julius..

I haven't used PHP on windoze for ages.. but I'll hopefully try to explain a bit =)

Firstly.. to clear up 1 issue.. accessing the /smarty/ dir from your Web browser won't produce anything useful.

There's 2 methods of installation... either 'global' or 'per-site'. I'll start with a per-site theory:

You have your main site dir as '.........../htdocs/mysite.com/'. Create a dir within here called 'Smarty'. Unarchive the Smarty download and move the contents of the 'libs' directory into your your site's Smarty dir.

Now create an index.php page within your 'mysite.com' directory with the following:

[php:1:a0e4de8305]<?php
require_once(dirname(__FILE__) . '/Smarty/Smarty.class.php');
$smarty = new Smarty;
var_dump($smarty);
?>[/php:1:a0e4de8305]

This will then attempt to include the core Smarty class.. create a $smarty object and then dump the contenbts of the object to your browser. If you don't see any output, something is wrong.. if you see a load of "garbage" (this isn't garbage in the true sense naturally.. but it may not make much sense in the way var_dump() displays the data) you know Smarty has been included and ready to work with... then time to head off over to the 'crash course' section og the Smarty manual =)



For global install.. you should have a global PHP includes dir (this should be defined in your php.ini file if you're unsure of it). Rather than creating a Smarty dir in your site's dir... perform the same tasks within your PHP's include dir. You should then be able to use code such as:


[php:1:a0e4de8305]<?php
require_once('Smarty.class.php');
$smarty = new Smarty;
var_dump($smarty);
?>[/php:1:a0e4de8305]

You may have to add the Smarty dir in your PHP includes dir to your php.ini file.. if so, don't forget to restart Apache =)


Apologies this isn't maybe a great explanation as I'm struggling to remember how all this works on windoze.. but hopefully it maybe useful to ya =)



Regards & good luck...


tk
_________________
Certified Code Junkie(tM)
Copyleft (L) two thousand and now, tk
Back to top
View user's profile Send private message Visit poster's website
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