MovieLib - Your movie database on web
#81
Just to do some more testing i tried adding a array called $theme in the config file like this:
// theme test
$theme = array(
'bg' => 'Bulgarian',
'cs' => 'Czech',
'da' => 'Danish',
'de' => 'German'
);

Now. I rest the get_setting function to the one you suggested. The first output of the debug page is:
Command: echo $_SESSION['language'];, Output: en
Command: echo $set['language'];, Output: en
Command: print_r($set);, Output: Array
(
[site_name] => MovieLib
[language] => en
[theme] => default
[per_page] => 50
[panel_top_limit] => 10
[panel_top_time] => 5
[panel_top] => 1
[watched_status] => 1
[panel_overall] => 1
[panel_genre] => 1
[panel_year] => 1
[panel_country] => 1
[panel_v_codec] => 1
[panel_a_codec] => 1
[panel_a_chan] => 1
[show_fanart] => 1
[show_trailer] => 1
[protect_site] => 0
[token] =>
)

Command: print_r($_SESSION);, Output: Array
(
[site_name] => MovieLib
[language] => en
[theme] => default
[per_page] => 50
[panel_top_limit] => 10
[panel_top_time] => 5
[panel_top] => 1
[watched_status] => 1
[panel_overall] => 1
[panel_genre] => 1
[panel_year] => 1
[panel_country] => 1
[panel_v_codec] => 1
[panel_a_codec] => 1
[panel_a_chan] => 1
[show_fanart] => 1
[show_trailer] => 1
[protect_site] => 0
[token] =>
)

The 2nd run (refresh) returns this:
Command: echo $_SESSION['language'];, Output: Array
Command: echo $set['language'];, Output: Array
Command: print_r($set);, Output: Array
(
[site_name] => MovieLib
[language] => Array
(
[bg] => Bulgarian
[cs] => Czech
[da] => Danish
[de] => German
[en] => English
[es] => Spanish
[fr] => French
[hu] => Hungarian
[it] => Italian
[nl] => Dutch
[no] => Norwegian
[pl] => Polish
[pt] => Portuguese
[ru] => Russian
)

[theme] => Array
(
[bg] => Bulgarian
[cs] => Czech
[da] => Danish
[de] => German
)

[per_page] => 50
[panel_top_limit] => 10
[panel_top_time] => 5
[panel_top] => 1
[watched_status] => 1
[panel_overall] => 1
[panel_genre] => 1
[panel_year] => 1
[panel_country] => 1
[panel_v_codec] => 1
[panel_a_codec] => 1
[panel_a_chan] => 1
[show_fanart] => 1
[show_trailer] => 1
[protect_site] => 0
[token] =>
)

Command: print_r($_SESSION);, Output: Array
(
[site_name] => MovieLib
[language] => Array
(
[bg] => Bulgarian
[cs] => Czech
[da] => Danish
[de] => German
[en] => English
[es] => Spanish
[fr] => French
[hu] => Hungarian
[it] => Italian
[nl] => Dutch
[no] => Norwegian
[pl] => Polish
[pt] => Portuguese
[ru] => Russian
)

[theme] => Array
(
[bg] => Bulgarian
[cs] => Czech
[da] => Danish
[de] => German
)

[per_page] => 50
[panel_top_limit] => 10
[panel_top_time] => 5
[panel_top] => 1
[watched_status] => 1
[panel_overall] => 1
[panel_genre] => 1
[panel_year] => 1
[panel_country] => 1
[panel_v_codec] => 1
[panel_a_codec] => 1
[panel_a_chan] => 1
[show_fanart] => 1
[show_trailer] => 1
[protect_site] => 0
[token] =>
)


Warning: require(lang/Array/lang.php): failed to open stream: No such file or directory in /volume1/web/movielib2/index.php on line 36

Fatal error: require(): Failed opening required 'lang/Array/lang.php' (include_path='.:/usr/syno/php/lib/php') in /volume1/web/movielib2/index.php on line 36


As you can see, the problem is both happening with the language and the theme variable now. Apparently it does not like that a session variable shares name with another variable in the config file.. I don't understand why though, and i also dont understand why it only is a problem when you refresh the page.
Reply
 
Thread Rating:
  • 8 Vote(s) - 4.63 Average


Messages In This Thread
RE: MovieLib - Your movie database on web - by jannik1979 - 2014-01-18, 14:28
Last Post - by Jeffreywat - 2017-09-03, 14:02


Logout Mark Read Team Forum Stats Members Help
MovieLib - Your movie database on web4.638