2016-06-16 4 views
0

리눅스의 아파치 2 웹 서버에 phpmyadmin을 설치했는데 액세스하려고하면 아래와 같은 재미있는 코드가 표시됩니다. 내가 어떻게 처리 할 수 ​​있을까?우분투 phpmyadmin 설치 오류

addJSON ('list', PMA_RecentFavoriteTable :: getInstance ('recent') -> getHtmlList()); 출구; } ($ GLOBALS [ 'PMA_Config'] -> isGitRevision()) {if (isset ($ _REQUEST [ 'git_revision']) & & $ GLOBALS [ 'is_ajax_request'] == true) {PMA_printGitRevision(); 출구; } echo ' '; } // 호출하는 스크립트가 보낸 변수를 처리합니다 $ GLOBALS [ 'db'] = ''; $ GLOBALS [ 'table'] = ''; $ show_query = '1'; // 표시 할 메시지는 무엇입니까? if (! empty ($ message)) {echo PMA_Util :: getMessage ($ message); unset ($ message); } $ common_url_query = PMA_URL_getCommon(); $ mysql_cur_user_and_host = ''; // $ server> 0 일 때 ($ server> 0) {include 'libraries/server_common.inc.php'; // 모든 MySQL 관련 정보를 표시 할 수 있도록 서버가 선택되었습니다. 'libraries/StorageEngine.class.php'를 포함하십시오. // 값이 설정된 경우 호스트 이름 대신 서버의 상세 이름을 사용합니다. // $ server_info = ''; if (! empty ($ cfg [ 'Server'] [ 'verbose'])) {$ server_info. = htmlspecialchars ($ cfg [ 'Server'] [ 'verbose']); $ GLOBALS [ 'cfg'] [ 'ShowServerInfo'] | | 비어 있음 ($ cfg [ 'Server' ([cfg [ 'Server'] [ 'verbose']) & & $ GLOBALS [[서버]] [ '자세한 정보]]) {$ server_info = $ GLOBALS ['dbi '] -> getHostInfo() 'cfg'] [ 'ShowServerInfo']) {$ server_info. = ')'; } $ mysql_cur_user_and_host = $ GLOBALS [ 'dbi'] -> fetchValue ('SELECT USER();'); // 여기서 포트 정보를 추가해야합니까? $ GLOBALS [ 'cfg'] [ 'Server'] [ 'verbose'] : $ GLOBALS [ 'cfg'] $ short_server_info = (! GLOBALS [ ] [ 'Server'] [ 'host'])); } echo ' '. "\엔"; // 좋아하는 테이블 동기화를위한 앵커. echo PMA_RecentFavoriteTable :: getInstance ('favorite') -> getHtmlSyncFavoriteTables(); 에코 ' '; if ($ cfg [ 'DBG'] [ 'demo']) {echo ' '; if ($ server> 0 || count ($ cfg [ 'Servers']) 에코 ' '. __ ('phpMyAdmin Demo Server'). ' '; 에코 '

'; printf (__ ('데모 서버를 사용하고 있습니다. 여기서는 아무 것도 할 수 있지만'. 'root, debian-sys-maint 및 pma 사용자는 변경하지 마십시오.' '자세한 정보는 % s에서 사용 가능합니다.') , 'demo.phpmyadmin.net'); 에코 ' '; 에코 ' '; } echo ' '; 에코 ' '. __('일반 설정') . ' '; 에코 '

