Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Multiple Errors on Various Pages

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
timmy5000
Smarty Rookie


Joined: 11 May 2013
Posts: 15

PostPosted: Sat May 11, 2013 6:17 am    Post subject: Multiple Errors on Various Pages Reply with quote

Hi,

I'm a completely new to Smarty and have no idea what it is and how it works. I'm trying to install adultvideoscript but right after the installation, I'm receiving some smarty errors. I've double checked everything and I followed all the steps correctly including have the right server requirements.

Error # 1
http://puu.sh/2R4dD.png

Error # 2
http://puu.sh/2R4eQ.png

Error # 3
http://puu.sh/2R4h8.png

Can anyone please help me fix this issue?

Not sure if you need this or not but I'm on a Linux VPS and I'm using CentOS with the latest PHP version.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4596
Location: Hamburg / Germany

PostPosted: Sat May 11, 2013 6:49 am    Post subject: Reply with quote

You have syntax errors errors in the template source files enter.tpl and header.tpl on the indicated lines.
Back to top
View user's profile Send private message
timmy5000
Smarty Rookie


Joined: 11 May 2013
Posts: 15

PostPosted: Sat May 11, 2013 7:27 am    Post subject: Reply with quote

Hey there,

Thanks for the reply. I checked it and don't find anything strange. Can you please check it for me due to my lack of knowledge in Smarty?

