Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th June 2006, 18:39
AngelDrago AngelDrago is offline
Senior Member
 
Join Date: Sep 2005
Location: Florida -- USA
Posts: 100
Thanks: 4
Thanked 0 Times in 0 Posts
Exclamation Installing Smarty Templates Engine

Hi everyone, hallo till und falko wie gets euch... i have searched for some documentation on how to install the Smarty Template System... because i'm getting some error messages like this one...

Warning: main(/ispconfig/php/Smarty/Smarty.class.php): failed to open stream: No such file or directory in /var/www/web1/web/myapp/index.php on line 4

Fatal error: main(): Failed opening required '/ispconfig/php/Smarty/Smarty.class.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/web1/web/myapp/index.php on line 4

here is the link for there setup... http://smarty.php.net/quick_start.php
Thank you,
AngelDrago
Reply With Quote
Sponsored Links
  #2  
Old 21st June 2006, 01:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Does /ispconfig/php/Smarty/Smarty.class.php exist? Where do you put Smarty.class.php?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st June 2006, 04:42
AngelDrago AngelDrago is offline
Senior Member
 
Join Date: Sep 2005
Location: Florida -- USA
Posts: 100
Thanks: 4
Thanked 0 Times in 0 Posts
Default

in here /ispconfig/php/Smarty/ here is the link http://www.ultimateresources.com/myapp/index.php

Thank you,
AngelDrago
Reply With Quote
  #4  
Old 21st June 2006, 18:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

What's the output of
Code:
ls -la /ispconfig/php/Smarty
ls -la /ispconfig/php
ls -la /ispconfig
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 22nd June 2006, 17:41
AngelDrago AngelDrago is offline
Senior Member
 
Join Date: Sep 2005
Location: Florida -- USA
Posts: 100
Thanks: 4
Thanked 0 Times in 0 Posts
Question

know that is wired...

here is the output...

argo:~# ls -la /ispconfig/php/Smarty
ls: /ispconfig/php/Smarty: No such file or directory

argo:~# ls -la /ispconfig/php
ls: /ispconfig/php: No such file or directory

argo:~# ls -la /ispconfig
ls: /ispconfig: No such file or directory

Strange i know that the directories are there...
Reply With Quote
  #6  
Old 23rd June 2006, 00:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Did you run these commands
Code:
ls -la /ispconfig/php/Smarty
ls -la /ispconfig/php
ls -la /ispconfig
as root?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 23rd June 2006, 05:06
AngelDrago AngelDrago is offline
Senior Member
 
Join Date: Sep 2005
Location: Florida -- USA
Posts: 100
Thanks: 4
Thanked 0 Times in 0 Posts
Default

yes i have...see above...
Reply With Quote
  #8  
Old 24th June 2006, 13:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Then /ispconfig/php/Smarty/Smarty.class.php doesn't exist. Create it and try again.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 26th June 2006, 04:38
Dimitriy Dimitriy is offline
Junior Member
 
Join Date: Jun 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I have worked with Smarty before and I strongly suggest not doing it that way.

Instead implement smarty into each website as just as a php engine. Dont bother making it global otherwise you will run into issues of customization and so on. I enjoy having each application be seperate on its own space. While it sounds dumb and unclean programming for a person who single-handedly manages several sites, I find it easier both for me and my clients.

Just define the smarty dir like so (assume the path of the acutal public html is /home/www/web1/web/)

/home/www/web1/web/backend/includes/baseincludes.php
Code:
<?php

define('SMARTY_DIR', '/home/www/web1/smarty/libs/');


// put full path to Smarty.class.php
require(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();

$smarty->template_dir = 'backend/templates';
$smarty->compile_dir = 'backend/templates_c';
$smarty->cache_dir = 'backend/cache';
$smarty->config_dir = 'backend/configs';

?>
Note the backend folder is RELATIVE TO THE CALLER FILE! The backend folder is not located in /libs/ of the smarty folder. If index.php calls for baseincludes.php all relative paths defined in baseincludes.php are relative to the caller file in this case index.php NOT baseincludes.php.

So basically Index.php goes up a level to fetch the libs files and then goes back to the location of index.php and fetches the info from /backend/x.

I know its a little rant but hope it helps.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
errors on the end of the installing process tom Installation/Configuration 1 8th April 2006 01:56
Problems Installing in CentOS 4.2 fresh JLChafardet Installation/Configuration 3 31st March 2006 21:36
Help Installing ndiswrapper onto Ubuntu sbovisjb1 Installation/Configuration 0 16th February 2006 23:55
error while installing..... securitywonks Installation/Configuration 1 23rd December 2005 12:07
Config file templates till Developers' Forum 0 30th July 2005 23:10


All times are GMT +2. The time now is 15:30.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.