IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

EDI, CMS, Outils, Scripts et API PHP Discussion :

problème de connexion phpMyAdmin


Sujet :

EDI, CMS, Outils, Scripts et API PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Administrateur de base de données
    Inscrit en
    Décembre 2013
    Messages
    21
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : Administrateur de base de données
    Secteur : Services de proximité

    Informations forums :
    Inscription : Décembre 2013
    Messages : 21
    Par défaut problème de connexion phpMyAdmin
    bonjour a tous,

    Quand j'essai de me connecter a phpmyadmin, je me retrouve a avoir :

    Warning in .\libraries\session.inc.php#101
    session_start(): open(C:\inetpub\wwwroot\tmp\sess_kqip4u8urvrt7v0igprfcjidki4vpj47, O_RDWR) failed: Permission denied (13)

    Backtrace

    .\libraries\session.inc.php#101: session_start()
    .\libraries\common.inc.php#350: require(.\libraries\session.inc.php)
    .\index.php#12: require_once(.\libraries\common.inc.php)

    Warning in .\libraries\session.inc.php#131
    session_regenerate_id(): open(C:\inetpub\wwwroot\tmp\sess_qp7gj9au378no4ga3bo5hmladhqmhstb, O_RDWR) failed: Permission denied (13)

    Backtrace

    .\libraries\session.inc.php#131: session_regenerate_id(boolean true)
    .\libraries\common.inc.php#878: PMA_secureSession()
    .\index.php#12: require_once(.\libraries\common.inc.php)

    Catchable Fatal Error in .\libraries\session.inc.php#131
    session_regenerate_id(): Failed to create(read) session ID: files (path: C:\inetpub\wwwroot\tmp)

    Backtrace

    .\libraries\session.inc.php#131: session_regenerate_id(boolean true)
    .\libraries\common.inc.php#878: PMA_secureSession()
    .\index.php#12: require_once(.\libraries\common.inc.php)
    session.inc.php :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    <?php
    /* vim: set expandtab sw=4 ts=4 sts=4: */
    /**
     * session handling
     *
     * @todo    add failover or warn if sessions are not configured properly
     * @todo    add an option to use mm-module for session handler
     *
     * @package PhpMyAdmin
     * @see     http://www.php.net/session
     */
    if (! defined('PHPMYADMIN')) {
        exit;
    }
     
    // verify if PHP supports session, die if it does not
     
    if (!@function_exists('session_name')) {
        PMA_warnMissingExtension('session', true);
    } elseif (ini_get('session.auto_start') !== '' && session_name() != 'phpMyAdmin') {
        // Do not delete the existing session, it might be used by other
        // applications; instead just close it.
        session_write_close();
    }
     
    // disable starting of sessions before all settings are done
    // does not work, besides how it is written in php manual
    //ini_set('session.auto_start', '0');
     
    // session cookie settings
    session_set_cookie_params(
        0, $GLOBALS['PMA_Config']->getCookiePath(),
        '', $GLOBALS['PMA_Config']->isHttps(), true
    );
     
    // cookies are safer (use @ini_set() in case this function is disabled)
    @ini_set('session.use_cookies', 'true');
     
    // optionally set session_save_path
    $path = $GLOBALS['PMA_Config']->get('SessionSavePath');
    if (!empty($path)) {
        session_save_path($path);
    }
     
    // but not all user allow cookies
    @ini_set('session.use_only_cookies', 'false');
    // do not force transparent session ids, see bug #3398788
    //@ini_set('session.use_trans_sid', 'true');
    @ini_set(
        'url_rewriter.tags',
        'a=href,frame=src,input=src,form=fakeentry,fieldset='
    );
    //ini_set('arg_separator.output', '&amp;');
     
    // delete session/cookies when browser is closed
    @ini_set('session.cookie_lifetime', '0');
     
    // warn but don't work with bug
    @ini_set('session.bug_compat_42', 'false');
    @ini_set('session.bug_compat_warn', 'true');
     
    // use more secure session ids
    @ini_set('session.hash_function', '1');
     
    // some pages (e.g. stylesheet) may be cached on clients, but not in shared
    // proxy servers
    session_cache_limiter('private');
     
    // start the session
    // on some servers (for example, sourceforge.net), we get a permission error
    // on the session data directory, so I add some "@"
     
    // See bug #1538132. This would block normal behavior on a cluster
    //ini_set('session.save_handler', 'files');
     
    $session_name = 'phpMyAdmin';
    @session_name($session_name);
     
    if (! isset($_COOKIE[$session_name])) {
        // on first start of session we check for errors
        // f.e. session dir cannot be accessed - session file not created
        $orig_error_count = $GLOBALS['error_handler']->countErrors();
        $session_result = session_start();
        if ($session_result !== true
            || $orig_error_count != $GLOBALS['error_handler']->countErrors()
        ) {
            setcookie($session_name, '', 1);
            /*
             * Session initialization is done before selecting language, so we
             * can not use translations here.
             */
            PMA_fatalError(
                'Error during session start; please check your PHP and/or '
                . 'webserver log file and configure your PHP '
                . 'installation properly. Also ensure that cookies are enabled '
                . 'in your browser.'
            );
        }
        unset($orig_error_count, $session_result);
    } else {
        session_start();
    }
     
    /**
     * Disable setting of session cookies for further session_start() calls.
     */
    @ini_set('session.use_cookies', 'true');
     
    /**
     * Token which is used for authenticating access queries.
     * (we use "space PMA_token space" to prevent overwriting)
     */
    if (! isset($_SESSION[' PMA_token '])) {
        $_SESSION[' PMA_token '] = md5(uniqid(rand(), true));
    }
     
    /**
     * tries to secure session from hijacking and fixation
     * should be called before login and after successful login
     * (only required if sensitive information stored in session)
     *
     * @return void
     */
    function PMA_secureSession()
    {
        // prevent session fixation and XSS
        // (better to use session_status() if available)
        if ((PMA_PHP_INT_VERSION >= 50400 && session_status() === PHP_SESSION_ACTIVE)
            || (PMA_PHP_INT_VERSION < 50400 && session_id() !== '')
        ) {
            session_regenerate_id(true);
        }
        $_SESSION[' PMA_token '] = md5(uniqid(rand(), true));
    }
    common.inc.php :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    1068
    1069
    1070
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
    1081
    1082
    1083
    1084
    1085
    1086
    1087
    1088
    1089
    1090
    1091
    1092
    1093
    1094
    1095
    1096
    1097
    1098
    1099
    1100
    1101
    1102
    1103
    1104
    1105
    1106
    1107
    1108
    1109
    1110
    1111
    1112
    1113
    1114
    1115
    1116
    1117
    1118
    1119
    1120
    1121
    1122
    1123
    1124
    1125
    1126
    1127
    1128
    1129
    1130
    1131
    1132
    1133
    1134
    1135
    1136
    1137
    1138
    1139
    1140
    1141
    1142
    1143
    1144
    1145
    1146
    1147
    1148
    1149
    1150
    1151
    1152
    1153
    1154
    1155
    1156
    1157
    1158
    1159
    1160
    1161
    1162
    1163
    1164
    1165
    1166
    1167
    1168
    1169
    1170
    1171
    1172
    1173
    1174
    1175
    1176
    1177
    1178
    1179
    1180
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
    1191
    1192
    1193
    1194
    1195
    1196
    1197
    1198
    1199
    1200
    1201
    1202
    1203
    1204
    1205
    1206
    1207
    1208
    1209
    1210
    1211
    1212
    1213
    1214
    1215
    1216
    1217
    1218
    1219
    1220
    1221
    1222
    1223
    1224
    1225
    1226
    1227
    1228
    1229
    1230
    1231
    1232
    1233
    1234
    1235
    1236
    1237
    1238
    1239
    1240
    1241
    1242
    1243
    1244
    1245
    1246
    1247
    1248
    1249
    1250
    <?php
    /* vim: set expandtab sw=4 ts=4 sts=4: */
    /**
     * Misc stuff and REQUIRED by ALL the scripts.
     * MUST be included by every script
     *
     * Among other things, it contains the advanced authentication work.
     *
     * Order of sections for common.inc.php:
     *
     * the authentication libraries must be before the connection to db
     *
     * ... so the required order is:
     *
     * LABEL_variables_init
     *  - initialize some variables always needed
     * LABEL_parsing_config_file
     *  - parsing of the configuration file
     * LABEL_loading_language_file
     *  - loading language file
     * LABEL_setup_servers
     *  - check and setup configured servers
     * LABEL_theme_setup
     *  - setting up themes
     *
     * - load of MySQL extension (if necessary)
     * - loading of an authentication library
     * - db connection
     * - authentication work
     *
     * @package PhpMyAdmin
     */
    
    /**
     * block attempts to directly run this script
     */
    if (getcwd() == dirname(__FILE__)) {
        die('Attack stopped');
    }
    
    /**
     * Minimum PHP version; can't call PMA_fatalError() which uses a
     * PHP 5 function, so cannot easily localize this message.
     */
    if (version_compare(PHP_VERSION, '5.5.0', 'lt')) {
        die('PHP 5.5+ is required');
    }
    
    /**
     * for verification in all procedural scripts under libraries
     */
    define('PHPMYADMIN', true);
    
    
    /**
     * String handling (security)
     */
    require_once './libraries/String.class.php';
    $PMA_String = new PMA_String();
    
    /**
     * the error handler
     */
    require './libraries/Error_Handler.class.php';
    
    /**
     * initialize the error handler
     */
    $GLOBALS['error_handler'] = new PMA_Error_Handler();
    
    /**
     * This setting was removed in PHP 5.4. But at this point PMA_PHP_INT_VERSION
     * is not yet defined so we use another way to find out the PHP version.
     */
    if (version_compare(phpversion(), '5.4', 'lt')) {
        /**
         * Avoid problems with magic_quotes_runtime
         */
        @ini_set('magic_quotes_runtime', 'false');
    }
    
    /**
     * core functions
     */
    require './libraries/core.lib.php';
    
    /**
     * Input sanitizing
     */
    require './libraries/sanitizing.lib.php';
    
    /**
     * Warning about mbstring.
     */
    if (! function_exists('mb_detect_encoding')) {
        PMA_warnMissingExtension('mbstring', $fatal = true);
    }
    
    /**
     * the PMA_Theme class
     */
    require './libraries/Theme.class.php';
    
    /**
     * the PMA_Theme_Manager class
     */
    require './libraries/Theme_Manager.class.php';
    
    /**
     * the PMA_Config class
     */
    require './libraries/Config.class.php';
    
    /**
     * the relation lib, tracker needs it
     */
    require './libraries/relation.lib.php';
    
    /**
     * the PMA_Tracker class
     */
    require './libraries/Tracker.class.php';
    
    /**
     * the PMA_Table class
     */
    require './libraries/Table.class.php';
    
    /**
     * the PMA_Types class
     */
    require './libraries/Types.class.php';
    
    if (! defined('PMA_MINIMUM_COMMON')) {
        /**
         * common functions
         */
        include_once './libraries/Util.class.php';
    
        /**
         * JavaScript escaping.
         */
        include_once './libraries/js_escape.lib.php';
    
        /**
         * Include URL/hidden inputs generating.
         */
        include_once './libraries/url_generating.lib.php';
    
        /**
         * Used to generate the page
         */
        include_once 'libraries/Response.class.php';
    }
    
    /******************************************************************************/
    /* start procedural code                       label_start_procedural         */
    
    /**
     * PATH_INFO could be compromised if set, so remove it from PHP_SELF
     * and provide a clean PHP_SELF here
     */
    $PMA_PHP_SELF = PMA_getenv('PHP_SELF');
    $_PATH_INFO = PMA_getenv('PATH_INFO');
    if (! empty($_PATH_INFO) && ! empty($PMA_PHP_SELF)) {
        $path_info_pos = /*overload*/mb_strrpos($PMA_PHP_SELF, $_PATH_INFO);
        $pathLength = $path_info_pos + /*overload*/mb_strlen($_PATH_INFO);
        if ($pathLength === /*overload*/mb_strlen($PMA_PHP_SELF)) {
            $PMA_PHP_SELF = /*overload*/mb_substr($PMA_PHP_SELF, 0, $path_info_pos);
        }
    }
    $PMA_PHP_SELF = htmlspecialchars($PMA_PHP_SELF);
    
    
    /**
     * just to be sure there was no import (registering) before here
     * we empty the global space (but avoid unsetting $variables_list
     * and $key in the foreach (), we still need them!)
     */
    $variables_whitelist = array (
        'GLOBALS',
        '_SERVER',
        '_GET',
        '_POST',
        '_REQUEST',
        '_FILES',
        '_ENV',
        '_COOKIE',
        '_SESSION',
        'error_handler',
        'PMA_PHP_SELF',
        'variables_whitelist',
        'key',
        'PMA_String'
    );
    
    foreach (get_defined_vars() as $key => $value) {
        if (! in_array($key, $variables_whitelist)) {
            unset($$key);
        }
    }
    unset($key, $value, $variables_whitelist);
    
    
    /**
     * Subforms - some functions need to be called by form, cause of the limited URL
     * length, but if this functions inside another form you cannot just open a new
     * form - so phpMyAdmin uses 'arrays' inside this form
     *
     * <code>
     * <form ...>
     * ... main form elements ...
     * <input type="hidden" name="subform[action1][id]" value="1" />
     * ... other subform data ...
     * <input type="submit" name="usesubform[action1]" value="do action1" />
     * ... other subforms ...
     * <input type="hidden" name="subform[actionX][id]" value="X" />
     * ... other subform data ...
     * <input type="submit" name="usesubform[actionX]" value="do actionX" />
     * ... main form elements ...
     * <input type="submit" name="main_action" value="submit form" />
     * </form>
     * </code>
     *
     * so we now check if a subform is submitted
     */
    $__redirect = null;
    if (isset($_POST['usesubform'])) {
        // if a subform is present and should be used
        // the rest of the form is deprecated
        $subform_id = key($_POST['usesubform']);
        $subform    = $_POST['subform'][$subform_id];
        $_POST      = $subform;
        $_REQUEST   = $subform;
        /**
         * some subforms need another page than the main form, so we will just
         * include this page at the end of this script - we use $__redirect to
         * track this
         */
        if (isset($_POST['redirect'])
            && $_POST['redirect'] != basename($PMA_PHP_SELF)
        ) {
            $__redirect = $_POST['redirect'];
            unset($_POST['redirect']);
        }
        unset($subform_id, $subform);
    } else {
        // Note: here we overwrite $_REQUEST so that it does not contain cookies,
        // because another application for the same domain could have set
        // a cookie (with a compatible path) that overrides a variable
        // we expect from GET or POST.
        // We'll refer to cookies explicitly with the $_COOKIE syntax.
        $_REQUEST = array_merge($_GET, $_POST);
    }
    // end check if a subform is submitted
    
    /**
     * This setting was removed in PHP 5.4, but get_magic_quotes_gpc
     * always returns False since then.
     */
    if (get_magic_quotes_gpc()) {
        PMA_arrayWalkRecursive($_GET, 'stripslashes', true);
        PMA_arrayWalkRecursive($_POST, 'stripslashes', true);
        PMA_arrayWalkRecursive($_COOKIE, 'stripslashes', true);
        PMA_arrayWalkRecursive($_REQUEST, 'stripslashes', true);
    }
    
    /**
     * check timezone setting
     * this could produce an E_STRICT - but only once,
     * if not done here it will produce E_STRICT on every date/time function
     * (starting with PHP 5.3, this code can produce E_WARNING rather than
     *  E_STRICT)
     *
     */
    date_default_timezone_set(@date_default_timezone_get());
    
    /******************************************************************************/
    /* parsing configuration file                  LABEL_parsing_config_file      */
    
    /**
     * We really need this one!
     */
    if (! function_exists('preg_replace')) {
        PMA_warnMissingExtension('pcre', true);
    }
    
    /**
     * JSON is required in several places.
     */
    if (! function_exists('json_encode')) {
        PMA_warnMissingExtension('json', true);
    }
    
    /**
     * @global PMA_Config $GLOBALS['PMA_Config']
     * force reading of config file, because we removed sensitive values
     * in the previous iteration
     */
    $GLOBALS['PMA_Config'] = new PMA_Config(CONFIG_FILE);
    
    if (!defined('PMA_MINIMUM_COMMON')) {
        $GLOBALS['PMA_Config']->checkPmaAbsoluteUri();
    }
    
    /**
     * BC - enable backward compatibility
     * exports all configuration settings into $GLOBALS ($GLOBALS['cfg'])
     */
    $GLOBALS['PMA_Config']->enableBc();
    
    /**
     * clean cookies on upgrade
     * when changing something related to PMA cookies, increment the cookie version
     */
    $pma_cookie_version = 4;
    if (isset($_COOKIE)) {
        if (! isset($_COOKIE['pmaCookieVer'])
            || $_COOKIE['pmaCookieVer'] != $pma_cookie_version
        ) {
            // delete all cookies
            foreach ($_COOKIE as $cookie_name => $tmp) {
                $GLOBALS['PMA_Config']->removeCookie($cookie_name);
            }
            $_COOKIE = array();
            $GLOBALS['PMA_Config']->setCookie('pmaCookieVer', $pma_cookie_version);
        }
    }
    
    
    /**
     * check HTTPS connection
     */
    if ($GLOBALS['PMA_Config']->get('ForceSSL')
        && ! $GLOBALS['PMA_Config']->detectHttps()
    ) {
        // grab SSL URL
        $url = $GLOBALS['PMA_Config']->getSSLUri();
        // Actually redirect
        PMA_sendHeaderLocation($url . PMA_URL_getCommon($_GET, 'text'));
        // delete the current session, otherwise we get problems (see bug #2397877)
        $GLOBALS['PMA_Config']->removeCookie($GLOBALS['session_name']);
        exit;
    }
    
    
    /**
     * include session handling after the globals, to prevent overwriting
     */
    require './libraries/session.inc.php';
    
    /**
     * init some variables LABEL_variables_init
     */
    
    /**
     * holds parameters to be passed to next page
     * @global array $GLOBALS['url_params']
     */
    $GLOBALS['url_params'] = array();
    
    /**
     * the whitelist for $GLOBALS['goto']
     * @global array $goto_whitelist
     */
    $goto_whitelist = array(
        //'browse_foreigners.php',
        //'changelog.php',
        //'chk_rel.php',
        'db_create.php',
        'db_datadict.php',
        'db_sql.php',
        'db_events.php',
        'db_export.php',
        'db_importdocsql.php',
        'db_qbe.php',
        'db_structure.php',
        'db_import.php',
        'db_operations.php',
        'db_search.php',
        'db_routines.php',
        'export.php',
        'import.php',
        //'index.php',
        //'navigation.php',
        //'license.php',
        'index.php',
        'pdf_pages.php',
        'pdf_schema.php',
        //'phpinfo.php',
        'server_binlog.php',
        'server_collations.php',
        'server_databases.php',
        'server_engines.php',
        'server_export.php',
        'server_import.php',
        'server_privileges.php',
        'server_sql.php',
        'server_status.php',
        'server_status_advisor.php',
        'server_status_monitor.php',
        'server_status_queries.php',
        'server_status_variables.php',
        'server_variables.php',
        'sql.php',
        'tbl_addfield.php',
        'tbl_change.php',
        'tbl_create.php',
        'tbl_import.php',
        'tbl_indexes.php',
        'tbl_sql.php',
        'tbl_export.php',
        'tbl_operations.php',
        'tbl_structure.php',
        'tbl_relation.php',
        'tbl_replace.php',
        'tbl_row_action.php',
        'tbl_select.php',
        'tbl_zoom_select.php',
        //'themes.php',
        'transformation_overview.php',
        'transformation_wrapper.php',
        'user_password.php',
    );
    
    /**
     * check $__redirect against whitelist
     */
    if (! PMA_checkPageValidity($__redirect, $goto_whitelist)) {
        $__redirect = null;
    }
    
    /**
     * holds page that should be displayed
     * @global string $GLOBALS['goto']
     */
    $GLOBALS['goto'] = '';
    // Security fix: disallow accessing serious server files via "?goto="
    if (PMA_checkPageValidity($_REQUEST['goto'], $goto_whitelist)) {
        $GLOBALS['goto'] = $_REQUEST['goto'];
        $GLOBALS['url_params']['goto'] = $_REQUEST['goto'];
    } else {
        unset($_REQUEST['goto'], $_GET['goto'], $_POST['goto'], $_COOKIE['goto']);
    }
    
    /**
     * returning page
     * @global string $GLOBALS['back']
     */
    if (PMA_checkPageValidity($_REQUEST['back'], $goto_whitelist)) {
        $GLOBALS['back'] = $_REQUEST['back'];
    } else {
        unset($_REQUEST['back'], $_GET['back'], $_POST['back'], $_COOKIE['back']);
    }
    
    /**
     * Check whether user supplied token is valid, if not remove any possibly
     * dangerous stuff from request.
     *
     * remember that some objects in the session with session_start and __wakeup()
     * could access this variables before we reach this point
     * f.e. PMA_Config: fontsize
     *
     * @todo variables should be handled by their respective owners (objects)
     * f.e. lang, server, collation_connection in PMA_Config
     */
    $token_mismatch = true;
    $token_provided = false;
    if (PMA_isValid($_REQUEST['token'])) {
        $token_provided = true;
        $token_mismatch = ($_SESSION[' PMA_token '] != $_REQUEST['token']);
    }
    
    if ($token_mismatch) {
        /**
         *  List of parameters which are allowed from unsafe source
         */
        $allow_list = array(
            /* needed for direct access, see FAQ 1.34
             * also, server needed for cookie login screen (multi-server)
             */
            'server', 'db', 'table', 'target', 'lang',
            /* Session ID */
            'phpMyAdmin',
            /* Cookie preferences */
            'pma_lang', 'pma_collation_connection',
            /* Possible login form */
            'pma_servername', 'pma_username', 'pma_password',
            'g-recaptcha-response',
            /* Needed to send the correct reply */
            'ajax_request',
            /* Permit to log out even if there is a token mismatch */
            'old_usr',
            /* Permit redirection with token-mismatch in url.php */
            'url',
            /* Permit session expiry flag */
            'session_expired',
            /* JS loading */
            'scripts', 'call_done'
        );
        /**
         * Allow changing themes in test/theme.php
         */
        if (defined('PMA_TEST_THEME')) {
            $allow_list[] = 'set_theme';
        }
        /**
         * Require cleanup functions
         */
        include './libraries/cleanup.lib.php';
        /**
         * Do actual cleanup
         */
        PMA_removeRequestVars($allow_list);
    
    }
    
    
    /**
     * current selected database
     * @global string $GLOBALS['db']
     */
    PMA_setGlobalDbOrTable('db');
    
    /**
     * current selected table
     * @global string $GLOBALS['table']
     */
    PMA_setGlobalDbOrTable('table');
    
    /**
     * Store currently selected recent table.
     * Affect $GLOBALS['db'] and $GLOBALS['table']
     */
    if (PMA_isValid($_REQUEST['selected_recent_table'])) {
        $recent_table = json_decode($_REQUEST['selected_recent_table'], true);
        $GLOBALS['db'] = $recent_table['db'];
        $GLOBALS['url_params']['db'] = $GLOBALS['db'];
        $GLOBALS['table'] = $recent_table['table'];
        $GLOBALS['url_params']['table'] = $GLOBALS['table'];
    }
    
    /**
     * SQL query to be executed
     * @global string $GLOBALS['sql_query']
     */
    $GLOBALS['sql_query'] = '';
    if (PMA_isValid($_REQUEST['sql_query'])) {
        $GLOBALS['sql_query'] = $_REQUEST['sql_query'];
    }
    
    //$_REQUEST['set_theme'] // checked later in this file LABEL_theme_setup
    //$_REQUEST['server']; // checked later in this file
    //$_REQUEST['lang'];   // checked by LABEL_loading_language_file
    
    /******************************************************************************/
    /* loading language file                       LABEL_loading_language_file    */
    
    /**
     * lang detection is done here
     */
    require './libraries/select_lang.lib.php';
    
    // Defines the cell alignment values depending on text direction
    if ($GLOBALS['text_dir'] == 'ltr') {
        $GLOBALS['cell_align_left']  = 'left';
        $GLOBALS['cell_align_right'] = 'right';
    } else {
        $GLOBALS['cell_align_left']  = 'right';
        $GLOBALS['cell_align_right'] = 'left';
    }
    
    /**
     * check for errors occurred while loading configuration
     * this check is done here after loading language files to present errors in locale
     */
    $GLOBALS['PMA_Config']->checkPermissions();
    
    if ($GLOBALS['PMA_Config']->error_config_file) {
        $error = '[strong]' . __('Failed to read configuration file!') . '[/strong]'
            . '[br][br]'
            . __(
                'This usually means there is a syntax error in it, '
                . 'please check any errors shown below.'
            )
            . '[br][br]'
            . '[conferr]';
        trigger_error($error, E_USER_ERROR);
    }
    if ($GLOBALS['PMA_Config']->error_config_default_file) {
        $error = sprintf(
            __('Could not load default configuration from: %1$s'),
            $GLOBALS['PMA_Config']->default_source
        );
        trigger_error($error, E_USER_ERROR);
    }
    if ($GLOBALS['PMA_Config']->error_pma_uri) {
        trigger_error(
            __(
                'The 
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    $cfg[\'PmaAbsoluteUri\']
    ' . ' directive MUST be set in your configuration file!' ), E_USER_ERROR ); } /******************************************************************************/ /* setup servers LABEL_setup_servers */ /** * current server * @global integer $GLOBALS['server'] */ $GLOBALS['server'] = 0; /** * Servers array fixups. * $default_server comes from PMA_Config::enableBc() * @todo merge into PMA_Config */ // Do we have some server? if (! isset($cfg['Servers']) || count($cfg['Servers']) == 0) { // No server => create one with defaults $cfg['Servers'] = array(1 => $default_server); } else { // We have server(s) => apply default configuration $new_servers = array(); foreach ($cfg['Servers'] as $server_index => $each_server) { // Detect wrong configuration if (!is_int($server_index) || $server_index < 1) { trigger_error( sprintf(__('Invalid server index: %s'), $server_index), E_USER_ERROR ); } $each_server = array_merge($default_server, $each_server); // Don't use servers with no hostname if ($each_server['connect_type'] == 'tcp' && empty($each_server['host'])) { trigger_error( sprintf( __( 'Invalid hostname for server %1$s. ' . 'Please review your configuration.' ), $server_index ), E_USER_ERROR ); } // Final solution to bug #582890 // If we are using a socket connection // and there is nothing in the verbose server name // or the host field, then generate a name for the server // in the form of "Server 2", localized of course! if ($each_server['connect_type'] == 'socket' && empty($each_server['host']) && empty($each_server['verbose']) ) { $each_server['verbose'] = sprintf(__('Server %d'), $server_index); } $new_servers[$server_index] = $each_server; } $cfg['Servers'] = $new_servers; unset($new_servers, $server_index, $each_server); } // Cleanup unset($default_server); /******************************************************************************/ /* setup themes LABEL_theme_setup */ /** * @global PMA_Theme_Manager $_SESSION['PMA_Theme_Manager'] */ if (! isset($_SESSION['PMA_Theme_Manager'])) { $_SESSION['PMA_Theme_Manager'] = new PMA_Theme_Manager; } else { /** * @todo move all __wakeup() functionality into session.inc.php */ $_SESSION['PMA_Theme_Manager']->checkConfig(); } // for the theme per server feature if (isset($_REQUEST['server']) && ! isset($_REQUEST['set_theme'])) { $GLOBALS['server'] = $_REQUEST['server']; $tmp = $_SESSION['PMA_Theme_Manager']->getThemeCookie(); if (empty($tmp)) { $tmp = $_SESSION['PMA_Theme_Manager']->theme_default; } $_SESSION['PMA_Theme_Manager']->setActiveTheme($tmp); unset($tmp); } /** * @todo move into PMA_Theme_Manager::__wakeup() */ if (isset($_REQUEST['set_theme'])) { // if user selected a theme $_SESSION['PMA_Theme_Manager']->setActiveTheme($_REQUEST['set_theme']); } /** * the theme object * @global PMA_Theme $_SESSION['PMA_Theme'] */ $_SESSION['PMA_Theme'] = $_SESSION['PMA_Theme_Manager']->theme; // BC /** * the active theme * @global string $GLOBALS['theme'] */ $GLOBALS['theme'] = $_SESSION['PMA_Theme']->getName(); /** * the theme path * @global string $GLOBALS['pmaThemePath'] */ $GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath(); /** * the theme image path * @global string $GLOBALS['pmaThemeImage'] */ $GLOBALS['pmaThemeImage'] = $_SESSION['PMA_Theme']->getImgPath(); /** * load layout file if exists */ if (@file_exists($_SESSION['PMA_Theme']->getLayoutFile())) { include $_SESSION['PMA_Theme']->getLayoutFile(); } if (! defined('PMA_MINIMUM_COMMON')) { /** * Character set conversion. */ include_once './libraries/charset_conversion.lib.php'; /** * Lookup server by name * (see FAQ 4.8) */ if (! empty($_REQUEST['server']) && is_string($_REQUEST['server']) && ! is_numeric($_REQUEST['server']) ) { foreach ($cfg['Servers'] as $i => $server) { $verboseToLower = /*overload*/mb_strtolower($server['verbose']); $serverToLower = /*overload*/mb_strtolower($_REQUEST['server']); if ($server['host'] == $_REQUEST['server'] || $server['verbose'] == $_REQUEST['server'] || $verboseToLower == $serverToLower || md5($verboseToLower) == $serverToLower ) { $_REQUEST['server'] = $i; break; } } if (is_string($_REQUEST['server'])) { unset($_REQUEST['server']); } unset($i); } /** * If no server is selected, make sure that $cfg['Server'] is empty (so * that nothing will work), and skip server authentication. * We do NOT exit here, but continue on without logging into any server. * This way, the welcome page will still come up (with no server info) and * present a choice of servers in the case that there are multiple servers * and '$cfg['ServerDefault'] = 0' is set. */ if (isset($_REQUEST['server']) && (is_string($_REQUEST['server']) || is_numeric($_REQUEST['server'])) && ! empty($_REQUEST['server']) && ! empty($cfg['Servers'][$_REQUEST['server']]) ) { $GLOBALS['server'] = $_REQUEST['server']; $cfg['Server'] = $cfg['Servers'][$GLOBALS['server']]; } else { if (!empty($cfg['Servers'][$cfg['ServerDefault']])) { $GLOBALS['server'] = $cfg['ServerDefault']; $cfg['Server'] = $cfg['Servers'][$GLOBALS['server']]; } else { $GLOBALS['server'] = 0; $cfg['Server'] = array(); } } $GLOBALS['url_params']['server'] = $GLOBALS['server']; /** * Kanji encoding convert feature appended by Y.Kawada (2002/2/20) */ if (function_exists('mb_convert_encoding') && $lang == 'ja' ) { include_once './libraries/kanji-encoding.lib.php'; } // end if /** * save some settings in cookies * @todo should be done in PMA_Config */ $GLOBALS['PMA_Config']->setCookie('pma_lang', $GLOBALS['lang']); if (isset($GLOBALS['collation_connection'])) { $GLOBALS['PMA_Config']->setCookie( 'pma_collation_connection', $GLOBALS['collation_connection'] ); } $_SESSION['PMA_Theme_Manager']->setThemeCookie(); if (! empty($cfg['Server'])) { /** * Loads the proper database interface for this server */ include_once './libraries/database_interface.inc.php'; include_once './libraries/logging.lib.php'; // get LoginCookieValidity from preferences cache // no generic solution for loading preferences from cache as some settings // need to be kept for processing in PMA_Config::loadUserPreferences() $cache_key = 'server_' . $GLOBALS['server']; if (isset($_SESSION['cache'][$cache_key]['userprefs']['LoginCookieValidity']) ) { $value = $_SESSION['cache'][$cache_key]['userprefs']['LoginCookieValidity']; $GLOBALS['PMA_Config']->set('LoginCookieValidity', $value); $GLOBALS['cfg']['LoginCookieValidity'] = $value; unset($value); } unset($cache_key); // Gets the authentication library that fits the $cfg['Server'] settings // and run authentication // to allow HTTP or http $cfg['Server']['auth_type'] = /*overload*/mb_strtolower($cfg['Server']['auth_type']); /** * the required auth type plugin */ $auth_class = "Authentication" . ucfirst($cfg['Server']['auth_type']); if (! file_exists( './libraries/plugins/auth/' . $auth_class . '.class.php' )) { PMA_fatalError( __('Invalid authentication method set in configuration:') . ' ' . $cfg['Server']['auth_type'] ); } if (isset($_REQUEST['pma_password'])) { $_REQUEST['pma_password'] = substr($_REQUEST['pma_password'], 0, 256); } include_once './libraries/plugins/auth/' . $auth_class . '.class.php'; // todo: add plugin manager $plugin_manager = null; /** @var AuthenticationPlugin $auth_plugin */ $auth_plugin = new $auth_class($plugin_manager); if (! $auth_plugin->authCheck()) { /* Force generating of new session on login */ if ($token_provided) { PMA_secureSession(); } $auth_plugin->auth(); } else { $auth_plugin->authSetUser(); } // Check IP-based Allow/Deny rules as soon as possible to reject the // user based on mod_access in Apache if (isset($cfg['Server']['AllowDeny']) && isset($cfg['Server']['AllowDeny']['order']) ) { /** * ip based access library */ include_once './libraries/ip_allow_deny.lib.php'; $allowDeny_forbidden = false; // default if ($cfg['Server']['AllowDeny']['order'] == 'allow,deny') { $allowDeny_forbidden = true; if (PMA_allowDeny('allow')) { $allowDeny_forbidden = false; } if (PMA_allowDeny('deny')) { $allowDeny_forbidden = true; } } elseif ($cfg['Server']['AllowDeny']['order'] == 'deny,allow') { if (PMA_allowDeny('deny')) { $allowDeny_forbidden = true; } if (PMA_allowDeny('allow')) { $allowDeny_forbidden = false; } } elseif ($cfg['Server']['AllowDeny']['order'] == 'explicit') { if (PMA_allowDeny('allow') && ! PMA_allowDeny('deny')) { $allowDeny_forbidden = false; } else { $allowDeny_forbidden = true; } } // end if ... elseif ... elseif // Ejects the user if banished if ($allowDeny_forbidden) { PMA_logUser($cfg['Server']['user'], 'allow-denied'); $auth_plugin->authFails(); } } // end if // is root allowed? if (! $cfg['Server']['AllowRoot'] && $cfg['Server']['user'] == 'root') { $allowDeny_forbidden = true; PMA_logUser($cfg['Server']['user'], 'root-denied'); $auth_plugin->authFails(); } // is a login without password allowed? if (! $cfg['Server']['AllowNoPassword'] && $cfg['Server']['password'] == '' ) { $login_without_password_is_forbidden = true; PMA_logUser($cfg['Server']['user'], 'empty-denied'); $auth_plugin->authFails(); } // if using TCP socket is not needed if (/*overload*/mb_strtolower($cfg['Server']['connect_type']) == 'tcp') { $cfg['Server']['socket'] = ''; } // Try to connect MySQL with the control user profile (will be used to // get the privileges list for the current user but the true user link // must be open after this one so it would be default one for all the // scripts) $controllink = false; if ($cfg['Server']['controluser'] != '') { if (! empty($cfg['Server']['controlhost']) || ! empty($cfg['Server']['controlport']) ) { $server_details = array(); if (! empty($cfg['Server']['controlhost'])) { $server_details['host'] = $cfg['Server']['controlhost']; } else { $server_details['host'] = $cfg['Server']['host']; } if (! empty($cfg['Server']['controlport'])) { $server_details['port'] = $cfg['Server']['controlport']; } elseif ($server_details['host'] == $cfg['Server']['host']) { // Evaluates to true when controlhost == host // or controlhost is not defined (hence it defaults to host) // In such case we can use the value of port. $server_details['port'] = $cfg['Server']['port']; } // otherwise we leave the $server_details['port'] unset, // allowing it to take default mysql port $controllink = $GLOBALS['dbi']->connect( $cfg['Server']['controluser'], $cfg['Server']['controlpass'], true, $server_details ); } else { $controllink = $GLOBALS['dbi']->connect( $cfg['Server']['controluser'], $cfg['Server']['controlpass'], true ); } } // Connects to the server (validates user's login) /** @var PMA_DatabaseInterface $userlink */ $userlink = $GLOBALS['dbi']->connect( $cfg['Server']['user'], $cfg['Server']['password'], false ); // Set timestamp for the session, if required. if ($cfg['Server']['SessionTimeZone'] != '') { $sql_query_tz = 'SET ' . PMA_Util::backquote('time_zone') . ' = ' . '\'' . PMA_Util::sqlAddSlashes($cfg['Server']['SessionTimeZone']) . '\''; if (! $userlink->query($sql_query_tz)) { $error_message_tz = sprintf( __( 'Unable to use timezone %1$s for server %2$d. ' . 'Please check your configuration setting for ' . '[em]$cfg[\'Servers\'][%3$d][\'SessionTimeZone\'][/em]. ' . 'phpMyAdmin is currently using the default time zone ' . 'of the database server.' ), $cfg['Servers'][$GLOBALS['server']]['SessionTimeZone'], $GLOBALS['server'], $GLOBALS['server'] ); $GLOBALS['error_handler']->addError( $error_message_tz, E_USER_WARNING, '', '', false ); } } if (! $controllink) { $controllink = $userlink; } $auth_plugin->storeUserCredentials(); /* Log success */ PMA_logUser($cfg['Server']['user']); if (PMA_MYSQL_INT_VERSION < $cfg['MysqlMinVersion']['internal']) { PMA_fatalError( __('You should upgrade to %s %s or later.'), array('MySQL', $cfg['MysqlMinVersion']['human']) ); } /** * Type handling object. */ if (PMA_DRIZZLE) { $GLOBALS['PMA_Types'] = new PMA_Types_Drizzle(); } else { $GLOBALS['PMA_Types'] = new PMA_Types_MySQL(); } if (PMA_DRIZZLE) { // DisableIS must be set to false for Drizzle, it maps SHOW commands // to INFORMATION_SCHEMA queries anyway so it's fast on large servers $cfg['Server']['DisableIS'] = false; // SHOW OPEN TABLES is not supported by Drizzle $cfg['SkipLockedTables'] = false; } /** * Charset information */ if (!PMA_DRIZZLE) { include_once './libraries/mysql_charsets.inc.php'; } if (!isset($mysql_charsets)) { $mysql_charsets = array(); $mysql_collations_flat = array(); } /** * Initializes the SQL parsing library. */ include_once SQL_PARSER_AUTOLOAD; // Loads closest context to this version. SqlParser\Context::loadClosest( (PMA_DRIZZLE ? 'Drizzle' : 'MySql') . PMA_MYSQL_INT_VERSION ); // Sets the default delimiter (if specified). if (!empty($_REQUEST['sql_delimiter'])) { SqlParser\Lexer::$DEFAULT_DELIMITER = $_REQUEST['sql_delimiter']; } // TODO: Set SQL modes too. /** * the PMA_List_Database class */ include_once './libraries/PMA.php'; $pma = new PMA; $pma->userlink = $userlink; $pma->controllink = $controllink; /** * some resetting has to be done when switching servers */ if (isset($_SESSION['tmpval']['previous_server']) && $_SESSION['tmpval']['previous_server'] != $GLOBALS['server'] ) { unset($_SESSION['tmpval']['navi_limit_offset']); } $_SESSION['tmpval']['previous_server'] = $GLOBALS['server']; } else { // end server connecting // No need to check for 'PMA_BYPASS_GET_INSTANCE' since this execution path // applies only to initial login $response = PMA_Response::getInstance(); $response->getHeader()->disableMenuAndConsole(); $response->getFooter()->setMinimal(); } /** * check if profiling was requested and remember it * (note: when $cfg['ServerDefault'] = 0, constant is not defined) */ if (isset($_REQUEST['profiling']) && PMA_Util::profilingSupported() ) { $_SESSION['profiling'] = true; } elseif (isset($_REQUEST['profiling_form'])) { // the checkbox was unchecked unset($_SESSION['profiling']); } // load user preferences $GLOBALS['PMA_Config']->loadUserPreferences(); /** * Inclusion of profiling scripts is needed on various * pages like sql, tbl_sql, db_sql, tbl_select */ if (! defined('PMA_BYPASS_GET_INSTANCE')) { $response = PMA_Response::getInstance(); } if (isset($_SESSION['profiling'])) { $header = $response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('jqplot/jquery.jqplot.js'); $scripts->addFile('jqplot/plugins/jqplot.pieRenderer.js'); $scripts->addFile('jqplot/plugins/jqplot.highlighter.js'); $scripts->addFile('canvg/canvg.js'); $scripts->addFile('jquery/jquery.tablesorter.js'); } /* * There is no point in even attempting to process * an ajax request if there is a token mismatch */ if (isset($response) && $response->isAjax() && $token_mismatch) { $response->isSuccess(false); $response->addJSON( 'message', PMA_Message::error(__('Error: Token mismatch')) ); exit; } } else { // end if !defined('PMA_MINIMUM_COMMON') // load user preferences $GLOBALS['PMA_Config']->loadUserPreferences(); } // remove sensitive values from session $GLOBALS['PMA_Config']->set('blowfish_secret', ''); $GLOBALS['PMA_Config']->set('Servers', ''); $GLOBALS['PMA_Config']->set('default_server', ''); /* Tell tracker that it can actually work */ PMA_Tracker::enable(); /** * @global boolean $GLOBALS['is_ajax_request'] * @todo should this be moved to the variables init section above? * * Check if the current request is an AJAX request, and set is_ajax_request * accordingly. Suppress headers, footers and unnecessary output if set to * true */ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { $GLOBALS['is_ajax_request'] = true; } else { $GLOBALS['is_ajax_request'] = false; } if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) { PMA_fatalError(__("GLOBALS overwrite attempt")); } /** * protect against possible exploits - there is no need to have so much variables */ if (count($_REQUEST) > 1000) { PMA_fatalError(__('possible exploit')); } /** * Check for numeric keys * (if register_globals is on, numeric key can be found in $GLOBALS) */ foreach ($GLOBALS as $key => $dummy) { if (is_numeric($key)) { PMA_fatalError(__('numeric key detected')); } } unset($dummy); // here, the function does not exist with this configuration: // $cfg['ServerDefault'] = 0; $GLOBALS['is_superuser'] = isset($GLOBALS['dbi']) && $GLOBALS['dbi']->isSuperuser(); if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) { /** * include subform target page */ include $__redirect; exit(); } // If Zero configuration mode enabled, check PMA tables in current db. if (! defined('PMA_MINIMUM_COMMON') && ! empty($GLOBALS['server']) && isset($GLOBALS['cfg']['ZeroConf']) && $GLOBALS['cfg']['ZeroConf'] == true ) { if (! empty($GLOBALS['db'])) { $cfgRelation = PMA_getRelationsParam(); if (empty($cfgRelation['db'])) { PMA_fixPMATables($GLOBALS['db'], false); } } $cfgRelation = PMA_getRelationsParam(); if (empty($cfgRelation['db'])) { foreach ($GLOBALS['pma']->databases as $database) { if ($database == 'phpmyadmin') { PMA_fixPMATables($database, false); } } } } if (! defined('PMA_MINIMUM_COMMON')) { include_once 'libraries/config/page_settings.class.php'; }

  2. #2
    Modérateur
    Avatar de sabotage
    Homme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    29 208
    Détails du profil
    Informations personnelles :
    Sexe : Homme

    Informations forums :
    Inscription : Juillet 2005
    Messages : 29 208
    Par défaut
    L'erreur est visible dés la deuxième ligne de toute ce que tu nous montres : il y a un problème de droits sur le repertoire des sessions.
    N'oubliez pas de consulter les FAQ PHP et les cours et tutoriels PHP

Discussions similaires

  1. Problème de connexion avec phpmyadmin sur serveur dédié.
    Par Xenonmax dans le forum Administration
    Réponses: 1
    Dernier message: 08/11/2011, 15h06
  2. [phpMyAdmin] Problème de connexion
    Par dodo91 dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 7
    Dernier message: 08/06/2009, 09h19
  3. [phpMyAdmin] Problème connexion phpMyAdmin
    Par Leeloe dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 2
    Dernier message: 04/05/2009, 09h55
  4. [phpMyAdmin] Problème de connexion sur BDD avec phpMyAdmin 2.8.0.2
    Par romca dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 3
    Dernier message: 21/03/2006, 14h35
  5. Problème de connexion à PhpMyAdmin avec mySQL 5.0.18
    Par RVI dans le forum Installation
    Réponses: 5
    Dernier message: 27/01/2006, 12h03

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo