473,480 Members | 1,992 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

smarty class nonexistent .. having a bad day

geez, i've done this a million times, you'd think i could get it right.
uploading to production server for a new site, and part of the head.inc
that starts everything up looks like this:
echo SMARTY_DIR."Smarty.class.php<br>";
require_once(SMARTY_DIR."Smarty.class.php");

if (substr(phpversion(),0,1) == "4") {
$smarty = new Smarty;
// echo "created smarty in php4<br>";
// $smarty->__construct();
}else{
$smarty = new Smarty();
}

$smarty->template_dir = SMARTY_DIR."templates/";
$smarty->compile_dir = SMARTY_DIR."templates_c/";
$smarty->config_dir = SMARTY_DIR."configs/";

-------------------------

It outputs
http://[SITE].com/1.0/smarty/Smarty.class.php
which exists, and contains the class definition.
but then it says;
Fatal error: Cannot instantiate non-existent class: smarty in
/home/.sites/38/site49/web/1.0/head.inc on line 14

line 14 is the one in the PHP 4 loop:
$smarty = new Smarty;
and I've tried
$smarty = new Smarty();
as well

somewher I saw that there is supposed to be a configs/ directory for
smarty, but I don't have one on my local machine and everything works
fine here.
Sep 9 '05 #1
0 1566

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

Similar topics

2
2890
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
2033
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
2587
by: M | last post by:
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>
0
1588
by: Conrad | last post by:
Hi, I'm very new to Smarty Template Engine and I'm using PHP 5.0.4 on the Windows XP Professional platform and I have the following question: When I change the 7th line of the script to use a...
0
2796
by: ev45ive | last post by:
Hi! I have smth. like this: file.php: <?php SmartyValidate::connect($smarty); //SmartyValidate::register_form('register');
0
2133
by: grezlik | last post by:
Hi! I have major problems with cakephp & smarty, (cake ver is 1.2 and smarty 2.6.18 ) there is a code (from cake/libs/view/view.php class SmartyView { .. .. ..
7
2680
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
18614
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...
1
1922
by: empiresolutions | last post by:
i have what may be a very simple question for someone who has worked with X-Cart or Smarty. I am adding a rollover image next to the category names in the main navigation. The following is my...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6744
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
6981
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
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
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1304
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
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
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.