我想为phpMyAdmin做贡献。我从Github克隆了代码,但它有config.sample.inc.php,缺少文件config.inc.php。我想有一些方法可以从设置中生成它,但我没有得到如何?如何自动生成该文件?我要手动完成吗?我怎样才能使用setup / index.php?
我的问题不同于:phpmyadmin is working fine but I can't find config.inc.php file?
因为它不询问如何生成该文件。
感谢您的帮助:)
使用安装脚本后生成的文件是:
<br />
<b>Notice</b>: Undefined index: user in <b>C:\xampp\phpmyadmin\libraries\Console.php</b> on line <b>129</b><br />
<!DOCTYPE HTML><html lang='en' dir='ltr'><head><meta charset="utf-8" /><meta name="referrer" content="no-referrer" /><meta name="robots" content="noindex,nofollow" /><meta http-equiv="X-UA-Compatible" content="IE=Edge" /><style id="cfs-style">html{display: none;}</style><link rel="icon" href="favicon.ico" type="image/x-icon" /><link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /><link rel="stylesheet" type="text/css" href="./themes/pmahomme/jquery/jquery-ui.css" /><link rel="stylesheet" type="text/css" href="js/codemirror/lib/codemirror.css?v=4.8.0-dev" /><link rel="stylesheet" type="text/css" href="js/codemirror/addon/hint/show-hint.css?v=4.8.0-dev" /><link rel="stylesheet" type="text/css" href="js/codemirror/addon/lint/lint.css?v=4.8.0-dev" /><link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?nocache=2979123735ltr" /><link rel="stylesheet" type="text/css" href="./themes/pmahomme/css/printview.css?v=4.8.0-dev" media="print" id="printcss"/><title>phpMyAdmin</title><script data-cfasync="false" type="text/javascript" src="js/get_scripts.js.php?scripts%5B%5D=jquery/jquery.min.js&scripts%5B%5D=jquery/jquery-migrate-3.0.0.js&scripts%5B%5D=sprintf.js&scripts%5B%5D=ajax.js&scripts%5B%5D=keyhandler.js&scripts%5B%5D=jquery/jquery-ui.min.js&scripts%5B%5D=jquery/jquery.cookie.js&scripts%5B%5D=jquery/jquery.mousewheel.js&scripts%5B%5D=jquery/jquery.event.drag-2.2.js&scripts%5B%5D=jquery/jquery-ui-timepicker-addon.js&v=4.8.0-dev"></script><script data-cfasync="false" type="text/javascript" src="js/get_scripts.js.php?scripts%5B%5D=jquery/jquery.ba-hashchange-1.3.js&scripts%5B%5D=jquery/jquery.debounce-1.0.5.js&scripts%5B%5D=menu-resizer.js&scripts%5B%5D=cross_framing_protection.js&scripts%5B%5D=rte.js&scripts%5B%5D=tracekit/tracekit.js&scripts%5B%5D=error_report.js&scripts%5B%5D=config.js&scripts%5B%5D=doclinks.js&scripts%5B%5D=functions.js&v=4.8.0-dev"></script><script data-cfasync="false" type="text/javascript" src="js/get_scripts.js.php?scripts%5B%5D=navigation.js&scripts%5B%5D=indexes.js&scripts%5B%5D=common.js&scripts%5B%5D=page_settings.js&scripts%5B%5D=shortcuts_handler.js&scripts%5B%5D=codemirror/lib/codemirror.js&scripts%5B%5D=codemirror/mode/sql/sql.js&scripts%5B%5D=codemirror/addon/runmode/runmode.js&scripts%5B%5D=codemirror/addon/hint/show-hint.js&scripts%5B%5D=codemirror/addon/hint/sql-hint.js&v=4.8.0-dev"></script><script data-cfasync="false" type="text/javascript" src="js/get_scripts.js.php?scripts%5B%5D=codemirror/addon/lint/lint.js&scripts%5B%5D=codemirror/addon/lint/sql-lint.js&scripts%5B%5D=console.js&v=4.8.0-dev"></script><script data-cfasync='false' type='text/javascript' src='js/whitelist.php?lang=en&db=&v=4.8.0-dev'></script><script data-cfasync='false' type='text/javascript' src='js/messages.php?lang=en&db=&v=4.8.0-dev'></script><script data-cfasync='false' type='text/javascript' src='js/get_image.js.php?theme=pmahomme&v=4.8.0-dev'></script><script data-cfasync="false" type="text/javascript">// <![CDATA[
PMA_commonParams.setAll({common_query:"",opendb_url:"db_structure.php",collation_connection:"utf8mb4_general_ci",lang:"en",server:"0",table:"",db:"",token:"06461bce34a3afc4ea2bb89c1386e917",text_dir:"ltr",show_databases_navigation_as_tree:"1",pma_text_default_tab:"Browse",pma_text_left_default_tab:"Structure",pma_text_left_default_tab2:"",LimitChars:"50",pftext:"",confirm:"1",LoginCookieValidity:"1440",session_gc_maxlifetime:"1440",logged_in:"",PMA_VERSION:"4.8.0-dev"});
ConsoleEnterExecutes=false
AJAX.scriptHandler.add("jquery/jquery.min.js",0).add("jquery/jquery-migrate-3.0.0.js",0).add("whitelist.php?lang=en&db=",1).add("sprintf.js",1).add("ajax.js",0).add("keyhandler.js",1).add("jquery/jquery-ui.min.js",0).add("jquery/jquery.cookie.js",0).add("jquery/jquery.mousewheel.js",0).add("jquery/jquery.event.drag-2.2.js",0).add("jquery/jquery-ui-timepicker-addon.js",0).add("jquery/jquery.ba-hashchange-1.3.js",0).add("jquery/jquery.debounce-1.0.5.js",0).add("menu-resizer.js",1).add("cross_framing_protection.js",0).add("rte.js",1).add("tracekit/tracekit.js",1).add("error_report.js",1).add("messages.php?lang=en&db=",0).add("get_image.js.php?theme=pmahomme",0).add("config.js",1).add("doclinks.js",1).add("functions.js",1).add("navigation.js",1).add("indexes.js",1).add("common.js",1).add("page_settings.js",1).add("shortcuts_handler.js",1).add("codemirror/lib/codemirror.js",0).add("codemirror/mode/sql/sql.js",0).add("codemirror/addon/runmode/runmode.js",0).add("codemirror/addon/hint/show-hint.js",0).add("codemirror/addon/hint/sql-hint.js",0).add("codemirror/addon/lint/lint.js",0).add("codemirror/addon/lint/sql-lint.js",0).add("console.js",1);
$(function() {AJAX.fireOnload("whitelist.php?lang=en&db=");AJAX.fireOnload("sprintf.js");AJAX.fireOnload("keyhandler.js");AJAX.fireOnload("menu-resizer.js");AJAX.fireOnload("rte.js");AJAX.fireOnload("tracekit/tracekit.js");AJAX.fireOnload("error_report.js");AJAX.fireOnload("config.js");AJAX.fireOnload("doclinks.js");AJAX.fireOnload("functions.js");AJAX.fireOnload("navigation.js");AJAX.fireOnload("indexes.js");AJAX.fireOnload("common.js");AJAX.fireOnload("page_settings.js");AJAX.fireOnload("shortcuts_handler.js");AJAX.fireOnload("console.js");});
// ]]></script><noscript><style>html{display:block}</style></noscript></head><body><noscript><div class="error"><img src="themes/dot.gif" title="" alt="" class="icon ic_s_error" /> Javascript must be enabled past this point!</div></noscript><div id="pma_console_container">
<div id="pma_console">
<!-- Console toolbar -->
<div class="toolbar collapsed">
<div class="switch_button console_switch">
<img src="themes/dot.gif" title="SQL Query Console" alt="SQL Query Console" class="icon ic_console" /> <span> Console </span>
</div>
<div class="button clear">
<span> Clear </span>
</div>
<div class="button history">
<span> History </span>
</div>
<div class="button options">
<span> Options </span>
</div>
<div class="button bookmarks">
<span> Bookmarks </span>
</div>
<div class="button debug hide">
<span> Debug SQL </span>
</div>
</div>
<!-- Toolbar end -->
<!-- Console messages -->
<div class="content">
<div class="console_message_container">
<div class="message welcome">
<span id="instructions-0">
Press Ctrl+Enter to execute query </span>
<span class="hide" id="instructions-1">
Press Enter to execute query </span>
</div>
</div> <!-- console_message_container -->
<div class="query_input">
<span class="console_query_input"></span>
</div>
</div> <!-- message end -->
<!-- Drak the console with other cards over it -->
<div class="mid_layer"></div>
<!-- Debug SQL card -->
<div class="card" id="debug_console">
<div class="toolbar ">
<div class="button order order_asc">
<span> ascending </span>
</div>
<div class="button order order_desc">
<span> descending </span>
</div>
<div class="text">
<span> Order: </span>
</div>
<div class="switch_button">
<span> Debug SQL </span>
</div>
<div class="button order_by sort_count">
<span> Count </span>
</div>
<div class="button order_by sort_exec">
<span> Execution order </span>
</div>
<div class="button order_by sort_time">
<span> Time taken </span>
</div>
<div class="text">
<span> Order by: </span>
</div>
<div class="button group_queries">
<span> Group queries </span>
</div>
<div class="button ungroup_queries">
<span> Ungroup queries </span>
</div>
</div>
<div class="content debug">
<div class="message welcome"></div>
<div class="debugLog"></div>
</div> <!-- Content -->
<div class="templates">
<div class="debug_query action_content">
<span class="action collapse">
Collapse </span>
<span class="action expand">
Expand </span>
<span class="action dbg_show_trace">
Show trace </span>
<span class="action dbg_hide_trace">
Hide trace </span>
<span class="text count hide">
Count : <span> </span>
</span>
<span class="text time">
Time taken : <span> </span>
</span>
</div>
</div> <!-- Template -->
</div> <!-- Debug SQL card -->
<!-- Options card: -->
<div class="card" id="pma_console_options">
<div class="toolbar ">
<div class="switch_button">
<span> Options </span>
</div>
<div class="button default">
<span> Set default </span>
</div>
</div>
<div class="content">
<label>
<input type="checkbox" name="always_expand">Always expand query messages </label>
<br>
<label>
<input type="checkbox" name="start_history">Show query history at start </label>
<br>
<label>
<input type="checkbox" name="current_query">Show current browsing query </label>
<br>
<label>
<input type="checkbox" name="enter_executes">
Execute queries on Enter and insert new line with Shift + Enter. To make this permanent, view settings. </label>
<br>
<label>
<input type="checkbox" name="dark_theme">Switch to dark theme </label>
<br>
</div>
</div> <!-- Options card -->
<div class="templates">
<!-- Templates for console message actions -->
<div class="query_actions">
<span class="action collapse">
Collapse </span>
<span class="action expand">
Expand </span>
<span class="action requery">
Requery </span>
<span class="action edit">
Edit </span>
<span class="action explain">
Explain </span>
<span class="action profiling">
Profiling </span>
<span class="action bookmark">
Bookmark </span>
<span class="text failed">
Query failed </span>
<span class="text targetdb">
Database : <span> </span>
</span>
<span class="text query_time">
Queried time : <span> </span>
</span>
</div>
</div>
</div> <!-- #console end -->
</div> <!-- #console_container end -->
<div id="page_content"><?php
/*
* Generated configuration file
* Generated by: phpMyAdmin 4.8.0-dev setup script
* Date: Wed, 15 Mar 2017 12:46:21 +0000
*/
$cfg['DefaultLang'] = 'en';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?></div><div id="selflink" class="print_ignore"><a href="config.php?db=&table=&server=0&target=" title="Open new phpMyAdmin window" target="_blank" rel="noopener noreferrer"><img src="themes/dot.gif" title="Open new phpMyAdmin window" alt="Open new phpMyAdmin window" class="icon ic_window-new" /></a></div><div class="clearfloat" id="pma_errors"></div><script data-cfasync="false" type="text/javascript">// <![CDATA[
var debugSQLInfo = 'null';
AJAX.scriptHandler;
$(function() {});
// ]]></script></body></html>
我不知道为什么这个文件中有html代码?我犯了一些错误吗?