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

3.1 RC to 3.1 break my website
Goto page 1, 2, 3  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
asiansexynine
Smarty n00b


Joined: 17 Sep 2011
Posts: 3

PostPosted: Sat Sep 17, 2011 2:34 pm    Post subject: 3.1 RC to 3.1 break my website Reply with quote

I am upgrade Smarty 3.1RC to 3.1 that break my website with blank page. I have no idea what is different? or 3.1 needed special config more than 3.1RC?
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Sat Sep 17, 2011 2:52 pm    Post subject: Reply with quote

An error message would be nice… ?!
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
chrisnoden
Smarty Rookie


Joined: 17 Sep 2011
Posts: 6

PostPosted: Sat Sep 17, 2011 9:00 pm    Post subject: Error with cache files on 3.1 (4284) Reply with quote

I too have immediately hit a wall when I updated to the latest version from SVN.

filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /opt/local/www/sal/temp/templates_c/f9705b76f2fc376da6d55d6001497fac5076f494.file.index.html.php on line 607 in /opt/local/www/sal/platform/externals/Smarty/sysplugins/smarty_resource.php

Rolling back to SVN version 4227 cured the problem.
The problem is introduced in the next version on SVN (4274)

The other thing I noticed is that originally the error was for file templates_cf9705b76f2fc376da6d55d6001497fac5076f494.file.index.html.php - ie Smarty was no longer adding a DIRECTORY_SEPARATOR. That was easily fixed in my code, but it didn't fix the underlying problem. All file and folder permissions are correct (I rolled back to 4227 and immediately everything worked again without any other changes required).
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sun Sep 18, 2011 12:56 am    Post subject: Reply with quote

All directory specifications need a trailing directory seperator. This sanitation is now done in the setter methods like setCompileDir().

If normally it schould not be possible to modify the directory setting directly. How did you do that?

To solve the problem add a trialing directory seperator,
Back to top
View user's profile Send private message
asiansexynine
Smarty n00b


Joined: 17 Sep 2011
Posts: 3

PostPosted: Sun Sep 18, 2011 1:33 am    Post subject: Reply with quote

U.Tews wrote:
All directory specifications need a trailing directory seperator. This sanitation is now done in the setter methods like setCompileDir().

If normally it schould not be possible to modify the directory setting directly. How did you do that?

To solve the problem add a trialing directory seperator,


I have no idea .. what you talking about? setting or config that refer from Smarty Docs. If any special needed there should have information in Docs.

There not have any error showing on my website. just blank page with white screen . I have config and working fine with 3.1RC but not working for me with 3.1.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sun Sep 18, 2011 3:09 am    Post subject: Reply with quote

My answer was related to the reply of chrisnode.

If you get a blank page it could be permission problems.

Add $smarty->testInstall(); to your script. It does detect permission problems. Also check your PHP error log file.
Back to top
View user's profile Send private message
asiansexynine
Smarty n00b


Joined: 17 Sep 2011
Posts: 3

PostPosted: Sun Sep 18, 2011 5:24 am    Post subject: Reply with quote

U.Tews wrote:
My answer was related to the reply of chrisnode.

If you get a blank page it could be permission problems.

Add $smarty->testInstall(); to your script. It does detect permission problems. Also check your PHP error log file.


Thank you U.Tews $smarty->testInstall(); fixed my problem well Wink
Back to top
View user's profile Send private message
chrisnoden
Smarty Rookie


Joined: 17 Sep 2011
Posts: 6

PostPosted: Sun Sep 18, 2011 5:53 pm    Post subject: Follow up Reply with quote

Hi

If you read my post you will see I already added the trailing separator but that didn't fix the problem. I've 11 years PHP experience and the bug is in the latest release.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sun Sep 18, 2011 7:09 pm    Post subject: Reply with quote

@ error suppression is used at line 607 of smarty _resource.php.
So you should not see this error.

Do you use codeigniter or have enabled other options for debugging which will grab suppressed errors?
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Tue Sep 20, 2011 7:37 pm    Post subject: Reply with quote

Hi all,

I switch to 3.0.9 and everything is ok

But when I switch to 3.1.0 I get a white page. I run TestInstall.php after modifying (addPluginsDir) and everything is ok.

No error is displayed with debug ON, how can I debug this problem?

Note: I switch back to 3.0.9
Back to top
View user's profile Send private message Visit poster's website
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Tue Sep 20, 2011 7:54 pm    Post subject: Reply with quote

When you're getting a white page, you're probably facing a fatal error and have display_errors disabled (and don't know where your errors are being logged to).

add ini_set('display_errors', true); somewhere up in your script to make the error message appear.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Tue Sep 20, 2011 7:56 pm    Post subject: Reply with quote

Did you clear the cache and template_c folders after upgradig to 3.1?

Compiled and cached files are not compatible between the 2 versions?
Back to top
View user's profile Send private message
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Tue Sep 20, 2011 8:11 pm    Post subject: Reply with quote

caches were clear
thanks ! Yes it was a fatal error, I added

error_reporting(E_ALL | 'E_STRICT');

and I can see that now the modifier cat is "unknown modifier" !!!


I replaced

$smarty->setPluginsDir(SMARTY.'/plugins'); // where my plugins are
//$smarty->plugins_dir[] = SMARTY.'/plugins';

But it seems it's not enough?


Last edited by adn on Tue Sep 20, 2011 8:13 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Tue Sep 20, 2011 8:12 pm    Post subject: Reply with quote

make that addPluginsDir() instead of setPluginsDir()
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
adn
Smarty Regular


Joined: 31 May 2011
Posts: 91

PostPosted: Tue Sep 20, 2011 8:14 pm    Post subject: Reply with quote

I already did that but in this case my own plugins are not found ?!!
Back to top
View user's profile Send private message Visit poster's website
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, 3  Next
Page 1 of 3

 
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