View previous topic :: View next topic |
Author |
Message |
Alexw Smarty Rookie
Joined: 02 Dec 2011 Posts: 13
|
Posted: Mon Dec 12, 2011 3:30 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Dec 12, 2011 3:34 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Dec 12, 2011 4:21 pm Post subject: |
|
|
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 |
|
Alexw Smarty Rookie
Joined: 02 Dec 2011 Posts: 13
|
Posted: Mon Dec 12, 2011 4:24 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Dec 12, 2011 4:26 pm Post subject: |
|
|
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 |
|
Alexw Smarty Rookie
Joined: 02 Dec 2011 Posts: 13
|
Posted: Mon Dec 12, 2011 4:28 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Dec 12, 2011 4:32 pm Post subject: |
|
|
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 |
|
Alexw Smarty Rookie
Joined: 02 Dec 2011 Posts: 13
|
Posted: Mon Dec 12, 2011 4:33 pm Post subject: |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Dec 12, 2011 4:48 pm Post subject: |
|
|
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 |
|
Alexw Smarty Rookie
Joined: 02 Dec 2011 Posts: 13
|
Posted: Mon Dec 12, 2011 4:52 pm Post subject: |
|
|
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 |
|
|