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

Need help...
Goto page 1, 2  Next
 
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
specccarl
Smarty Rookie


Joined: 17 Jun 2008
Posts: 5

PostPosted: Tue Jun 17, 2008 2:53 am    Post subject: Need help... Reply with quote

Hi there.My problem is still have smarty error althought i have included path in php.ini,set smarty path is apache config file and i do set the absolute path for smarty in my index.php.Don't know why i still have the smarty error.Anyone pls enlight me?

Best regards

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


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

PostPosted: Tue Jun 17, 2008 4:48 am    Post subject: Reply with quote

Which error message do you get?
Back to top
View user's profile Send private message
specccarl
Smarty Rookie


Joined: 17 Jun 2008
Posts: 5

PostPosted: Wed Jun 18, 2008 7:46 pm    Post subject: Reply with quote

First thank for your help,and this is my error:

[ERRNO: 2
TEXT: unlink(C:\hatshop\presentation\templates_c\%%45^45E^45E480CD%%index.tpl.php) [function.unlink]: No such file or directory
LOCATION: C:\hatshop\libs\smarty\internals\core.write_file.php, line 44, at June 19, 2008, 3:46 am
Showing backtrace:
unlink("C:\hatshop\presentation\templates_c\%%45^45E^45E480CD%%index.tpl...") # line 44, file: C:\hatshop\libs\smarty\internals\core.write_file.php
smarty_core_write_file(Array[3], Object: Page) # line 29, file: C:\hatshop\libs\smarty\internals\core.write_compiled_resource.php
smarty_core_write_compiled_resource(Array[2], Object: Page) # line 1430, file: C:\hatshop\libs\smarty\Smarty.class.php
Smarty._compile_resource("index.tpl", "C:\hatshop\presentation\templates_c\%%45^45E^45E480CD%%index.tpl...") # line 1253, file: C:\hatshop\libs\smarty\Smarty.class.php
Smarty.fetch("index.tpl", null, null, true) # line 1105, file: C:\hatshop\libs\smarty\Smarty.class.php
Smarty.display("index.tpl") # line 11, file: C:\hatshop\index.php]

Please I need your help,Thanks!

Best regards,

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


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

PostPosted: Wed Jun 18, 2008 8:12 pm    Post subject: Reply with quote

I think the configration parameter §smarty->compile_dir and $smarty->cache_dir do not point to the rigth location. Use an absolute path to the loaction where the Smarty subfolders template_c and cache are located.
Back to top
View user's profile Send private message
timrw
Smarty n00b


Joined: 20 Jun 2008
Posts: 1

PostPosted: Fri Jun 20, 2008 12:42 pm    Post subject: Reply with quote

Apparently there is a bug in the current release of Smarty. I was advised to try this with the same problem, and it worked...

Hack the code of Smarty, by editing
\libs\smarty\internals\core.write_file.php at line 44, by adding this code:
---> if (file_exists($params['filename']))
---> {
@unlink($params['filename']);
---> }


Good luck
Back to top
View user's profile Send private message
specccarl
Smarty Rookie


Joined: 17 Jun 2008
Posts: 5

PostPosted: Fri Jun 20, 2008 4:53 pm    Post subject: Reply with quote

U.Tews wrote:
I think the configration parameter §smarty->compile_dir and $smarty->cache_dir do not point to the rigth location. Use an absolute path to the loaction where the Smarty subfolders template_c and cache are located.


Thanks for you help,I really appreciated your help,anyway I do set a absolute path file to template_c in index.php,but it's not work.Anyway I have another question,My question is I do not have a cache folder,do you thnik this possible which caused the error?

Best regards,

Specccarl.
Back to top
View user's profile Send private message
specccarl
Smarty Rookie


Joined: 17 Jun 2008
Posts: 5

PostPosted: Fri Jun 20, 2008 4:56 pm    Post subject: Reply with quote

timrw wrote:
Apparently there is a bug in the current release of Smarty. I was advised to try this with the same problem, and it worked...

Hack the code of Smarty, by editing
\libs\smarty\internals\core.write_file.php at line 44, by adding this code:
---> if (file_exists($params['filename']))
---> {
@unlink($params['filename']);
---> }


Good luck


Hi Tim,thank for your advise,er......so are you sure editing the smarty code wouldn't trigger any error?

Best regards,

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


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

PostPosted: Fri Jun 20, 2008 5:30 pm    Post subject: Reply with quote

Normally @unlink should not create an error message. However it looks like that in some cases this doesn't work when a custom error handler is used. You can give it a try with the modification.

As long as you do not enable caching you do not need to define cache_dir.
Back to top
View user's profile Send private message
specccarl
Smarty Rookie


Joined: 17 Jun 2008
Posts: 5

PostPosted: Sun Jun 22, 2008 5:08 pm    Post subject: Reply with quote

Sad After I try with the modification,I get the HTTP 500 internal server error,Its don't even show the smarty error,anyone please help?

Best regards,


Specccarl.
Back to top
View user's profile Send private message
gokufast
Smarty n00b


Joined: 26 Nov 2008
Posts: 1

PostPosted: Wed Nov 26, 2008 10:40 pm    Post subject: Reply with quote

timrw wrote:
Apparently there is a bug in the current release of Smarty. I was advised to try this with the same problem, and it worked...

Hack the code of Smarty, by editing
\libs\smarty\internals\core.write_file.php at line 44, by adding this code:
---> if (file_exists($params['filename']))
---> {
@unlink($params['filename']);
---> }
Good luck


so what version of smarty is free of this error?
Back to top
View user's profile Send private message
nedo
Smarty Rookie


Joined: 30 Mar 2012
Posts: 8

PostPosted: Fri Mar 30, 2012 7:22 pm    Post subject: Reply with quote

m facing the same problem in my code ...,and i do'nt knw dt what should i do now ..., its my final year project ... and m very Confused plz help me
Back to top
View user's profile Send private message Send e-mail
U.Tews
Administrator


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

PostPosted: Fri Mar 30, 2012 7:50 pm    Post subject: Reply with quote

Which version of Smarty do you use?
Back to top
View user's profile Send private message
nedo
Smarty Rookie


Joined: 30 Mar 2012
Posts: 8

PostPosted: Sat Mar 31, 2012 6:15 am    Post subject: Reply with quote

version of smarty is Smarty-2.6.26
Back to top
View user's profile Send private message Send e-mail
U.Tews
Administrator


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

PostPosted: Sat Mar 31, 2012 6:52 am    Post subject: Reply with quote

The error message you are receiving is normally suprressed by the @ operator.

Does your application set up a custom error handler by set_error_handler()?

Note that custom error handlers gets called also on errors which should be suppressed by the @ operator. In this case the $errno paramter of the handler has the value 0 and you must exit the handler with false like

Code:
if ($errno == 0) return false;


See http://php.net/manual/en/function.set-error-handler.php
Back to top
View user's profile Send private message
nedo
Smarty Rookie


Joined: 30 Mar 2012
Posts: 8

PostPosted: Sat Mar 31, 2012 7:28 am    Post subject: Reply with quote

ERRNO: 512
TEXT: Smarty error: unable to read resource: "departments_list.tpl"
LOCATION: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php, line 1093, at March 31, 2012, 7:09 am
Showing backtrace:
trigger_error("Smarty error: unable to read resource: "departments_list.tpl"", "512") # line 1093, file: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php
Smarty.trigger_error("unable to read resource: "departments_list.tpl"") # line 1589, file: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php
Smarty._fetch_resource_info(Array[3]) # line 1415, file: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php
Smarty._compile_resource("departments_list.tpl", "F:/wamp/www/hatshop/presentation/templates_c\%%A5^A5A^A5A1C73D%%...") # line 1867, file: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php
Smarty._smarty_include(Array[2]) # line 18, file: F:\wamp\www\hatshop\presentation\templates_c\%%45^45E^45E480CD%%index.tpl.php
include("F:\wamp\www\hatshop\presentation\templates_c\%%45^45E^45E480CD%%...") # line 1256, file: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php
Smarty.fetch("index.tpl", null, null, true) # line 1106, file: F:\wamp\www\hatshop\libs\smarty\Smarty.class.php
Smarty.display("index.tpl") # line 7, file: F:\wamp\www\hatshop\index.php


{* departments_list.tpl *}
{load_departments_list assign="departments_list"}
{* Start departments list *}
<div class="left_box" id="departments_box">
<p>Choose a Department</p>
<ol>
{* Loop through the list of departments *}
{section name=i loop=$departments_list->mDepartments}
{assign var=selected_d value=""}
{* Verify if the department is selected to decide what CSS style
to use *}
{if ($departments_list->mSelectedDepartment ==
$departments_list->mDepartments[i].department_id)}
{assign var=selected_d value="class=\"selected\""}
{/if}
<li>
{* Generate a link for a new department in the list *}
<a {$selected_d}
href="{$departments_list->mDepartments[i].link|escape:"html"}">
&raquo; {$departments_list->mDepartments[i].name}
</a>
</li>
{/section}
</ol>
</div>
{* End departments list *}
Back to top
View user's profile Send private message Send e-mail
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
Goto page 1, 2  Next
Page 1 of 2

 
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