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

MAC Safari - Unexpected input
Goto page Previous  1, 2
 
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 -> Bugs
View previous topic :: View next topic  
Author Message
Alexw
Smarty Rookie


Joined: 02 Dec 2011
Posts: 13

PostPosted: Mon Dec 12, 2011 3:30 pm    Post subject: Reply with quote

Is it not better if i replace the config file and use a XML format and just use:
Code:
$smarty->assign('language', simplexml_load_file('lang.nl.xml'));


And in smarty:
Code:
{$language->menu->Hello}


Is that faster?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Dec 12, 2011 3:34 pm    Post subject: Reply with quote

no idea if its any faster, you can benchmark it. either way should work fine, just depends what you prefer. See if you can get the error to go away by making the config file blank. If so, add things back on at a time until the error comes back.
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: Mon Dec 12, 2011 4:21 pm    Post subject: Reply with quote

The strange thing is that this error only pops up with the Safari browser.

To me it looks like that your cms is identifying the browser type and loads a different config file as for the other browsers.

Some other ideas:

1. Make sure that the config file was stored by your edititor with BOM's (Byte Order Mask) disabled.

2. If line 58 was the last line of the file make sure that this line is also terminated with a linebrake.
Back to top
View user's profile Send private message
Alexw
Smarty Rookie


Joined: 02 Dec 2011
Posts: 13

PostPosted: Mon Dec 12, 2011 4:24 pm    Post subject: Reply with quote

I only got 2 files of configs, a dutch file and a english file.
Line 58 is not the last line. I use # to comment something. I assume i can use that for all browsers?

The encoding type is ANSI, and it set to Windows...
I'm using the CMS system on linux. Shall i turn it to Linux?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Dec 12, 2011 4:26 pm    Post subject: Reply with quote

Alexw wrote:
I only got 2 files of configs, a dutch file and a english file.
Line 58 is not the last line. I use # to comment something. I assume i can use that for all browsers?

The encoding type is ANSI, and it set to Windows...
I'm using the CMS system on linux. Shall i turn it to Linux?


That might be your problem, the windows ANSI encoding. Try Linux if that is an option, see if that helps. The file itself should have nothing to do with the browser you use, I'm not sure what would make only Safari show the error. Do you have a link to a test page?
Back to top
View user's profile Send private message Visit poster's website
Alexw
Smarty Rookie


Joined: 02 Dec 2011
Posts: 13

PostPosted: Mon Dec 12, 2011 4:28 pm    Post subject: Reply with quote

Here you go:
http://www.asclub-management.eu/ControlPanel/

The clients that complain about it get a white screen on the above link.
They get a white screen because I enabled error repressing.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Dec 12, 2011 4:32 pm    Post subject: Reply with quote

Alexw wrote:
Here you go:
http://www.asclub-management.eu/ControlPanel/

The clients that complain about it get a white screen on the above link.
They get a white screen because I enabled error repressing.


I get 500 Internal Server Error. (Chrome for Mac)


Last edited by mohrt on Mon Dec 12, 2011 4:33 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Alexw
Smarty Rookie


Joined: 02 Dec 2011
Posts: 13

PostPosted: Mon Dec 12, 2011 4:33 pm    Post subject: Reply with quote

Code:
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: PHP Fatal error:  Uncaught exception 'Exception' with message 'Unexpected input at line58: "' in /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_configfilelexer.php:128
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: Stack trace:
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: #0 /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_configfilelexer.php(52): Smarty_Internal_Configfilelexer->yylex1()
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: #1 /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_config_file_compiler.php(91): Smarty_Internal_Configfilelexer->yylex()
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: #2 /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_config.php(189): Smarty_Internal_Config_File_Compiler->compileSource(Object(Smarty_Internal_Config))
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: #3 /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_config.php(214): Smarty_Internal_Config->compileConfigSource()
[Mon Dec 12 17:39:57 2011] [warn] mod_fcgid: stderr: #4 /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_data.php(280):  in /home/asclub-management/public_html/ControlPanel/inc/3rdparty/Smarty/sysplugins/smarty_internal_configfilelexer.php on line 12
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Mon Dec 12, 2011 4:48 pm    Post subject: Reply with quote

When I call http://www.asclub-management.eu/ControlPanel/ on Windows with Firefox I get a blank page as well.

Are you sure it did work at all with other browsers?

Smarty should use same compiled config files for all browserI can't see why it does call the config file compiler just for Safary and producing the error messages.

Could it be that you have these meesage in the page cache of Safary?
Clear the Safary cache end retry.
Back to top
View user's profile Send private message
Alexw
Smarty Rookie


Joined: 02 Dec 2011
Posts: 13

PostPosted: Mon Dec 12, 2011 4:52 pm    Post subject: Reply with quote

Well I fixed the problem...
I was only checking the dutch config file but never the english one.
And since I'm from holland he automaticly loads the dutch file. And you guys don't use a dutch version of windows so you get the english config file.

Now i tryd to open the site in english and i also got a internal error.
I fixed the error by changing line 58 from:
Code:
PAYMENTS_INVOICE_DATE "Invoice Date"


To:
Code:
PAYMENTS_INVOICE_DATE = "Invoice Date"


But since I was already working on making the language file to XML, I will just continue. I think XML is a better format then the config file of Smarty...

Anyway, thanks for all the help.
Back to top
View user's profile Send private message
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 -> Bugs All times are GMT
Goto page Previous  1, 2
Page 2 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