Re: [SMARTY] Help Please-Compiled templates have headers only

Gary Smith <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <BF0AA69D.3839E%[email protected]>
Thanks Everyone,

Here's the php file == test.php:

define('SMARTY_DIR', '/usr/share/php/smarty/');
require_once(SMARTY_DIR . 'Smarty.class.php');

$tpl = new Smarty;
$tpl->template_dir = '/home/httpd/vhosts/smithskauai.com/templates/';
$tpl->compile_dir =
'/home/httpd/vhosts/smithskauai.com/compiled_templates/';
$tpl->cache_dir = '/home/httpd/vhosts/smithskauai.com/cache';
$tpl->config_dir = '/home/httpd/vhosts/smithskauai.com/conf';

$tpl->compile_check = true;
$tpl->force_compile = true;
$tpl->debugging = true;

$tpl->display('test.tpl');

Here's the template File == test.tpl:

Hello World!

Thanks,
Gary

in article [email protected], Evan Wagner at
[email protected] wrote on 7/25/05 11:54 AM:

> I had a problem similar to this once, error reporting wasn't giving me
> an error and everything except PHP logic in Smarty would present it
> self when viewing the page. There were no errors or anything. Here's
> what my problem was:
> 
> I had added a $_GET variable checking statement: if($_GET['variable']
> ="value") { Do these functions }
> 
> The error is obvious, I forgot the other "=". It should have read out like
> this:
> if($_GET['variable'] =="value") { Do these functions }
> 
> Just to let you know, Smarty is just like the name says. You should
> check all the recent code you added since you saved the file before it
> stopped working. Most errors are user errors and you just gotta pull
> your hair out if you have a lot of code to review.
> 
> On 7/25/05, boots <[email protected]> wrote:
>> Greets.
>> 
>> I didn't say template variables. I said that { and } are special -- for
>> example, if you have embedded javascript or CSS. Perhaps you should
>> post the complete and exact code that isn't working since guessing
>> doesn't seem to be working very well.
>> 
>> --- Gary Smith <[email protected]> wrote:
>> 
>>> Hi Boots,
>>> 
>>> There aren't any template variables or anything in my template.
>>> Thanks for
>>> trying to help. Anyone have any more ideas?
>>> 
>>> Gary
>>> 
>>> 
>>> 
>>> in article [email protected], boots
>>> at
>>> [email protected] wrote on 7/25/05 10:21 AM:
>>> 
>>>> Ok, but don't forget that { and } are considered "special". Other
>>> than
>>>> that, I can't imagine what the problem might be -- sorry.
>>>> 
>>>> --- Gary Smith <[email protected]> wrote:
>>>>> Thanks Boots,
>>>>> 
>>>>> Error reporting is at E_ALL. Right now my templates are just
>>> static
>>>>> so I can
>>>>> troubleshoot.
>>>>> 
>>>>> Gary
>>>>> 
>>>>> 
>>>>> in article [email protected],
>>> boots
>>>>> at
>>>>> [email protected] wrote on 7/25/05 9:42 AM:
>>>>> 
>>>>>> Make sure that error reporting is at E_ALL. You may have an error
>>>>> in
>>>>>> your template.
>>>>>> 
>>>>>> --- Gary Smith <[email protected]> wrote:
>>>>>> 
>>>>>>> Thanks Maximillian,
>>>>>>> 
>>>>>>> Phpinfo only showed differences where expected in configuration
>>>>> paths
>>>>>>> such
>>>>>>> as include and open basedir etc. I¹ve tried force compile and
>>> not,
>>>>> it
>>>>>>> doesn¹t seem to make a difference. Any other ideas?
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Gary
>>>>>>> 
>>>>>>> on 7/24/05 6:26 PM, Maximillian Schwanekamp at
>>>>>>> [email protected]
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Gary Smith wrote:
>>>>>>>>> Good thought but it didn't do the trick. Any other ideas?
>>>>>>>> 
>>>>>>>> Did you try running a phpinfo() on the other site (vhost) on
>>> that
>>>>>>>> machine, and on the problem site, and running a diff on them
>>>>> using
>>>>>>> e.g.
>>>>>>>> Textpad or similar?  Are you intentionally using Force compile?
>> 
>> 
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>> 
>> --
>> Smarty General Mailing List (http://smarty.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.