'; /** * Displays the MySQL servers choice form */ if ($cfg['ServerDefault'] == 0 || (! $cfg['NavigationDisplayServers'] && (count($cfg['Servers']) > 1 || ($server == 0 && count($cfg['Servers']) == 1)))) { echo ' 
'; include_once 'libraries/select_server.lib.php'; echo PMA_Util::getImage('s_host.png') . " " . PMA_selectServer(true, true); echo ' 
'; } /** * Displays the mysql server related links */ if ($server > 0 && ! PMA_DRIZZLE) { include_once 'libraries/check_user_privileges.lib.php'; // Logout for advanced authentication if ($cfg['Server']['auth_type'] != 'config') { if ($cfg['ShowChgPassword']) { $conditional_class = 'ajax'; PMA_printListItem(PMA_Util::getImage('s_passwd.png') . " " . __('Change password'), 'li_change_password', 'user_password.php' . $common_url_query, null, null, 'change_password_anchor', "no_bullets", $conditional_class); } } // end if echo ' 
'; echo ' 
' . "\n" . PMA_URL_getHiddenInputs(null, null, 4, 'collation_connection') . ' ' . "\n" . ' ' . PMA_Util::getImage('s_asci.png') . " " . __('Server connection collation') . "\n" // put the doc link in the form so that it appears on the same line . PMA_Util::showMySQLDocu('Charset-connection') . ': ' . "\n" . ' ' . "\n" . PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'collation_connection', 'select_collation_connection', $collation_connection, true, true) . ' 
' . "\n" . ' 
' . "\n"; } // end of if ($server > 0 && !PMA_DRIZZLE) echo ' 

'; 에코 ' '; } echo ' '; 에코 ' '. __ ('모양 설정'). ' '; 에코 '

'; // Displays language selection combo if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) { echo ' 
'; include_once 'libraries/display_select_lang.lib.php'; echo PMA_Util::getImage('s_lang.png') . " " . PMA_getLanguageSelectorHtml(); echo ' 
'; } // ThemeManager if available if ($GLOBALS['cfg']['ThemeManager']) { echo ' 
'; echo PMA_Util::getImage('s_theme.png') . " " . $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox(); echo ' 
'; } echo ' 
'; echo PMA_Config::getFontsizeForm(); echo ' 
'; echo ' 

'; // 사용자 환경 설정 if ($ server> 0) {echo '

'; PMA_printListItem(PMA_Util::getImage('b_tblops.png') . " " . __('More settings'), 'li_user_preferences', 'prefs_manage.php' . $common_url_query, null, null, null, "no_bullets"); echo ' 

'; } echo ' '; 에코 ' '; 에코 ' '; if ($ server> 0 & & $ GLOBALS [ 'cfg'] [ 'ShowServerInfo']) {echo ' '; 에코 ' '. __ ('데이터베이스 서버'). ' '; 에코 '

' . "\n"; PMA_printListItem(__('Server:') . ' ' . $server_info, 'li_server_info'); PMA_printListItem(__('Server type:') . ' ' . PMA_Util::getServerType(), 'li_server_type'); PMA_printListItem(__('Server version:') . ' ' . PMA_MYSQL_STR_VERSION . ' - ' . PMA_MYSQL_VERSION_COMMENT, 'li_server_version'); PMA_printListItem(__('Protocol version:') . ' ' . $GLOBALS['dbi']->getProtoInfo(), 'li_mysql_proto'); PMA_printListItem(__('User:') . ' ' . htmlspecialchars($mysql_cur_user_and_host), 'li_user_info'); echo ' 
'; echo ' ' . __('Server charset:') . ' ' . ' '; if (! PMA_DRIZZLE) { echo ' ' . $mysql_charsets_descriptions[$mysql_charset_map['utf-8']]; } echo ' (' . $mysql_charset_map['utf-8'] . ')' . ' ' . ' 
' . ' 

'. ' '; } if ($ GLOBALS [ 'cfg'] [ 'ShowServerInfo'] || $ GLOBALS [ 'cfg'] [ 'ShowPhpInfo']) {echo ' '; 에코 ' '. __('웹 서버') .' '; 에코 '