Enter.tpl

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>{$site_name|escape:'html'}</title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
   <meta name="description" content="{$meta_description|escape:'html'}" />
   <meta name="keywords" content="{$meta_keywords|escape:'html'}" />
   <meta name="revisit-after" content="1" />
   <link rel="shortcut icon" href="{$relative}/favicon.ico" />
{literal}
<style type="text/css">
   body { background-color: #070707; margin: 0 20px 0 20px; }
   .align-center {   text-align: center; }
   #container { width: 650px; margin-left: auto; margin-right: auto; }
   #logo {   margin: 100px 0 30px 0; }
   #logo img { border: none;}
   #warning { font: normal 26px "Lucida Sans Unicode", Arial; color: #999; letter-spacing: -1px; }
   #warning2 {   margin: 20px 0 0 0;   font: normal 16px "Lucida Sans Unicode", Arial;   color: #555; }
   #enter { float: left; margin: 50px 0 0 150px; }
   #leave { float: right; margin: 50px 150px 0 0; }
   #enter a, #leave a { display: block; width: 100px; height: 34px; background:transparent url({/literal}{$baseurl}{literal}/templates/frontend/default/images/enter_btn.png) no-repeat; font: normal 19px/30px "Lucida Sans Unicode", Arial; color: #ccc; text-decoration:none; text-align: center; }
</style>
{/literal}
</head>
<body>
<div id="container">
<div id="logo" class="align-center">
   <a href="/"><img src="{$baseurl}/templates/frontend/default/images/logo.png" alt="{$site_name|escape:'html'} Logo!" /></a>
</div>
<div id="warning" class="align-center">
   WARNING: This website contains explicit adult material.
</div>
<div id="warning2" class="align-center">
   You may only enter this Website if you are at least
   18 years of age, or at least the age of majority in the jurisdiction
   where you reside or from which you access this Website.  If you do not
   meet these requirements, then you do not have permission to use the
   Website.
</div>
<div id="enter">
   <a href="{$baseurl}">Enter</a>
</div>
<div id="leave">
   <a href="http://www.google.com">Leave</a>
</div>
</body>
</html>



Header.tpl

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>{if isset($self_title) && $self_title != ''}{$self_title|escape:'html'}{else}{$site_name}{/if}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index, follow" />
    <meta name="revisit-after" content="1 days" />
    <meta name="keywords" content="{if isset($self_keywords) && $self_keywords != ''}{$self_keywords|escape:'html'}{else}{$meta_keywords}{/if}" />
    <meta name="description" content="{if isset($self_description) && $self_description != ''}{$self_description|escape:'html'}{else}{$meta_description}{/if}" />
    <link rel = "stylesheet" href = "{$relative_tpl}/css/style.css" type = "text/css" />
    <link rel = "stylesheet" href = "{$relative_tpl}/css/style_menu.css" type = "text/css" />
   <link rel="Shortcut Icon" type="image/ico" href="/favicon.ico" />
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="{$relative_tpl}/css/style_ie7.css" /><![endif]-->
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="{$relative_tpl}/css/style_ie6.css" /><![endif]-->
    <script type="text/javascript">
    var base_url = "{$baseurl}";
    var tpl_url = "{$relative_tpl}";
   {if isset($video.VID)}var video_id = "{$video.VID}";{/if}
   var lang_deleting = "{t c='global.deleting'}";
   var lang_flaging = "{t c='global.flaging'}";
   var lang_loading = "{t c='global.loading'}";
   var lang_sending = "{t c='global.sending'}";
   var lang_share_name_empty = "{t c='share.name_empty'}";
   var lang_share_rec_empty = "{t c='share.recipient'}";
</script>
    <script type="text/javascript" src="{$relative_tpl}/js/jquery-1.2.6.pack.js"></script>
    <script type="text/javascript" src="{$relative_tpl}/js/jquery.livequery.pack.js"></script>
    <script type="text/javascript" src="{$relative_tpl}/js/jquery.rotator-0.2.js"></script>
    <script type="text/javascript" src="{$relative_tpl}/js/jquery.avs-0.2.js"></script>
    {if $submenu_tag_scroller == '1'}<script type="text/javascript" src="{$relative_tpl}/js/jscroller2-1.5.js"></script>{/if}
</head>
<body>
<div id="container">
    <div id="header">
        <div id="logo">
           <a href="{$baseurl}" title="{$site_name}"><img src="{$relative_tpl}/images/logo.png" alt="{$site_name} Logo" /></a>
        </div>
      {insert name=language assign=flag}
        <div id="right">
            {if isset($smarty.session.uid)}
         {if $multi_language}
            <a href="#" id="select_language" class="languageselector" title="Select Language"><div><img src="{$relative_tpl}/images/flags/{$flag}" id="select_language" alt="{$flag}" /><img src="{$relative_tpl}/images/arrowdown.gif"></div></a>
         {/if}
            <div id="userlinks">
            <ul>
                <li><a href="{$relative}/logout">{translate c='global.sign_out'}</a></li>
                <li id="my_feeds"><a href="{$relative}/feeds" class="icon">{translate c='global.my_feeds'}</a></li>
                <li id="new_requests"><a href="{$relative}/requests" class="icon">{translate c='global.requests'} ({$requests_count})</a></li>
                <li id="new_mail"><a href="{$relative}/mail/inbox" class="icon">{translate c='global.inbox'} ({$mails_count})</a></li>
                <li>Welcome: <a href="{$relative}/user">{$smarty.session.username}</a>!</li>
            </ul>
            </div>
            <div class="clear_right"></div>
            {else}
         {if $multi_language}
            <a href="#" id="select_language" class="languageselector" title="Select Language"><div><img src="{$relative_tpl}/images/flags/{$flag}" id="select_language" alt="{$flag}" /><img src="{$relative_tpl}/images/arrowdown.gif"></div></a>
         {/if}
            <div id="nologinlinks">
                <a href="{$relative}/signup" rel="nofollow">&nbsp;{translate c='global.sign_up'}</a> <strong>&middot;</strong>
                <a href="{$relative}/login" rel = "nofollow">{translate c='global.login'}</a>
            </div>
         <div class="clear_right"></div>
            {/if}
            <div id="toplinks" class="grey small">
                <a href="{$relative}/invite" rel="nofollow">{translate c='global.invite_friends'}</a> <strong>&middot;</strong>
                <a href="{$relative}/feedback" rel="nofollow">{translate c='global.support_feedback'}</a> <strong>&middot;</strong>
                <a href="{$relative}/notices">{$site_name} {translate c='global.notice'}</a>
            </div>
         <div id="slidetabsmenu">
         <ul>
                <li{if $menu == 'community'} id="current"{/if}><a href="{$relative}/community"><span>{translate c='menu.community'}</span></a></li>
                <li{if $menu == 'categories'} id="current"{/if}><a href="{$relative}/categories"><span>{translate c='menu.categories'}</span></a></li>
                {if $blog_module == '1'}<li{if $menu == 'blogs'} id="current"{/if}><a href="{$relative}/blogs"><span>{translate c='menu.blogs'}</span></a></li>{/if}
                {if $game_module == '1'}<li{if $menu == 'games'} id="current"{/if}><a href="{$relative}/games"><span>{translate c='menu.games'}</span></a></li>{/if}
                {if $photo_module == '1'}<li{if $menu == 'albums'} id="current"{/if}><a href="{$relative}/albums"><span>{translate c='menu.photos'}</span></a></li>{/if}
                <li{if $menu == 'videos'} id="current"{/if}><a href="{$relative}/videos"><span>{translate c='menu.videos'}</span></a></li>
                <li{if $menu == 'home'} id="current"{/if}><a href="{$relative}/"><span>{translate c='menu.home'}</span></a></li>            
         </ul>
         </div>
         <div class="clear_left"></div>
        </div>
        <div class="clear"></div>
        <div id="submenu">
            <div id="upload">
                <a href="{$relative}/upload">{translate c='menu.upload'}</a>
            </div>
            <div id="search">
                <form name="search" id="search_form" method="get" action="{$relative}/search">
                    <input name="search_query" type="text" id="search_query" value="{if isset($search_query)}{$search_query}{/if}" />
                    <select class="searchselect" name="search_type" id="search_type">
                        <option value="videos"{if isset($search_type) && $search_type == 'videos'} selected="yes"{/if}>{translate c='global.videos'}</option>
                        {if $photo_module == '1'}<option value="photos"{if isset($search_type) && $search_type == 'photos'} selected="yes"{/if}>{translate c='global.photos'}</option>{/if}
                        {if $game_module == '1'}<option value="games"{if isset($search_type) && $search_type == 'games'} selected="yes"{/if}>{translate c='global.games'}</option>{/if}
                        <option value="users"{if isset($search_type) && $search_type == 'users'} selected="yes"{/if}>{translate c='global.users'}</option>
                    </select>
                    <input type="submit" value="{t c='ajax.search'}" class="searchbutton" maxlength="50" />
                    <span class="span_search">[ <a href="{$relative}/search" rel="nofollow" id="advanced_search" class="submenulink">{translate c='menu.advanced'}</a> ]</span>
                </form>
            </div>
            {if $submenu_tag_scroller == '1'}
            <div id="scroller">
                <div id="scroller_title">
                {translate c='menu.tags'}:
                </div>
                <div id="scroller_container">
                    <div class="jscroller2_left" style="font-size: 13px; line-height:15px; white-space:nowrap; margin: 0;">
                    {section name=i loop=$scroller_content}
                        <a class="submenulink" href="{$relative}/search?search_query={$scroller_content[i]}&amp;search_type=videos">{$scroller_content[i]|escape:'html'}</a>
                    {/section}
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            {/if}
            <div class="clear"></div>
        </div>
      <div id="language_select" style="margin-top: 5px; display: none;">
         <div class="box" id="language_container"></div>
      </div>
        <div id="loading_advanced_search" class="response_full" style="display: none;">Loading...</div>
        <div id="search_advanced" style="margin-top: 5px; display: none;">
            <div class="box" id="advanced_search_container"></div>
        </div>
    </div>
                  <!-- end of header -->

Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4596
Location: Hamburg / Germany

PostPosted: Sat May 11, 2013 9:04 am    Post subject: Reply with quote

Has your PHP magic_quotes_runtime enabled?

If yes all qoutes get escaped on file reads. This could cause your problems.
Back to top
View user's profile Send private message
timmy5000
Smarty Rookie


Joined: 11 May 2013
Posts: 15

PostPosted: Sun May 12, 2013 2:46 am    Post subject: Reply with quote

Weird I don't have magic_quotes_runtime in /etc/php.ini

All I have related to magic_quotes in /etc/php.ini is the following:

Code:

- magic_quotes_gpc = Off         [Performance]
;     Input data is no longer escaped with slashes so that it can be sent into
;     SQL databases without further manipulation.  Instead, you should use the
;     function addslashes() on each input element you wish to send to a database.

; Magic quotes
;

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off



I did ctrl+f and searched the term "magic_quotes"
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4596
Location: Hamburg / Germany

PostPosted: Sun May 12, 2013 8:46 pm    Post subject: Reply with quote

Hmm it does really look as quotes are escaped in the source befor it gets into the compiler.

Is a Smarty prefilter loaded?
Back to top
View user's profile Send private message
timmy5000
Smarty Rookie


Joined: 11 May 2013
Posts: 15

PostPosted: Mon May 13, 2013 3:15 am    Post subject: Reply with quote

To be honest, this might sound like a pain but I never managed a unmanaged VPS before, I always used shared hosting. I'm totally new to this, is it OK if I PM you the credentials and you can please check it out for me? I would highly appreciate your help.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4596
Location: Hamburg / Germany

PostPosted: Mon May 13, 2013 3:40 pm    Post subject: Reply with quote

The prefilter I talk about would be loaded by the main PHP script setting up Smarty.
Back to top
View user's profile Send private message
timmy5000
Smarty Rookie


Joined: 11 May 2013
Posts: 15

PostPosted: Tue May 14, 2013 3:25 am    Post subject: Reply with quote

Hi,

Thanks for your help and cooperation so far. I highly appreciate it Smile

I checked my PHP file and didn't find anything related to Smarty Prefilter or postfiler in my PHP.ini file. Do you happen to know where it could be?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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