Guest User

Untitled

a guest
Jun 23rd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.34 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5. /**
  6. * Debian local configuration file
  7. *
  8. * This file overrides the settings made by phpMyAdmin interactive setup
  9. * utility.
  10. *
  11. * For example configuration see
  12. * /usr/share/doc/phpmyadmin/examples/config.sample.inc.php
  13. * or
  14. * /usr/share/doc/phpmyadmin/examples/config.manyhosts.inc.php
  15. *
  16. * NOTE: do not add security sensitive data to this file (like passwords)
  17. * unless you really know what you're doing. If you do, any user that can
  18. * run PHP or CGI on your webserver will be able to read them. If you still
  19. * want to do this, make sure to properly secure the access to this file
  20. * (also on the filesystem level).
  21. */
  22.  
  23. if (!function_exists('check_file_access')) {
  24. function check_file_access($path)
  25. {
  26. if (is_readable($path)) {
  27. return true;
  28. } else {
  29. error_log(
  30. 'phpmyadmin: Failed to load ' . $path
  31. . ' Check group www-data has read access and open_basedir restrictions.'
  32. );
  33. return false;
  34. }
  35. }
  36. }
  37.  
  38. // Load secret generated on postinst
  39. if (check_file_access('/var/lib/phpmyadmin/blowfish_secret.inc.php')) {
  40. require('/var/lib/phpmyadmin/blowfish_secret.inc.php');
  41. }
  42.  
  43. // Load autoconf local config
  44. if (check_file_access('/var/lib/phpmyadmin/config.inc.php')) {
  45. require('/var/lib/phpmyadmin/config.inc.php');
  46. }
  47.  
  48. /**
  49. * Server(s) configuration
  50. */
  51. $i = 0;
  52. // The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
  53. // You can disable a server config entry by setting host to ''.
  54. $i++;
  55.  
  56. /**
  57. * Read configuration from dbconfig-common
  58. * You can regenerate it using: dpkg-reconfigure -plow phpmyadmin
  59. */
  60. if (check_file_access('/etc/phpmyadmin/config-db.php')) {
  61. // require('/etc/phpmyadmin/config-db.php');
  62. }
  63.  
  64. $dbuser='root';
  65. $dbpass='';
  66. $basepath='';
  67. $dbname='phpmyadmin';
  68. $dbserver='localhost';
  69. $dbport='3306';
  70. $dbtype='mysql';
  71.  
  72.  
  73. /* Configure according to dbconfig-common if enabled */
  74. if (!empty($dbname)) {
  75. /* Authentication type */
  76. $cfg['Servers'][$i]['auth_type'] = 'cookie';
  77. /* Server parameters */
  78. if (empty($dbserver)) $dbserver = 'localhost';
  79. $cfg['Servers'][$i]['host'] = $dbserver;
  80.  
  81. if (!empty($dbport) || $dbserver != 'localhost') {
  82. $cfg['Servers'][$i]['connect_type'] = 'tcp';
  83. $cfg['Servers'][$i]['port'] = $dbport;
  84. }
  85. //$cfg['Servers'][$i]['compress'] = false;
  86. /* Select mysqli if your server has it */
  87. $cfg['Servers'][$i]['extension'] = 'mysqli';
  88. /* Optional: User for advanced features */
  89. $cfg['Servers'][$i]['controluser'] = $dbuser;
  90. $cfg['Servers'][$i]['controlpass'] = $dbpass;
  91. /* Optional: Advanced phpMyAdmin features */
  92. $cfg['Servers'][$i]['pmadb'] = $dbname;
  93. $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
  94. $cfg['Servers'][$i]['relation'] = 'pma__relation';
  95. $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
  96. $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
  97. $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
  98. $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
  99. $cfg['Servers'][$i]['history'] = 'pma__history';
  100. $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
  101. $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
  102. $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
  103. $cfg['Servers'][$i]['recent'] = 'pma__recent';
  104. $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
  105. $cfg['Servers'][$i]['users'] = 'pma__users';
  106. $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
  107. $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
  108. $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
  109. $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
  110. $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
  111. $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
  112.  
  113. /* Uncomment the following to enable logging in to passwordless accounts,
  114. * after taking note of the associated security risks. */
  115. // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
  116.  
  117. /* Advance to nedebug2: channel 0: window 997956 sent adjust 50620
  118. xt server for rest of config */
  119. $i++;
  120. }
  121.  
  122. /* Authentication type */
  123. //$cfg['Servers'][$i]['auth_type'] = 'cookie';
  124. /* Server parameters */
  125. //$cfg['Servers'][$i]['host'] = 'localhost';
  126. //$cfg['Servers'][$i]['connect_type'] = 'tcp';
  127. //$cfg['Servers'][$i]['compress'] = false;
  128. /* Uncomment the following to enable logging in to passwordless accounts,
  129. * after taking note of the associated security risks. */
  130. // $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
  131.  
  132. /**
  133. * phpMyAdmin configuration storage settings.
  134. */
  135.  
  136. /* User used to manipulate with storage */
  137. // $cfg['Servers'][$i]['controlhost'] = '';
  138. // $cfg['Servers'][$i]['controlport'] = '';
  139. // $cfg['Servers'][$i]['controluser'] = 'pma';
  140. // $cfg['Servers'][$i]['controlpass'] = 'pmapass';
  141.  
  142. /* Storage database and tables */
  143. // $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
  144. // $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
  145. // $cfg['Servers'][$i]['relation'] = 'pma__relation';
  146. // $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
  147. // $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
  148. // $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
  149. // $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
  150. // $cfg['Servers'][$i]['history'] = 'pma__history';
  151. // $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
  152. // $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
  153. // $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
  154. // $cfg['Servers'][$i]['recent'] = 'pma__recent';
  155. // $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
  156. // $cfg['Servers'][$i]['users'] = 'pma__users';
  157. // $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
  158. // $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
  159. // $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
  160. // $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
  161. // $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
  162. // $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
  163. /* Contrib / Swekey authentication */
  164. // $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';
  165.  
  166. /*
  167. * End of servers configuration
  168. */
  169.  
  170. /*
  171. * Directories for saving/loading files from server
  172. */
  173. $cfg['UploadDir'] = '';
  174. $cfg['SaveDir'] = '';
  175.  
  176. /* Support additional configurations */
  177. foreach (glob('/etc/phpmyadmin/conf.d/*.php') as $filename)
  178. {
  179. include($filename);
  180. }
Add Comment
Please, Sign In to add comment