'; if ($GLOBALS['cfg']['ShowServerInfo']) { PMA_printListItem($_SERVER['SERVER_SOFTWARE'], 'li_web_server_software'); if ($server > 0) { $client_version_str = $GLOBALS['dbi']->getClientInfo(); if (preg_match('#\d+\.\d+\.\d+#', $client_version_str)) { $client_version_str = 'libmysql - ' . $client_version_str; } PMA_printListItem(__('Database client version:') . ' ' . $client_version_str, 'li_mysql_client_version'); $php_ext_string = __('PHP extension:') . ' '; if (PMA_DatabaseInterface::checkDbExtension('mysqli')) { $extension = 'mysqli'; } else { $extension = 'mysql'; } $php_ext_string .= $extension . ' ' . PMA_Util::showPHPDocu('book.' . $extension . '.php'); PMA_printListItem($php_ext_string, 'li_used_php_extension'); $php_version_string = __('PHP version:') . ' ' . phpversion(); PMA_printListItem($php_version_string, 'li_used_php_version'); } } if ($cfg['ShowPhpInfo']) { PMA_printListItem(__('Show PHP information'), 'li_phpinfo', 'phpinfo.php' . $common_url_query, null, '_blank'); } echo ' 

'; 에코 ' '; } echo ' '; echo ' phpMyAdmin '; 에코 '

'; $class = null; // We rely on CSP to allow access to http://www.phpmyadmin.net, but IE lacks // support here and does not allow request to http once using https. if ($GLOBALS['cfg']['VersionCheck'] && (! $GLOBALS['PMA_Config']->get('is_https') || PMA_USR_BROWSER_AGENT != 'IE')) { $class = 'jsversioncheck'; } PMA_printListItem(__('Version information:') . ' ' . PMA_VERSION . '', 'li_pma_version', null, null, null, null, $class); PMA_printListItem(__('Documentation'), 'li_pma_docs', PMA_Util::getDocuLink('index'), null, '_blank'); PMA_printListItem(__('Wiki'), 'li_pma_wiki', PMA_linkURL('http://wiki.phpmyadmin.net/'), null, '_blank'); // does not work if no target specified, don't know why PMA_printListItem(__('Official Homepage'), 'li_pma_homepage', PMA_linkURL('http://www.phpMyAdmin.net/'), null, '_blank'); PMA_printListItem(__('Contribute'), 'li_pma_contribute', PMA_linkURL('https://www.phpmyadmin.net/contribute/'), null, '_blank'); PMA_printListItem(__('Get support'), 'li_pma_support', PMA_linkURL('https://www.phpmyadmin.net/support/'), null, '_blank'); PMA_printListItem(__('List of changes'), 'li_pma_changes', 'changelog.php' . PMA_URL_getCommon(), null, '_blank'); echo ' 

