执行php artisan storage:link后phpmyadmin无法正常显示
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 | resources\lang\zh\validation.php <?php return [ 'unique' => ':attribute 已存在' , 'accepted' => ':attribute 是被接受的' , 'active_url' => ':attribute 必须是一个合法的 URL' , 'after' => ':attribute 必须是 :date 之后的一个日期' , 'alpha' => ':attribute 必须全部由字母字符构成。' , 'alpha_dash' => ':attribute 必须全部由字母、数字、中划线或下划线字符构成' , 'alpha_num' => ':attribute 必须全部由字母和数字构成' , 'array' => ':attribute 必须是个数组' , 'before' => ':attribute 必须是 :date 之前的一个日期' , 'between' => [ 'numeric' => ':attribute 必须在 :min 到 :max 之间' , 'file' => ':attribute 必须在 :min 到 :max KB之间' , 'string' => ':attribute 必须在 :min 到 :max 个字符之间' , 'array' => ':attribute 必须在 :min 到 :max 项之间' , ], 'boolean' => ':attribute 字符必须是 true 或 false' , 'confirmed' => ':attribute 二次确认不匹配' , 'date' => ':attribute 必须是一个合法的日期' , 'date_format' => ':attribute 与给定的格式 :format 不符合' , 'different' => ':attribute 必须不同于:other' , 'digits' => ':attribute 必须是 :digits 位' , 'digits_between' => ':attribute 必须在 :min and :max 位之间' , 'email' => ':attribute 必须是一个合法的电子邮件地址。' , 'filled' => ':attribute 的字段是必填的' , 'exists' => '选定的 :attribute 是无效的' , 'image' => ':attribute 必须是一个图片 (jpeg, png, bmp 或者 gif)' , 'in' => '选定的 :attribute 是无效的' , 'integer' => ':attribute 必须是个整数' , 'ip' => ':attribute 必须是一个合法的 IP 地址。' , 'max' => [ 'numeric' => ':attribute 的最大长度为 :max 位' , 'file' => ':attribute 的最大为 :max' , 'string' => ':attribute 的最大长度为 :max 字符' , 'array' => ':attribute 的最大个数为 :max 个' , ], 'mimes' => ':attribute 的文件类型必须是:values' , 'min' => [ 'numeric' => ':attribute 的最小长度为 :min 位' , 'string' => ':attribute 的最小长度为 :min 字符' , 'file' => ':attribute 大小至少为:min KB' , 'array' => ':attribute 至少有 :min 项' , ], 'not_in' => '选定的 :attribute 是无效的' , 'numeric' => ':attribute 必须是数字' , 'regex' => ':attribute 格式是无效的' , 'required' => ':attribute 字段必须填写' , 'required_if' => ':attribute 字段是必须的当 :other 是 :value' , 'required_with' => ':attribute 字段是必须的当 :values 是存在的' , 'required_with_all' => ':attribute 字段是必须的当 :values 是存在的' , 'required_without' => ':attribute 字段是必须的当 :values 是不存在的' , 'required_without_all' => ':attribute 字段是必须的当 没有一个 :values 是存在的' , 'same' => ':attribute 和 :other 必须匹配' , 'size' => [ 'numeric' => ':attribute 必须是 :size 位' , 'file' => ':attribute 必须是 :size KB' , 'string' => ':attribute 必须是 :size 个字符' , 'array' => ':attribute 必须包括 :size 项' , ], 'url' => ':attribute 无效的格式' , 'timezone' => ':attribute 必须个有效的时区' , /* |-------------------------------------------------------------------------- | Custom Validation Language Lines |-------------------------------------------------------------------------- | | Here you may specify custom validation messages for attributes using the | convention "attribute.rule" to name the lines. This makes it quick to | specify a specific custom language line for a given attribute rule. | */ 'custom' => [ 'attribute-name' => [ 'rule-name' => 'custom-message' , ], ], /* |-------------------------------------------------------------------------- | Custom Validation Attributes |-------------------------------------------------------------------------- | | The following language lines are used to swap attribute place-holders | with something more reader friendly such as E-Mail Address instead | of "email". This simply helps us make messages a little cleaner. | */ 'attributes' => [ 'username' => '用户名' , 'account' => '账号' , 'captcha' => '验证码' , 'mobile' => '手机号' , 'password' => '密码' , 'content' => '内容' , 'identity' => '手机号/用户名' , ], ]; config/app.php <?php return [ /* |-------------------------------------------------------------------------- | Application Name |-------------------------------------------------------------------------- | | This value is the name of your application. This value is used when the | framework needs to place the application's name in a notification or | any other location as required by the application or its packages. | */ 'name' => env( 'APP_NAME' , 'Laravel' ), /* |-------------------------------------------------------------------------- | Application Environment |-------------------------------------------------------------------------- | | This value determines the "environment" your application is currently | running in. This may determine how you prefer to configure various | services your application utilizes. Set this in your ".env" file. | */ 'env' => env( 'APP_ENV' , 'production' ), /* |-------------------------------------------------------------------------- | Application Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with | stack traces will be shown on every error that occurs within your | application. If disabled, a simple generic error page is shown. | */ 'debug' => env( 'APP_DEBUG' , false), /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => env( 'APP_URL' , 'http://localhost' ), /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */ 'timezone' => 'Asia/Shanghai' , /* |-------------------------------------------------------------------------- | Application Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used | by the translation service provider. You are free to set this value | to any of the locales which will be supported by the application. | */ 'locale' => 'zh' , /* |-------------------------------------------------------------------------- | Application Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application. | */ 'fallback_locale' => 'en' , /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | */ 'key' => env( 'APP_KEY' ), 'cipher' => 'AES-256-CBC' , /* |-------------------------------------------------------------------------- | Autoloaded Service Providers |-------------------------------------------------------------------------- | | The service providers listed here will be automatically loaded on the | request to your application. Feel free to add your own services to | this array to grant expanded functionality to your applications. | */ 'providers' => [ /* * Laravel Framework Service Providers... */ Illuminate\Auth\AuthServiceProvider:: class , Illuminate\Broadcasting\BroadcastServiceProvider:: class , Illuminate\Bus\BusServiceProvider:: class , Illuminate\Cache\CacheServiceProvider:: class , Illuminate\Foundation\Providers\ConsoleSupportServiceProvider:: class , Illuminate\Cookie\CookieServiceProvider:: class , Illuminate\Database\DatabaseServiceProvider:: class , Illuminate\Encryption\EncryptionServiceProvider:: class , Illuminate\Filesystem\FilesystemServiceProvider:: class , Illuminate\Foundation\Providers\FoundationServiceProvider:: class , Illuminate\Hashing\HashServiceProvider:: class , Illuminate\Mail\MailServiceProvider:: class , Illuminate\Notifications\NotificationServiceProvider:: class , Illuminate\Pagination\PaginationServiceProvider:: class , Illuminate\Pipeline\PipelineServiceProvider:: class , Illuminate\Queue\QueueServiceProvider:: class , Illuminate\Redis\RedisServiceProvider:: class , Illuminate\Auth\Passwords\PasswordResetServiceProvider:: class , Illuminate\Session\SessionServiceProvider:: class , Illuminate\Translation\TranslationServiceProvider:: class , Illuminate\Validation\ValidationServiceProvider:: class , Illuminate\View\ViewServiceProvider:: class , /* * Package Service Providers... */ /* * Application Service Providers... */ App\Providers\AppServiceProvider:: class , App\Providers\AuthServiceProvider:: class , // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider:: class , App\Providers\RouteServiceProvider:: class , ], /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to register as many as you wish as | the aliases are "lazy" loaded so they don't hinder performance. | */ 'aliases' => [ 'App' => Illuminate\Support\Facades\App:: class , 'Artisan' => Illuminate\Support\Facades\Artisan:: class , 'Auth' => Illuminate\Support\Facades\Auth:: class , 'Blade' => Illuminate\Support\Facades\Blade:: class , 'Broadcast' => Illuminate\Support\Facades\Broadcast:: class , 'Bus' => Illuminate\Support\Facades\Bus:: class , 'Cache' => Illuminate\Support\Facades\Cache:: class , 'Config' => Illuminate\Support\Facades\Config:: class , 'Cookie' => Illuminate\Support\Facades\Cookie:: class , 'Crypt' => Illuminate\Support\Facades\Crypt:: class , 'DB' => Illuminate\Support\Facades\DB:: class , 'Eloquent' => Illuminate\Database\Eloquent\Model:: class , 'Event' => Illuminate\Support\Facades\Event:: class , 'File' => Illuminate\Support\Facades\File:: class , 'Gate' => Illuminate\Support\Facades\Gate:: class , 'Hash' => Illuminate\Support\Facades\Hash:: class , 'Lang' => Illuminate\Support\Facades\Lang:: class , 'Log' => Illuminate\Support\Facades\Log:: class , 'Mail' => Illuminate\Support\Facades\Mail:: class , 'Notification' => Illuminate\Support\Facades\Notification:: class , 'Password' => Illuminate\Support\Facades\Password:: class , 'Queue' => Illuminate\Support\Facades\Queue:: class , 'Redirect' => Illuminate\Support\Facades\Redirect:: class , 'Redis' => Illuminate\Support\Facades\Redis:: class , 'Request' => Illuminate\Support\Facades\Request:: class , 'Response' => Illuminate\Support\Facades\Response:: class , 'Route' => Illuminate\Support\Facades\Route:: class , 'Schema' => Illuminate\Support\Facades\Schema:: class , 'Session' => Illuminate\Support\Facades\Session:: class , 'Storage' => Illuminate\Support\Facades\Storage:: class , 'URL' => Illuminate\Support\Facades\URL:: class , 'Validator' => Illuminate\Support\Facades\Validator:: class , 'View' => Illuminate\Support\Facades\View:: class , ], ]; common.inc.php <?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 */ use PhpMyAdmin\Config; use PhpMyAdmin\Core; use PhpMyAdmin\DatabaseInterface; use PhpMyAdmin\ErrorHandler; use PhpMyAdmin\LanguageManager; use PhpMyAdmin\Logging; use PhpMyAdmin\Message; use PhpMyAdmin\Plugins\AuthenticationPlugin; use PhpMyAdmin\Response; use PhpMyAdmin\Session; use PhpMyAdmin\ThemeManager; use PhpMyAdmin\Tracker; use PhpMyAdmin\Util; /** * block attempts to directly run this script */ if ( getcwd () == dirname( __FILE__ )) { die ( 'Attack stopped' ); } /** * Minimum PHP version; can't call Core::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. <br /> Currently installed version is: ' . phpversion() ); } /** * for verification in all procedural scripts under libraries */ define( 'PHPMYADMIN' , true); /** * Load vendor configuration. */ require_once './libraries/vendor_config.php' ; /** * Load hash polyfill. */ require_once './libraries/hash.lib.php' ; /** * Activate autoloader */ if (! @ is_readable (AUTOLOAD_FILE)) { die ( 'File <tt>' . AUTOLOAD_FILE . '</tt> missing or not readable. <br />' . 'Most likely you did not run Composer to ' . '<a href="https://docs.phpmyadmin.net/en/latest/setup.html#installing-from-git">install library files</a>.' ); } require_once AUTOLOAD_FILE; /** * Load gettext functions. */ PhpMyAdmin\MoTranslator\Loader::loadFunctions(); /** * initialize the error handler */ $GLOBALS [ 'error_handler' ] = new ErrorHandler(); /** * Warning about missing PHP extensions. */ Core::checkExtensions(); /** * Configure required PHP settings. */ Core::configure(); /******************************************************************************/ /* start procedural code label_start_procedural */ Core::cleanupPathInfo(); /******************************************************************************/ /* parsing configuration file LABEL_parsing_config_file */ /** * @global Config $GLOBALS['PMA_Config'] * force reading of config file, because we removed sensitive values * in the previous iteration */ $GLOBALS [ 'PMA_Config' ] = new Config(CONFIG_FILE); /** * include session handling after the globals, to prevent overwriting */ if (! defined( 'PMA_NO_SESSION' )) { Session::setUp( $GLOBALS [ 'PMA_Config' ], $GLOBALS [ 'error_handler' ]); } /** * init some variables LABEL_variables_init */ /** * holds parameters to be passed to next page * @global array $GLOBALS['url_params'] */ $GLOBALS [ 'url_params' ] = array (); /** * holds page that should be displayed * @global string $GLOBALS['goto'] */ $GLOBALS [ 'goto' ] = '' ; // Security fix: disallow accessing serious server files via "?goto=" if (Core::checkPageValidity( $_REQUEST [ 'goto' ])) { $GLOBALS [ 'goto' ] = $_REQUEST [ 'goto' ]; $GLOBALS [ 'url_params' ][ 'goto' ] = $_REQUEST [ 'goto' ]; } else { $GLOBALS [ 'PMA_Config' ]->removeCookie( 'goto' ); unset( $_REQUEST [ 'goto' ], $_GET [ 'goto' ], $_POST [ 'goto' ]); } /** * returning page * @global string $GLOBALS['back'] */ if (Core::checkPageValidity( $_REQUEST [ 'back' ])) { $GLOBALS [ 'back' ] = $_REQUEST [ 'back' ]; } else { $GLOBALS [ 'PMA_Config' ]->removeCookie( 'back' ); unset( $_REQUEST [ 'back' ], $_GET [ 'back' ], $_POST [ '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. PhpMyAdmin\Config: fontsize * * Check for token mismatch only if the Request method is POST * GET Requests would never have token and therefore checking * mis-match does not make sense * * @todo variables should be handled by their respective owners (objects) * f.e. lang, server in PhpMyAdmin\Config */ $token_mismatch = true; $token_provided = false; if ( $_SERVER [ 'REQUEST_METHOD' ] == 'POST' ) { if (Core::isValid( $_POST [ 'token' ])) { $token_provided = true; $token_mismatch = ! @hash_equals( $_SESSION [ ' PMA_token ' ], $_POST [ 'token' ]); } if ( $token_mismatch ) { /* Warn in case the mismatch is result of failed setting of session cookie */ if (isset( $_POST [ 'set_session' ]) && $_POST [ 'set_session' ] != session_id()) { trigger_error( __( 'Failed to set session cookie. Maybe you are using ' . 'HTTP instead of HTTPS to access phpMyAdmin.' ), E_USER_ERROR ); } /** * We don't allow any POST operation parameters if the token is mismatched * or is not provided */ $whitelist = array ( 'ajax_request' ); PhpMyAdmin\Sanitize::removeRequestVars( $whitelist ); } } /** * current selected database * @global string $GLOBALS['db'] */ Core::setGlobalDbOrTable( 'db' ); /** * current selected table * @global string $GLOBALS['table'] */ Core::setGlobalDbOrTable( 'table' ); /** * Store currently selected recent table. * Affect $GLOBALS['db'] and $GLOBALS['table'] */ if (Core::isValid( $_REQUEST [ 'selected_recent_table' ])) { $recent_table = json_decode( $_REQUEST [ 'selected_recent_table' ], true); $GLOBALS [ 'db' ] = ( array_key_exists ( 'db' , $recent_table ) && is_string ( $recent_table [ 'db' ])) ? $recent_table [ 'db' ] : '' ; $GLOBALS [ 'url_params' ][ 'db' ] = $GLOBALS [ 'db' ]; $GLOBALS [ 'table' ] = ( array_key_exists ( 'table' , $recent_table ) && is_string ( $recent_table [ 'table' ])) ? $recent_table [ 'table' ] : '' ; $GLOBALS [ 'url_params' ][ 'table' ] = $GLOBALS [ 'table' ]; } /** * SQL query to be executed * @global string $GLOBALS['sql_query'] */ $GLOBALS [ 'sql_query' ] = '' ; if (Core::isValid( $_POST [ 'sql_query' ])) { $GLOBALS [ 'sql_query' ] = $_POST [ '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 */ $language = LanguageManager::getInstance()->selectLanguage(); $language ->activate(); /** * 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(); $GLOBALS [ 'PMA_Config' ]->checkErrors(); /* Check server configuration */ Core::checkConfiguration(); /* Check request for possible attacks */ Core::checkRequest(); /******************************************************************************/ /* setup servers LABEL_setup_servers */ $GLOBALS [ 'PMA_Config' ]->checkServers(); /** * current server * @global integer $GLOBALS['server'] */ $GLOBALS [ 'server' ] = $GLOBALS [ 'PMA_Config' ]->selectServer(); $GLOBALS [ 'url_params' ][ 'server' ] = $GLOBALS [ 'server' ]; /** * BC - enable backward compatibility * exports all configuration settings into $GLOBALS ($GLOBALS['cfg']) */ $GLOBALS [ 'PMA_Config' ]->enableBc(); /******************************************************************************/ /* setup themes LABEL_theme_setup */ ThemeManager::initializeTheme(); if (! defined( 'PMA_MINIMUM_COMMON' )) { /** * save some settings in cookies * @todo should be done in PhpMyAdmin\Config */ $GLOBALS [ 'PMA_Config' ]->setCookie( 'pma_lang' , $GLOBALS [ 'lang' ]); ThemeManager::getInstance()->setThemeCookie(); if (! empty ( $cfg [ 'Server' ])) { /** * Loads the proper database interface for this server */ DatabaseInterface::load(); // get LoginCookieValidity from preferences cache // no generic solution for loading preferences from cache as some settings // need to be kept for processing in // PhpMyAdmin\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 /** * the required auth type plugin */ $auth_class = 'PhpMyAdmin\\Plugins\\Auth\\Authentication' . ucfirst( strtolower ( $cfg [ 'Server' ][ 'auth_type' ])); if (! @ class_exists ( $auth_class )) { Core::fatalError( __( 'Invalid authentication method set in configuration:' ) . ' ' . $cfg [ 'Server' ][ 'auth_type' ] ); } if (isset( $_POST [ 'pma_password' ]) && strlen ( $_POST [ 'pma_password' ]) > 256) { $_POST [ 'pma_password' ] = substr ( $_POST [ 'pma_password' ], 0, 256); } $auth_plugin = new $auth_class (); $auth_plugin ->authenticate(); // 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' ] != '' ) { $controllink = $GLOBALS [ 'dbi' ]->connect( DatabaseInterface::CONNECT_CONTROL ); } // Connects to the server (validates user's login) /** @var DatabaseInterface $userlink */ $userlink = $GLOBALS [ 'dbi' ]->connect(DatabaseInterface::CONNECT_USER); if ( $userlink === false) { $auth_plugin ->showFailure( 'mysql-denied' ); } if (! $controllink ) { /* * Open separate connection for control queries, this is needed * to avoid problems with table locking used in main connection * and phpMyAdmin issuing queries to configuration storage, which * is not locked by that time. */ $controllink = $GLOBALS [ 'dbi' ]->connect( DatabaseInterface::CONNECT_USER, null, DatabaseInterface::CONNECT_CONTROL ); } $auth_plugin ->rememberCredentials(); $auth_plugin ->checkTwoFactor(); /* Log success */ Logging::logUser( $cfg [ 'Server' ][ 'user' ]); if ( $GLOBALS [ 'dbi' ]->getVersion() < $cfg [ 'MysqlMinVersion' ][ 'internal' ]) { Core::fatalError( __( 'You should upgrade to %s %s or later.' ), array ( 'MySQL' , $cfg [ 'MysqlMinVersion' ][ 'human' ]) ); } // Sets the default delimiter (if specified). if (! empty ( $_REQUEST [ 'sql_delimiter' ])) { PhpMyAdmin\SqlParser\Lexer:: $DEFAULT_DELIMITER = $_REQUEST [ 'sql_delimiter' ]; } // TODO: Set SQL modes too. } else { // end server connecting $response = 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' ]) && Util::profilingSupported() ) { $_SESSION [ 'profiling' ] = true; } elseif (isset( $_REQUEST [ 'profiling_form' ])) { // the checkbox was unchecked unset( $_SESSION [ 'profiling' ]); } /** * Inclusion of profiling scripts is needed on various * pages like sql, tbl_sql, db_sql, tbl_select */ $response = Response::getInstance(); if (isset( $_SESSION [ 'profiling' ])) { $scripts = $response ->getHeader()->getScripts(); $scripts ->addFile( 'chart.js' ); $scripts ->addFile( 'vendor/jqplot/jquery.jqplot.js' ); $scripts ->addFile( 'vendor/jqplot/plugins/jqplot.pieRenderer.js' ); $scripts ->addFile( 'vendor/jqplot/plugins/jqplot.highlighter.js' ); $scripts ->addFile( 'vendor/jquery/jquery.tablesorter.js' ); } /* * There is no point in even attempting to process * an ajax request if there is a token mismatch */ if ( $response ->isAjax() && $_SERVER [ 'REQUEST_METHOD' ] == 'POST' && $token_mismatch ) { $response ->setRequestStatus(false); $response ->addJSON( 'message' , Message::error(__( 'Error: Token mismatch' )) ); exit ; } } // load user preferences $GLOBALS [ 'PMA_Config' ]->loadUserPreferences(); /* Tell tracker that it can actually work */ Tracker::enable(); if (! defined( 'PMA_MINIMUM_COMMON' ) && ! empty ( $GLOBALS [ 'server' ]) && isset( $GLOBALS [ 'cfg' ][ 'ZeroConf' ]) && $GLOBALS [ 'cfg' ][ 'ZeroConf' ] == true ) { $GLOBALS [ 'dbi' ]->postConnectControl(); } |
已经用php artisan config:clear清理过缓存
28
收起
正在回答 回答被采纳积分+1
3回答
PHP典型功能与Laravel5框架开发
- 参与学习 人
- 解答问题 721 个
掌握开发中必备技能解锁缓存、支付,邮件和短信发送等高端接口运用,直击工作重难点,通过开发简书项目熟练掌握Laravel5的开发技术。完成以上三个阶段的学习,成为满足企业需求的开发工程师。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