sometimes i get: PHP Notice: Undefined index: js_frame in D:\HTdocs\07PMA\PmaTrunkSvn\phpmyadmin.css.php on line 793 and also some ppl in IRC and in the help-trk e.g.: https://sourceforge.net/forum/message.php?msg_id=4210686
complained about css not being loaded in the right frame.
So any "if(isset($_REQUEST['js_frame']))" is needed here and in pma 2.10 as well.
Logged In: YES
user_id=1383652
Originator: YES
q&d fix from <FazzeL> on IRC (last line in phpmyadmin):
change $_SESSION['PMA_Theme_Manager']->printCss($_REQUEST['js_frame']);
to $_SESSION['PMA_Theme_Manager']->printCss(_JSF);
and at the top add: define('_JSF',(isset($_REQUEST['js_frame']) ? $_REQUEST['js_frame'] : ''));
Logged In: YES
user_id=210714
Originator: NO
I believe you but is there a sure way to reproduce this PHP notice?
Logged In: YES
user_id=1383652
Originator: YES
>I believe you but is there a sure way to reproduce this PHP notice?
if i knew i'd told you ;)
but apparently you can't rely on $_REQUEST['js_frame'] being set.
Logged In: YES
user_id=326580
Originator: NO
if required, use:
$_REQUEST['js_frame'] = PMA_ifSetOr($_REQUEST['js_frame'], '');
as this is an 'all time' variable it should be applied in common.inc.php (like all the other all time variables too: db, table, sql_query, ...)
Logged In: YES
user_id=210714
Originator: NO
Sebastian,
PMA_ifSetOr() is not there in 2.10.x I think.
Logged In: YES
user_id=326580
Originator: NO
:-/ ... than:
if (! isset($_REQUEST['js_frame']) || ! is_string($_REQUEST['js_frame'])) {
$_REQUEST['js_frame'] = '';
}
Logged In: YES
user_id=210714
Originator: NO
Ok, I merged the ifSetOr patch in trunk and I'll merge the other one later today.
Logged In: YES
user_id=32013
Originator: NO
>I believe you but is there a sure way to reproduce this PHP notice?
I know this has been fixed, but in case you are interested in the real cause, here is some additional information caught by my error handler.
The error occurred at 2007-06-01 13:21.
The URL was https://myserver/pma/css/phpmyadmin.css.php?token=c967ac81682922f0a1f0ecee886a8d90&js_frame=right&nocache=1180696895
Here are the interesting parts of $HTTP_SESSION_VARS (I have removed parts that I though were not important):
$HTTP_SESSION_VARS = Array (
[ PMA_token ] => f6323aae25629d9ead653cb7aa854e7a
[PMA_Config] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => PMA_Config
[default_source] => ./libraries/config.default.php
[settings] => Array (
[PmaAbsoluteUri] => https://myserver/pma/
[PmaNoRelation_DisableWarning] =>
[ServerDefault] => 1
[ForceSSL] =>
[ExecTimeLimit] => 30
[MemoryLimit] => 0
[SkipLockedTables] => 1
[LoginCookieRecall] => 1
[LoginCookieValidity] => 1800
[LoginCookieStore] => 0
[LoginCookieDeleteAll] => 1
[UseDbSearch] => 1
[IgnoreMultiSubmitErrors] =>
[VerboseMultiSubmit] => 1
[AllowArbitraryServer] =>
[LeftFrameLight] => 1
[LeftFrameDBTree] => 1
[LeftFrameDBSeparator] => _
[LeftFrameTableSeparator] => __
[LeftFrameTableLevel] => 1
[LeftDisplayServers] =>
[DisplayServersList] =>
[DisplayDatabasesList] =>
[ShowBlob] => 1
[NavigationBarIconic] => both
[ShowAll] =>
[MaxRows] => 50
[Order] => ASC
[source] => ./config.inc.php
[source_mtime] => 1173954903 // 2007-03-15T11:35:03+01:00
[default_source_mtime] => 1173092025 // 2007-03-05T11:53:45+01:00
[set_mtime] => 1180696895 // 2007-06-01T13:21:35+02:00
...
)
[PMA_Theme_Manager] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => PMA_Theme_Manager
[_themes_path] => ./themes
[themes] => Array (
[darkblue_orange] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => PMA_Theme
[version] => 2.9
[name] => Darkblue/orange
[id] => darkblue_orange
[path] => ./themes/darkblue_orange
[img_path] => ./themes/darkblue_orange/img/
[types] => Array (
[0] => left
[1] => right
[2] => print
)
[mtime_info] => 1173092008 // 2007-03-05T11:53:28+01:00
)
[original] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => PMA_Theme
[version] => 2.9
[name] => Original
[id] => original
[path] => ./themes/original
[img_path] => ./themes/original/img/
[types] => Array (
[0] => left
[1] => right
[2] => print
)
[mtime_info] => 1173092010 //2007-03-05T11:53:30+01:00
)
)
[cookie_name] => pma_theme
[per_server] =>
[active_theme] => original
[theme] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => PMA_Theme
[version] => 2.9
[name] => Original
[id] => original
[path] => ./themes/original
[img_path] => ./themes/original/img/
[types] => Array (
[0] => left
[1] => right
[2] => print
)
[mtime_info] => 1173092010 //2007-03-05T11:53:30+01:00
)
[theme_default] => original
)
[PMA_Theme] => __PHP_Incomplete_Class Object (
[__PHP_Incomplete_Class_Name] => PMA_Theme
[version] => 2.9
[name] => Original
[id] => original
[path] => ./themes/original
[img_path] => ./themes/original/img/
[types] => Array (
[0] => left
[1] => right
[2] => print
)
[mtime_info] => 1173092010 // 2007-03-05T11:53:30+01:00
)
)
Notice that $HTTP_SESSION_VARS[" PMA_token "] differs from the one specified in the URL. This causes js_frame to be removed from $_REQUEST, because it is not mentioned in the call to PMA_remove_request_vars() from libraries/common.lib.php.
Logged In: YES
user_id=210714
Originator: NO
Thanks Christian. I guess, now we need to find out why a new token is generated?
Logged In: YES
user_id=32013
Originator: NO
I think this is problem is caused by a bug in PHP: http://bugs.php.net/bug.php?id=35602
Due to reasons that I don't understand, this bug is closed as WONTFIX :-(
The problem may occur when you have an frameset loaded for a long time and your session expires, i.e. its lifetime exceeds session.gc_maxlifetime. In the next pageload, $_SESSION[' PMA_token '] is set, but at the end of the request the session is garbage collected, so that $_SESSION[' PMA_token '] is no longer there when the stylesheet is loaded.
The workaround suggested in the PHP bug report is to disable the built-in garbage collection and manually wipe the directory. This is probably not the best solution for phpMyAdmin. I guess the problem could be solved in code by saving the session lifetime to $_SESSION and then manually checking whether the session has expired. Perhaps someone has come up with a better alternative?