'; 에코 ' '; 에코 ' '; 에코 ' ';/** * 기본 MySQL 권한있는 계정을 사용하는 경우 경고 */if ($ server! = 0 & & $ cfg [ 'Server'] [ 'user'] == '루트'& & $ cfg [ 'Server'] [ 'password'] == '') {trigger_error (__ ('패스워드없이 \'root \ '로 연결되어 있으며,'. '는 기본 MySQL 권한 계정에 해당합니다. 기본값은 '.'침입에 개방되어 있으므로이 보안 구멍을 '\'root \ '에 대한 암호를 설정하여 수정해야합니다.'), E_USER_WARNING); }/** * 문자 세트를 처리하려고 할 때 mbstring이 오버로드하여 버그 1063821을 참조하십시오. */if (@extension_loaded ('mbstring') & & @ini_get ('mbstring.func_overload')> {trigger_error (__ ('PHP'구성에서 mbstring.func_overload를 활성화했습니다.이 옵션은 phpMyAdmin '과 호환되지 않으며 일부 데이터가 손상 될 수 있습니다!'), E_USER_WARNING); }/** * mbstring은 파서의 멀티 바이트 처리에 사용되므로 아무런 문제가 없다고 사용자에게 알리는 것이 좋습니다. 버그 # 1063149를 참조하십시오. mbstring PHP 확장자를 찾을 수없고 멀티 바이트 문자셋을 사용하고있는 것 같습니다. mbstring 확장자가 없으면 phpMyAdmin '.'을 (를) 사용할 수 없습니다. */if (! @extension_loaded ('mbstring')) {trigger_error (__ 문자열을 올바르게 분할하면 '. 예상치 못한 결과가 발생할 수 있습니다.'), E_USER_WARNING); } if ($ cfg [ 'LoginCookieValidityDisableWarning'] == false) {/ ** * session.gc_maxlifetime이 세션의 유효 기간을 제한하는지 확인하십시오. */$ gc_time = (int) @ini_get ('session.gc_maxlifetime'); if ($ gc_time < $ GLOBALS [ 'cfg'] [ 'LoginCookieValidity']) {trigger_error (__ ('PHP 매개 변수 [a @http://php.net/manual/en/session.'. 'configuration.php#[email protected]_blank] 세션 '.'gc_maxlifetime [/ a]이 (가) phpMyAdmin의 '.'쿠키 유효성보다 낮 으면 로그인이 phpMyAdmin에서 구성된 것보다 '.'만료 될 수 있습니다. '), E_USER_WARNING); }}/** * LoginCookieStore에 의해 LoginCookieValidity가 제한되는지 확인하십시오.& $ GLOBALS [ 'cfg'] [ 'LoginCookieStore'] < $ GLOBALS [ 'cfg'] [ 'LoginCookieValidity'] {trigger_error (* __ ('로그인 쿠키 저장소가'. 'phpMyAdmin에 구성된 쿠키 유효 기간보다 낮 으면 로그인이 phpMyAdmin에서 구성된'. '보다 빨리 만료됩니다.'), E_USER_WARNING); }/** * 사용자가 복어의 비밀을 정의하지 않았고 사용 중인지 확인하십시오. ($ GLOBALS [ 'cfg'] [ 'blowfish_secret']) {trigger_error (__ ('구성 파일에 이제 비밀 암호 구문 (blowfish_secret)이 필요합니다. '), E_USER_WARNING); }/** * 프로덕션 환경에 존재해서는 안되는 config 디렉토리가 있는지 확인하십시오. 설치 스크립트에서 사용하는 if (file_exists ('config')) {trigger_error (__ ('Directory [code] config [/ code]'는 여전히 phpMyAdmin 디렉토리에 있습니다. 'phpMyAdmin이 설정되면 제거하는 것이 좋습니다.' '그렇지 않으면 권한이없는 사람들이 설정을 다운로드하여 서버 보안을 해칠 수 있습니다.'), E_USER_WARNING); } if ($ server> 0) {$ cfgRelation = PMA_getRelationsParam(); $ phpMyAdmin 구성 저장소가 완전히 구성되지 않았습니다. 일부 확장 기능이 비활성화되었습니다. '($ $ {$ PAGE}} '% s 이유가 무엇인지 알아보십시오.'); if ($ cfg [ 'ZeroConf'] == true) {$ msg_text. = ' '. __ ('또는'데이터베이스의 '작업 탭'으로 이동하여 '.'을 설정하십시오.'); } $ msg = PMA_Message :: notice ($ msg_text); $ msg-> addParam ('', false); $ msg-> addParam ('', false);/ 사용자가 뭔가를 구성한 경우 오류를 표시합니다. */if (! cfg [ 'Servers'] [$ server] [ 'pmadb']) {$ msg-> isError (true); } $ msg-> display(); } // end if}/** * 다른 MySQL 라이브러리 및 서버 버전에 대한 경고 * (세 번째 숫자의 차이는 계산되지 않음). * 언젠가 mysqlnd에 대해 확인할 수있는 상수가있는 경우 strpos() 대신 사용할 수 있습니다. * 기본 서버가 설정되지 않은 경우 $ GLOBALS [ 'dbi']가 아직 정의되지 않았습니다. * Drizzle이 MySQL 프로토콜을 사용할 수 있으므로, * Drizzle 서버의 버전 불일치에 대해 경고하지 마십시오. * MariaDB가 발견되면 자체 버전 * 번호 매기기가 있으므로 경고하지 않습니다. */IF (는 isset ($ GLOBALS [ 'DBI']) & &! PMA_DRIZZLE & & $의 CFG [ 'ServerLibraryDifference_DisableWarning'] == 거짓) {/ ** @var PMA_String pmaString * $/$ pmaString = $ GLOBALS [ 'PMA_String ']; $ _client_info = $ GLOBALS [ 'dbi'] -> getClientInfo(); 경우 ($ 서버> 0 & &/과부하/mb_strpos ($ _ CLIENT_INFO, 'mysqlnd') === 거짓 & &/과부하/mb_strpos (PMA_MYSQL_STR_VERSION, 'MariaDB') === 거짓 & & SUBSTR (PMA_MYSQL_CLIENT_API , 당신의 PHP MySQL 라이브러리 버전 % s는 MySQL 서버 버전 % s과 (이)가 다르다. 이것은 예측할 수없는 원인이 될 수있다. '(= 0, 3)! = substr (PMA_MYSQL_INT_VERSION, 0, 3)) {trigger_error (PMA_sanitize (sprintf (__ '동작'), $ _client_info, substr (PMA_MYSQL_STR_VERSION, 0, strpos (PMA_MYSQL_STR_VERSION. '-', '-')))), E_USER_NOTICE); } unset ($ _ client_info); 그 시뮬레이션 모드 */IF ($하여 cfg [ 'SuhosinDisableWarning'] == 거짓 & & @ini_get ('suhosin.request.max_value_length') & & @ini_get ('수호신을 사용할 수 없습니다 경우에만 수호신에 대한}/** * 경고 '% s') == '0') {trigger_error (sprintf (__ ('Suhosin으로 실행중인 서버. 가능한 문제에 대해서는 % sdocumentation % s'을 참조하십시오. '),'[doc @ faq1-38] ', '[/ doc]'), E_USER_WARNING); }/** * 불완전한 번역에 대한 경고. * * 데이터 파일은 ./scripts/remove-incomplete-mo /if (file_exists ('libraries/language_stats.inc.php')) {include 'libraries/language_stats.inc.php';/ *이 메시지는 의도적으로 번역되지 않았습니다. 여기서는 불완전한 번역을 처리하고 영어 사용자를 중점적으로 다루기 때문입니다.& $ GLOBALS [ 'language_stats'] [$ lang] < $ cfg [ 'translationWarningThreshold']) {trigger_error ('불완전한 번역을 사용하고 있습니다. , [a @https://www.phpmyadmin.net/translate/ '.'@_blank] 기여 [/ a]. ', E_USER_NOTICE)로 작성하면 도움이됩니다. }}/** * 기본 페이지의 목록 항목을 인쇄합니다. * @param string $ name 표시된 텍스트 * @param 문자열 $ listId id, CSS 스타일에 사용됩니다. * @param 문자열 $ url은 $ url을 대상으로 연결합니다. * @ param string $ mysql_help_page는 MySQL 매뉴얼에 대한 링크를 표시합니다. * @param string $ target $ target $ target에 대한 특별 타겟입니다. @param string $ a_id 앵커의 id입니다. * jQuery가 함수를 후킹하는 데 사용됩니다. * @param string li element * @param string 앵커 요소에 대한 $ a_class 클래스 * * @return void */function PMA_printListItem ($ name, $ listId = null, $ url = null, $ mysql_help_page = null, $ target = null, $ a_id = null, $ name, 'id'=> $ listId, 'class') ($ class = null, $ a_class = null) {PMA \ Template :: get ('list/item' $ a_id, 'class'=> $ a_class), 'mysql_help_page'=> $ class, 'url'=> 배열 ('href'=> $ url, 'target' > $ mysql_help_page,)); }

+1

나쁜 후, 추한 게시물 : / –

답변

1

PHP 서버가 있습니까? 이 코드는 모두 서버에 의해 해석되어야하며 Apache는이를 수행 할 수 없습니다.

당신이 당신의 PHP 버전을 확인하려면

:

php -v

또는 설치한다 : mysql을 (또는 다른 데이터베이스)를 설치하는 동안

sudo apt-get install php5 

일반적으로 사용자가 설치 한 PHP.

1

저는 리눅스 박하 18, PHP7에서 같은 문제가있었습니다.

패킷 설치를 해결 :

쉽다는 sudo 설치 PHP를 libapache2 - 모드 - PHP