initial commit

This commit is contained in:
ns77@siliconpin.com
2025-08-18 12:05:35 +00:00
commit 5c1e30c087
4586 changed files with 818325 additions and 0 deletions

3
pma/.rtlcssrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"map": true
}

52
pma/CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,52 @@
# Contributing to phpMyAdmin
As an open-source project, phpMyAdmin welcomes contributions of many forms.
## Bug reporting
We appreciate your effort to improve phpMyAdmin by submitting a bug report. Before doing so, please check the following things:
1. Check whether the bug you face **hasn't been already reported**. Duplicate reports take us time, that we could be used to fix other bugs or make improvements.
2. Specify the phpMyAdmin, server, PHP, MySQL and browser information that may be helpful to fix the problem, especially exact **version numbers**.
3. If you got some error, please **describe what happened** and add an error message. Reports like "I get an error when I clicked on some link" are useless.
4. Provide easy steps to reproduce and if possible include your table structure (``SHOW CREATE TABLE `tbl_name`;``); if your problem implies specific data, attach a small export file for sample rows.
5. **Security problems** should not be reported here. See [our security page](https://www.phpmyadmin.net/security/).
Thanks for your help!
Please report [bugs on GitHub][1].
[1]: https://github.com/phpmyadmin/phpmyadmin/issues/new
## Patches submission
Patches are welcome as [pull requests on GitHub][2]. Please include a
Signed-off-by tag in the commit message (you can do this by passing [`--signoff`][4] parameter to Git).
When creating the commit on GitHub or using some other tool which does not have
direct support for this, it is the same as adding `Signed-off-by: Your name <email@example.com>`
as the last line of the commit message.
Example: `Signed-off-by: Jane Smith <jane.smith@example.org>`
Note that by submitting patches with the Signed-off-by tag, you are giving
permission to license the patch as GPLv2-or-later. See [the DCO file][3] for details.
[2]: https://github.com/phpmyadmin/phpmyadmin/pulls
[3]: https://github.com/phpmyadmin/phpmyadmin/blob/master/DCO
[4]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff
## Triage issues [![Open Source Helpers](https://www.codetriage.com/phpmyadmin/phpmyadmin/badges/users.svg)](https://www.codetriage.com/phpmyadmin/phpmyadmin)
You can triage issues, which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to phpMyAdmin on CodeTriage](https://www.codetriage.com/phpmyadmin/phpmyadmin).
## More information
You can find more information on our website:
https://www.phpmyadmin.net/contribute/

277
pma/ChangeLog Normal file
View File

@@ -0,0 +1,277 @@
phpMyAdmin - ChangeLog
======================
5.2.2 (2025-01-21)
- issue [security] Fix for a path disclosure leak in the Monitoring tab
- issue Prevent the user from deleting system databases
- issue [security] Fix an XSS vulnerability when checking tables (PMASA-2025-1)
- issue [security] Fix an XSS vulnerability on the Insert tab (PMASA-2025-2)
- issue [security] Fix a possible glibc/iconv vulnerability (CVE-2024-2961, assigned PMASA-2025-3 but please note that phpMyAdmin is not vulnerable by default)
- issue Fix for sql-parser relating to quadratic complexity in certain queries, which could have caused long execution times.
- issue #17851 Fix total count of rows in not accurate
- issue #17766 Allow to open in a new tab copy and edit row actions
- issue #17599 Fix error when handling an user that is not in privileges table
- issue #17364 Fix error when trying to import a status monitor chart arrangement
- issue #18106 Fix renaming database with a view
- issue #18120 Fix bug with numerical tables during renaming database
- issue #16851 Fix ($cfg['Order']) default column order doesn't have have any effect since phpMyAdmin 4.2.0
- issue #18138 Fix some issues with numerical table names
- issue #18112 Fix open base dir warning on git version class
- issue #18211 Fix the themes route missing the server ID
- issue Do not show "Original length undefined" on binary hex columns
- issue Fix wrong time zone when handling Git information
- issue #18195 Fix warning on non-existent table for XML export
- issue #18196 Fix errors of import notification
- issue #18093 Fix JS errors around "new user account" in some edge cases
- issue #16451 Increase password characters limit to 2000 during login
- issue #18177 Fix "IS NULL" is shown for non-nullable columns on search page
- issue #16199 Fix dragging of tables in designer
- issue #18268 Fix UI issue the theme manager is disabled
- issue #18258 Speed improvements when exporting a database
- issue #17702 Fix performance issue when handling large number of tables in a single database
- issue #18324 Fix UI defect on tracking versions table first column
- issue #18266 Fix disabling features (like `$cfg['Servers'][$i]['tracking'] = false;`) did not work
- issue #18296 Fixed query time measurement - measure time only for user queries
- issue #18235 Fix columns are misaligned for the "sys" database
- issue #18249 Speed improvements when browsing a database with multiple tables
- issue #18060 Fix Console height "Not a non-negative number" error
- issue #18188 Fix issue when editing GIS data
- issue Fix width/height of create routines modal and width of routines/triggers/events modals
- issue Stop pmadb database detection when all features are disabled
- issue Upgrade slim/psr7 to 1.4.1 for CVE-2023-30536 - GHSA-q2qj-628g-vhfw
- issue #17654 Fix unprivileged user cannot change password on MySQL >= 5.7.37
- issue #18385 Add CVE MITRE link to allowed domains and use cve.org
- issue #18330 Fix TypeError when no-datetime field is modified
- issue #18212 Fix Query Builder doesn't replace a table name with it's alias in the `WHERE` block
- issue #18221 Keep the criteria box collapsed by the user when un-checking the criteria checkbox
- issue #18363 Fix colspan for actions column on database table list
- issue Fix double encoding on User Groups pages
- issue Fix list of users of an user group not showing up
- issue Fix duplicate query params in the SQL message card
- issue #18314 Fix dragged row in index form
- issue #17392 Fix the actions not being hidden in the Triggers, Routines, Events pages
- issue #18441 Fix execute routine page not working when not in a modal
- issue #18471 Fix SQL statement not being displayed correctly on RTL languages
- issue Fix state times not getting summed in the profiling table
- issue Fix a case where a fatal error message was not displayed
- issue #17420 Fix profiling chart not loading when profiling is activated
- issue #18159 Fix error when changing the number of chart columns in the monitor page
- issue #18403 Fix Uncaught SyntaxError: JSON.parse on makegrid conditions
- issue #17528 Fix double escaping of database group names in the navigation tree
- issue #18473 Fix the NULL not applied after clearing nullable field
- issue #18454 Fix date field calendar display when changing NULL state
- issue #18481 Fix missing pagination when using SELECT DISTINCT
- issue #18325 Allow hex representations for integers in the search box validation
- issue #14411 Fixed double tap to edit on mobile devices
- issue Update documentation to reflect that Node >= 12 is required to compile the JS and CSS files
- issue #18578 Fixed PDF export NULL values gives a type error
- issue #18605 Fixed issue when executing a stored procedure
- issue #18650 Fixed double escaping on foreign key relation link title
- issue #18533 Fixed wrong count for simulated queries
- issue #18611 Fixed an error when searching a table without conditions
- issue #18663 Fixed case where triggers are dropped when moving a table
- issue #17404 Fixed an error message after dropping a database
- issue #18714 Fixed incorrect formatting of the amount of table rows
- issue #18717 Fixed issue when deleting bookmarks
- issue #18713 Fixed some issues with the GIS editor
- issue #18722 Fixed generic error message in the home page
- issue #18693 Fixed enum/set value escaping
- issue #18769 Improved collations support for MariaDB 10.10
- issue #17381 Fixed JS errors when editing indexes on create table
- issue #14402 Fix the PRIMARY label still shown when using two columns for a PK on create table
- issue #17347 Fixed JS errors when changing index settings on create table
- issue #18762 Fixed truncating tables when a VIEW is included
- issue Fix BETWEEN search does not validate input because of spaces
- issue Fix JS number validation does not validate when the input is empty or emptied
- issue #18561 Fix issue when adding System Monitor charts
- issue #17363 Fix duplicate route parameter after logging in
- issue #15670 Fix case where the data is truncated after changing a longtext column's collation
- issue #18797 Fixed support for ampersand as a arg separator
- issue #18834 Fixed case where column hash is empty in table relation page
- issue #17538 Fixed error when renaming an index
- issue #18865 Fix missing text-nowrap for timestamps columns
- issue #18613 Fixed routine editor showing wrong parameter type
- issue #18890 Fixed wrong row count when query has UNION
- issue #18949 Fixed natural sorting for items in the navigation section
- issue #18930 Fixed import of empty tables from MediaWiki
- issue #18940 Fixed issue when creating an unique key
- issue #19022 Fix case where tables from wrong database is loaded in navigation tree
- issue #18782 Fixed issue with role based auth for MySQL 8
- issue #18593 Fix drop db line included in server export if exporting only data
- issue #18049 Also check that curl_exec is enabled for the new version check
- issue #19023 Fixed table size for ROCKSDB engine showing as unknown
- issue #18451 Fix when editing inline central column, Null is always preselected
- issue #18495 Fixed database export missing routines
- issue #19117 Allow changing the virtuality of a column without any other changes
- issue #18566 Fixed error when importing exported view with USE INDEX hint
- issue #17920 Fixed moving column with empty default value will replace it with ''
- issue #18006 Fixed moving columns causes the default uuid() value to get quotes around it
- issue #18962 Fixed move columns with ENUM() & DEFAULT causes invalid SQL
- issue #18276 Fix on update CURRENT_TIMESTAMP doesn't show as default in attributes
- issue #18240 Fix inserting value with UNIX_TIMESTAMP() without a parameter
- issue #19125 Fixed CodeMirror tooltip is below modals
- issue #18674 Fix formatted sql in browse table result has a linebreak after each token
- issue #18210 Fixed add replica replication user on MariaDB doesn't work (SQL syntax)
- issue #19041 Fix footer.twig gets printed to Binary File Download
- issue #19091 Fix to stop processing queries on error
- issue #18241 Fix copy SQL query button on error messages
- issue #17190 Fix an error with SELECT ... FOR UPDATE queries
- issue #19145 Remove duplicate server and lang parameters from links
- issue #19158 Fix an issue with backticks on the query generator
- issue #19174 Fix an issue with column alias with asterisk on the query generator
- issue #19146 Fix column sorting with limit subquery
- issue #19152 Fix the number of lines being ignored in GIS visualization after a search
- issue #19189 Fix issue with column sorting when using 'group by'
- issue #19188 Fix issue with simulated queries reporting syntax errors
- issue #19141 Add cookie prefix '-__Secure-' to cookies to help prevent cookie smuggling
- issue #19218 Fix textarea horizontal resizing with Bootstap theme
- issue #19199 Add support for fractional seconds to current_timestamp()
- issue #19221 Fix query statistics for queries with count(*)
- issue #19203 Fix single quotes and backslashes for the query generator
- issue #19163 Fix queries with IS NULL or IS NOT NULL for the query generator
- issue #19181 Fix query generator support for IN() and NOT IN()
- issue #19167 Fix criteria on column '*' for the query generator
- issue #19213 Fix possible issue when exporting a large data set
- issue #19217 Fix issue when editing a cell of a JSON column
- issue #19244 Add yarn 1.22 to the package.json's packageManager field
- issue #19185 Fix visual issue when a row has only empty cells
- issue #19257 Fix issue when adding an index with an invalid name
- issue #19276 Fix compatibility with Twig 3.12
- issue #19283 Fix issue when the server starts with skip-innodb option
- issue #19299 Fix charset in procedure's parameter type
- issue #19316 Fix input size for hexadecimal values
- issue #19321 Suppress deprecation message of E_STRICT constant
- issue Fix PHP 8.4 `str_getcsv` `$escape` parameter deprecation
- issue #19426 Fix PHP warnings when the column is a `COMPRESSED BLOB`
- issue Allow opening server breadcrumb links in new tab with Ctrl/Meta key
- issue #19500 Use `KILL` instead of `CALL mysql.rds_kill` for non super users
- issue Fix "copy to clipboard" was adding a blank row for each repeating header row
- issue Fix TCPDF translations
- issue Remove underline for links on Bootstrap theme
- issue Fix sql editor height on multi-table query
- issue #18852 Fix notification color scheme on the Bootstrap dark theme
- issue #14542 Show the query even if no results are found in the Table search
- issue #16936 Fixed import (e.g. ods) doesn't respect database default collation
- issue #19000 Disable autocomplete for the create table/db name inputs
5.2.1 (2023-02-07)
- issue #17522 Fix case where the routes cache file is invalid
- issue #17506 Fix error when configuring 2FA without XMLWriter or Imagick
- issue Fix blank page when some error occurs
- issue #17519 Fix Export pages not working in certain conditions
- issue #17496 Fix error in table operation page when partitions are broken
- issue #17386 Fix system memory and system swap values on Windows
- issue #17517 Fix Database Server panel not getting hidden by ShowServerInfo configuration directive
- issue #17271 Fix database names not showing on Processes tab
- issue #17424 Fix export limit size calculation
- issue #17366 Fix refresh rate popup on Monitor page
- issue #17577 Fix monitor charts size on RTL languages
- issue #17121 Fix password_hash function incorrectly adding single quotes to password before hashing
- issue #17586 Fix statistics not showing for empty databases
- issue #17592 Clicking on the New index link on the sidebar does not throw an error anymore
- issue #17584 It's now possible to browse a database that includes two % in its name
- issue Fix PHP 8.2 deprecated string interpolation syntax
- issue Some languages are now correctly detected from the HTTP header
- issue #17617 Sorting is correctly remembered when $cfg['RememberSorting'] is true
- issue #17593 Table filtering now works when action buttons are on the right side of the row
- issue #17388 Find and Replace using regex now makes a valid query if no matching result set found
- issue #17551 Enum/Set editor will not fail to open when creating a new column
- issue #17659 Fix error when a database group is named tables, views, functions, procedures or events
- issue #17673 Allow empty values to be inserted into columns
- issue #17620 Fix error handling at phpMyAdmin startup for the JS SQL console
- issue Fixed debug queries console broken UI for query time and group count
- issue Fixed escaping of SQL query and errors for the debug console
- issue Fix console toolbar UI when the bookmark feature is disabled and sql debug is enabled
- issue #17543 Fix JS error on saving a new designer page
- issue #17546 Fix JS error after using save as and open page operation on the designer
- issue Fix PHP warning on GIS visualization when there is only one GIS column
- issue #17728 Some select HTML tags will now have the correct UI style
- issue #17734 PHP deprecations will only be shown when in a development environment
- issue #17369 Fix server error when blowfish_secret is not exactly 32 bytes long
- issue #17736 Add utf8mb3 as an alias of utf8 on the charset description page
- issue #16418 Fix FAQ 1.44 about manually removing vendor folders
- issue #12359 Setup page now sends the Content-Security-Policy headers
- issue #17747 The Column Visibility Toggle will not be hidden by other elements
- issue #17756 Edit/Copy/Delete row now works when using GROUP BY
- issue #17248 Support the UUID data type for MariaDB >= 10.7
- issue #17656 Fix replace/change/set table prefix is not working
- issue Fix monitor page filter queries only filtering the first row
- issue Fix "Link not found!" on foreign columns for tables having no char column to show
- issue #17390 Fix "Create view" modal doesn't show on results and empty results
- issue #17772 Fix wrong styles for add button from central columns
- issue #17389 Fix HTML disappears when exporting settings to browser's storage
- issue #17166 Fix "Warning: #1287 'X' is deprecated [...] Please use ST_X instead." on search page
- issue Use jquery-migrate.min.js (14KB) instead of jquery-migrate.min.js (31KB)
- issue #17842 Use jquery.validate.min.js (24 KB) instead of jquery.validate.js (50 KB)
- issue #17281 Fix links to databases for information_schema.SCHEMATA
- issue #17553 Fix Metro theme unreadable links above navigation tree
- issue #17553 Metro theme UI fixes and improvements
- issue #17553 Fix Metro theme login form with
- issue #16042 Exported gzip file of database has first ~73 kB uncompressed and rest is gzip compressed in Firefox
- issue #17705 Fix inline SQL query edit FK checkbox preventing submit buttons from working
- issue #17777 Fix Uncaught TypeError: Cannot read properties of null (reading 'inline') on datepickers when re-opened
- issue Fix Original theme buttons style and login form width
- issue #17892 Fix closing index edit modal and reopening causes it to fire twice
- issue #17606 Fix preview SQL modal not working inside "Add Index" modal
- issue Fix PHP error on adding new column on create table form
- issue #17482 Default to "Full texts" when running explain statements
- issue Fixed Chrome scrolling performance issue on a textarea of an "export as text" page
- issue #17703 Fix datepicker appears on all fields, not just date
- issue Fix space in the tree line when a DB is expanded
- issue #17340 Fix "New Table" page -> "VIRTUAL" attribute is lost when adding a new column
- issue #17446 Fix missing option for STORED virtual column on MySQL and PERSISTENT is not supported on MySQL
- issue #17446 Lower the check for virtual columns to MySQL>=5.7.6 nothing is supported on 5.7.5
- issue Fix column names option for CSV Export
- issue #17177 Fix preview SQL when reordering columns doesn't work on move columns
- issue #15887 Fixed DROP TABLE errors ignored on multi table select for DROP
- issue #17944 Fix unable to create a view from tree view button
- issue #17927 Fix key navigation between select inputs (drop an old Firefox workaround)
- issue #17967 Fix missing icon for collapse all button
- issue #18006 Fixed UUID columns can't be moved
- issue Add `spellcheck="false"` to all password fields and some text fields to avoid spell-jacking data leaks
- issue Remove non working "Analyze Explain at MariaDB.org" button (MariaDB stopped this service)
- issue #17229 Add support for Web Authentication API because Chrome removed support for the U2F API
- issue #18019 Fix "Call to a member function fetchAssoc() on bool" with SQL mode ONLY_FULL_GROUP_BY on monitor search logs
- issue Add back UUID and UUID_SHORT to functions on MySQL and all MariaDB versions
- issue #17398 Fix clicking on JSON columns triggers update query
- issue Fix silent JSON parse error on upload progress
- issue #17833 Fix "Add Parameter" button not working for Add Routine Screen
- issue #17365 Fixed "Uncaught Error: regexp too big" on server status variables page
- issue [security] Fix an XSS attack through the drag-and-drop upload feature (PMASA-2023-01)
5.2.0 (2022-05-10)
- issue #16521 Upgrade Bootstrap to version 5
- issue #16521 Drop support for Internet Explorer and others
- issue Upgrade to shapefile 3
- issue #16555 Bump minimum PHP version to 7.2
- issue Remove the phpseclib dependency
- issue Upgrade Symfony components to version 5.2
- issue Upgrade to Motranslator 4
- issue #16005 Improve the performance of the Export logic
- issue #16829 Add "NOT LIKE %...%" operator to Table search
- issue #16845 Fixed some links not passing through url.php
- issue #16382 Remove apc upload progress method (all upload progress code was removed from the PHP extension)
- issue #16974 Replace zxcvbn by zxcvbn-ts
- issue #15691 Disable the last column checkbox in the column list dropdown instead of not allowing un-check
- issue #16138 Ignore the length of integer types and show a warning on MySQL >= 8.0.18
- issue Add support for the Mroonga engine
- issue Double click column name to directly copy to clipboard
- issue #16425 Add "DELETE FROM" table on table operations page
- issue #16482 Add a select all link for table-specific privileges
- issue #14276 Add support for account locking
- issue #17143 Use composer/ca-bundle to manage the CA cert file
- issue #17143 Require the openssl PHP extension
- issue #17171 Remove the printview.css file from themes
- issue #17203 Redesign the export and the import pages
- issue #16197 Replace the master/slave terminology
- issue #17257 Replace libraries/vendor_config.php constants with an array
- issue Add the Bootstrap theme
- issue #17499 Remove stickyfilljs JavaScript dependency
--- Older ChangeLogs can be found on our project website ---
https://www.phpmyadmin.net/old-stuff/ChangeLogs/
# vim: et ts=4 sw=4 sts=4
# vim: ft=changelog fenc=utf-8
# vim: fde=getline(v\:lnum-1)=~'^\\s*$'&&getline(v\:lnum)=~'\\S'?'>1'\:1&&v\:lnum>4&&getline(v\:lnum)!~'^#'
# vim: fdn=1 fdm=expr

339
pma/LICENSE Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

52
pma/README Normal file
View File

@@ -0,0 +1,52 @@
phpMyAdmin - Readme
===================
Version 5.2.2
A web interface for MySQL and MariaDB.
https://www.phpmyadmin.net/
Summary
-------
phpMyAdmin is intended to handle the administration of MySQL over the web.
For a summary of features, list of requirements, and installation instructions,
please see the documentation in the ./doc/ folder or at https://docs.phpmyadmin.net/
Copyright
---------
Copyright © 1998 onwards -- the phpMyAdmin team
Certain libraries are copyrighted by their respective authors;
see the full copyright list for details.
For full copyright information, please see ./doc/copyright.rst
License
-------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License version 2, as published by the
Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Licensing of current contributions
----------------------------------
Beginning on 2013-12-01, new contributions to this codebase are all licensed
under terms compatible with GPLv2-or-later. phpMyAdmin is currently
transitioning older code to GPLv2-or-later, but work is not yet complete.
Enjoy!
------
The phpMyAdmin team

1
pma/RELEASE-DATE-5.2.2 Normal file
View File

@@ -0,0 +1 @@
Tue Jan 21 03:13:07 UTC 2025

4
pma/babel.config.json Normal file
View File

@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-env"],
"sourceType": "script"
}

153
pma/composer.json Normal file
View File

@@ -0,0 +1,153 @@
{
"name": "phpmyadmin/phpmyadmin",
"type": "project",
"description": "A web interface for MySQL and MariaDB",
"keywords": ["phpmyadmin","mysql","web"],
"homepage": "https://www.phpmyadmin.net/",
"support": {
"security": "https://www.phpmyadmin.net/security/",
"forum": "https://www.phpmyadmin.net/support/",
"issues": "https://github.com/phpmyadmin/phpmyadmin/issues",
"wiki": "https://wiki.phpmyadmin.net/",
"docs": "https://docs.phpmyadmin.net/",
"source": "https://github.com/phpmyadmin/phpmyadmin"
},
"license": "GPL-2.0-only",
"authors": [
{
"name": "The phpMyAdmin Team",
"email": "developers@phpmyadmin.net",
"homepage": "https://www.phpmyadmin.net/team/"
}
],
"non-feature-branches": ["RELEASE_.*"],
"autoload": {
"psr-4": {
"PhpMyAdmin\\": "libraries/classes"
},
"files": ["vendor/phpmyadmin/motranslator/src/functions.php"],
"exclude-from-classmap": [
"/test/",
"/vendor/tecnickcom/tcpdf/tcpdf_barcodes_*.php",
"/vendor/tecnickcom/tcpdf/tcpdf_import.php",
"/vendor/tecnickcom/tcpdf/tcpdf_parser.php",
"/vendor/tecnickcom/tcpdf/include/tcpdf_filters.php",
"/vendor/tecnickcom/tcpdf/include/barcodes"
]
},
"autoload-dev": {
"psr-4": {
"PhpMyAdmin\\Tests\\": "test/classes",
"PhpMyAdmin\\Tests\\Selenium\\": "test/selenium/"
}
},
"repositories": [
{
"type": "composer",
"url": "https://www.phpmyadmin.net"
}
],
"require": {
"php": "^7.2.5 || ^8.0",
"ext-hash": "*",
"ext-iconv": "*",
"ext-json": "*",
"ext-mysqli": "*",
"ext-openssl": "*",
"ext-pcre": "*",
"ext-xml": "*",
"composer/ca-bundle": "^1.2",
"google/recaptcha": "^1.1",
"nikic/fast-route": "^1.3",
"paragonie/sodium_compat": "^1.17",
"phpmyadmin/motranslator": "^5.0",
"phpmyadmin/shapefile": "^3.0.1",
"phpmyadmin/sql-parser": "^5.8",
"phpmyadmin/twig-i18n-extension": "^4.1.3 || ^5.0.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
"slim/psr7": "^1.4.1",
"symfony/config": "^5.2.3",
"symfony/dependency-injection": "^5.2.3",
"symfony/expression-language": "^5.2.3",
"symfony/polyfill-ctype": "^1.17.0",
"symfony/polyfill-mbstring": "^1.17.0",
"symfony/polyfill-php80": "^1.16",
"twig/twig": "^3.3.5",
"webmozart/assert": "^1.10",
"williamdes/mariadb-mysql-kbs": "^1.2"
},
"conflict": {
"bacon/bacon-qr-code": "<2.0",
"pragmarx/google2fa-qrcode": "<2.1",
"tecnickcom/tcpdf": "<6.4.4"
},
"suggest": {
"ext-curl": "Updates checking",
"ext-opcache": "Better performance",
"ext-zlib": "For gz import and export",
"ext-bz2": "For bzip2 import and export",
"ext-zip": "For zip import and export",
"ext-gd2": "For image transformations",
"ext-mbstring": "For best performance",
"ext-sodium": "Better encryption performance",
"tecnickcom/tcpdf": "For PDF support",
"pragmarx/google2fa-qrcode": "^2.1 - For 2FA authentication",
"bacon/bacon-qr-code": "^2.0 - For 2FA authentication",
"code-lts/u2f-php-server": "For FIDO U2F authentication",
"web-auth/webauthn-lib": "For better WebAuthn/FIDO2 authentication support"
},
"require-dev": {
"bacon/bacon-qr-code": "^2.0",
"code-lts/u2f-php-server": "^1.2",
"php-webdriver/webdriver": "^1.13",
"phpmyadmin/coding-standard": "^3.0.0",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-deprecation-rules": "^1.2",
"phpstan/phpstan-phpunit": "^1.4",
"phpstan/phpstan-strict-rules": "^1.6",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^8.5.16 || ^9.6",
"pragmarx/google2fa-qrcode": "^2.1",
"psalm/plugin-phpunit": "^0.16.1",
"roave/security-advisories": "dev-latest",
"symfony/console": "^5.2.3",
"tecnickcom/tcpdf": "^6.4.4",
"vimeo/psalm": "^4.30",
"web-auth/webauthn-lib": "^3.3.2"
},
"extra": {
"branch-alias": {
"dev-master": "5.2.x-dev"
}
},
"scripts": {
"phpcbf": "@php phpcbf",
"phpcs": "@php phpcs",
"phpstan": "@php phpstan analyse",
"psalm": "@php psalm --no-diff",
"phpunit": "@php phpunit --color=always",
"test": [
"@phpcs",
"@phpstan",
"@psalm",
"@phpunit"
],
"update:baselines": [
"@php phpstan analyse --generate-baseline",
"@php psalm --set-baseline=psalm-baseline.xml"
],
"twig-lint": "@php scripts/console lint:twig --ansi --show-deprecations"
},
"config":{
"sort-packages": true,
"discard-changes": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true,
"composer/package-versions-deprecated": true
}
},
"version": "5.2.2"
}

8402
pma/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

160
pma/config.sample.inc.php Normal file
View File

@@ -0,0 +1,160 @@
<?php
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*/
declare(strict_types=1);
/**
* This is needed for cookie based authentication to encrypt the cookie.
* Needs to be a 32-bytes long string of random bytes. See FAQ 2.10.
*/
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/**
* End of servers configuration
*/
/**
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/**
* Whether to display icons or text or both icons and text in table row
* action segment. Value can be either of 'icons', 'text' or 'both'.
* default = 'both'
*/
//$cfg['RowActionType'] = 'icons';
/**
* Defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['ShowAll'] = true;
/**
* Number of rows displayed when browsing a result set. If the result
* set contains more rows, "Previous" and "Next".
* Possible values: 25, 50, 100, 250, 500
* default = 25
*/
//$cfg['MaxRows'] = 50;
/**
* Disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for BLOB fields
* 'noblob' disallow editing except for BLOB fields
* 'all' disallow editing
* default = 'blob'
*/
//$cfg['ProtectBinary'] = false;
/**
* Default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';
/**
* How many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['PropertiesNumColumns'] = 2;
/**
* Set to true if you want DB-based query history.If false, this utilizes
* JS-routines to display query history (lost by window close)
*
* This requires configuration storage enabled, see above.
* default = false
*/
//$cfg['QueryHistoryDB'] = true;
/**
* When using DB-based query history, how many entries should be kept?
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;
/**
* Whether or not to query the user before sending the error report to
* the phpMyAdmin team when a JavaScript error occurs
*
* Available options
* ('ask' | 'always' | 'never')
* default = 'ask'
*/
//$cfg['SendErrorReports'] = 'always';
/**
* 'URLQueryEncryption' defines whether phpMyAdmin will encrypt sensitive data from the URL query string.
* 'URLQueryEncryptionSecretKey' is a 32 bytes long secret key used to encrypt/decrypt the URL query string.
*/
//$cfg['URLQueryEncryption'] = true;
//$cfg['URLQueryEncryptionSecretKey'] = '';
/**
* You can find more configuration options in the documentation
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,77 @@
.. _bookmarks:
Bookmarks
=========
.. note::
You need to have configured the :ref:`linked-tables` for using bookmarks
feature.
Storing bookmarks
-----------------
Any query that is executed can be marked as a bookmark on the page
where the results are displayed. You will find a button labeled
:guilabel:`Bookmark this query` just at the end of the page. As soon as you have
stored a bookmark, that query is linked to the database.
You can now access a bookmark dropdown on each page where the query box appears on for that database.
Variables inside bookmarks
--------------------------
Inside a query, you can also add placeholders for variables.
This is done by inserting into the query SQL comments between ``/*`` and
``*/``. The special string ``[VARIABLE{variable-number}]`` is used inside the comments.
Be aware that the whole query minus the SQL comments must be
valid by itself, otherwise you won't be able to store it as a bookmark.
Also, note that the text 'VARIABLE' is case-sensitive.
When you execute the bookmark, everything typed into the *Variables*
input boxes on the query box page will replace the strings ``/*[VARIABLE{variable-number}]*/`` in
your stored query.
Also remember, that everything else inside the ``/*[VARIABLE{variable-number}]*/`` string for
your query will remain the way it is, but will be stripped of the ``/**/``
chars. So you can use:
.. code-block:: mysql
/*, [VARIABLE1] AS myname */
which will be expanded to
.. code-block:: mysql
, VARIABLE1 as myname
in your query, where VARIABLE1 is the string you entered in the Variable 1 input box.
A more complex example, say you have stored this query:
.. code-block:: mysql
SELECT Name, Address FROM addresses WHERE 1 /* AND Name LIKE '%[VARIABLE1]%' */
If you wish to enter "phpMyAdmin" as the variable for the stored query, the full
query will be:
.. code-block:: mysql
SELECT Name, Address FROM addresses WHERE 1 AND Name LIKE '%phpMyAdmin%'
**NOTE THE ABSENCE OF SPACES** inside the ``/**/`` construct. Any spaces
inserted there will be later also inserted as spaces in your query and may lead
to unexpected results especially when using the variable expansion inside of a
"LIKE ''" expression.
Browsing a table using a bookmark
---------------------------------
When a bookmark has the same name as the table, it will be used as the query when browsing
this table.
.. seealso::
:ref:`faqbookmark`,
:ref:`faq6_22`

View File

@@ -0,0 +1,143 @@
.. _charts:
Charts
======
.. versionadded:: 3.4.0
Since phpMyAdmin version 3.4.0, you can easily generate charts from a SQL query
by clicking the "Display chart" link in the "Query results operations" area.
.. image:: images/query_result_operations.png
A window layer "Display chart" is shown in which you can customize the chart with the following options.
- Chart type: Allows you to choose the type of chart. Supported types are bar charts, column charts, line charts, spline charts, area charts, pie charts and timeline charts (only the chart types applicable for current series selection are offered).
- X-axis: Allows to choose the field for the main axis.
- Series: Allows to choose series for the chart. You can choose multiple series.
- Title: Allows specifying a title for the chart which is displayed above the chart.
- X-axis and Y-axis labels: Allows specifying labels for axes.
- Start row and a number of rows: Allows generating charts only for a specified number of rows of the results set.
.. image:: images/chart.png
Chart implementation
--------------------
Charts in phpMyAdmin are drawn using `jqPlot <http://www.jqplot.com/>`_ jQuery library.
Examples
--------
Pie chart
+++++++++
Query results for a simple pie chart can be generated with:
.. code-block:: mysql
SELECT 'Food' AS 'expense',
1250 AS 'amount' UNION
SELECT 'Accommodation', 500 UNION
SELECT 'Travel', 720 UNION
SELECT 'Misc', 220
And the result of this query is:
+---------------+--------+
| expense | amount |
+===============+========+
| Food | 1250 |
+---------------+--------+
| Accommodation | 500 |
+---------------+--------+
| Travel | 720 |
+---------------+--------+
| Misc | 220 |
+---------------+--------+
Choosing expense as the X-axis and amount in series:
.. image:: images/pie_chart.png
Bar and column chart
++++++++++++++++++++
Both bar charts and column chats support stacking. Upon selecting one of these types a checkbox is displayed to select stacking.
Query results for a simple bar or column chart can be generated with:
.. code-block:: mysql
SELECT
'ACADEMY DINOSAUR' AS 'title',
0.99 AS 'rental_rate',
20.99 AS 'replacement_cost' UNION
SELECT 'ACE GOLDFINGER', 4.99, 12.99 UNION
SELECT 'ADAPTATION HOLES', 2.99, 18.99 UNION
SELECT 'AFFAIR PREJUDICE', 2.99, 26.99 UNION
SELECT 'AFRICAN EGG', 2.99, 22.99
And the result of this query is:
+------------------+--------------+-------------------+
| title | rental_rate | replacement_cost |
+==================+==============+===================+
| ACADEMY DINOSAUR | 0.99 | 20.99 |
+------------------+--------------+-------------------+
| ACE GOLDFINGER | 4.99 | 12.99 |
+------------------+--------------+-------------------+
| ADAPTATION HOLES | 2.99 | 18.99 |
+------------------+--------------+-------------------+
| AFFAIR PREJUDICE | 2.99 | 26.99 |
+------------------+--------------+-------------------+
| AFRICAN EGG | 2.99 | 22.99 |
+------------------+--------------+-------------------+
Choosing title as the X-axis and rental_rate and replacement_cost as series:
.. image:: images/column_chart.png
Scatter chart
+++++++++++++
Scatter charts are useful in identifying the movement of one or more variable(s) compared to another variable.
Using the same data set from bar and column charts section and choosing replacement_cost as the X-axis and rental_rate in series:
.. image:: images/scatter_chart.png
Line, spline and timeline charts
++++++++++++++++++++++++++++++++
These charts can be used to illustrate trends in underlying data. Spline charts draw smooth lines while timeline charts draw X-axis taking the distances between the dates/time into consideration.
Query results for a simple line, spline or timeline chart can be generated with:
.. code-block:: mysql
SELECT
DATE('2006-01-08') AS 'date',
2056 AS 'revenue',
1378 AS 'cost' UNION
SELECT DATE('2006-01-09'), 1898, 2301 UNION
SELECT DATE('2006-01-15'), 1560, 600 UNION
SELECT DATE('2006-01-17'), 3457, 1565
And the result of this query is:
+------------+---------+------+
| date | revenue | cost |
+============+=========+======+
| 2016-01-08 | 2056 | 1378 |
+------------+---------+------+
| 2006-01-09 | 1898 | 2301 |
+------------+---------+------+
| 2006-01-15 | 1560 | 600 |
+------------+---------+------+
| 2006-01-17 | 3457 | 1565 |
+------------+---------+------+
.. image:: images/line_chart.png
.. image:: images/spline_chart.png
.. image:: images/timeline_chart.png

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
.. _copyright:
Copyright
=========
.. code-block:: none
Copyright (C) 1998-2000 Tobias Ratschiller <tobias_at_ratschiller.com>
Copyright (C) 2001-2018 Marc Delisle <marc_at_infomarc.info>
Olivier Müller <om_at_omnis.ch>
Robin Johnson <robbat2_at_users.sourceforge.net>
Alexander M. Turek <me_at_derrabus.de>
Michal Čihař <michal_at_cihar.com>
Garvin Hicking <me_at_supergarv.de>
Michael Keck <mkkeck_at_users.sourceforge.net>
Sebastian Mendel <cybot_tm_at_users.sourceforge.net>
[check credits for more details]
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Third party licenses
++++++++++++++++++++
phpMyAdmin includes several third-party libraries which come under their
respective licenses.
jQuery's license, which is where we got the files under js/vendor/jquery/ is
(MIT|GPL), a copy of each license is available in this repository (GPL
is available as LICENSE, MIT as js/vendor/jquery/MIT-LICENSE.txt).
The download kit additionally includes several composer libraries. See their
licensing information in the vendor/ directory.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
.. _developers:
Developers Information
======================
phpMyAdmin is Open Source, so you're invited to contribute to it. Many
great features have been written by other people and you too can help
to make phpMyAdmin a useful tool.
You can check out all the possibilities to contribute in the
`contribute section on our website
<https://www.phpmyadmin.net/contribute/>`_.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,445 @@
.. _glossary:
Glossary
========
From Wikipedia, the free encyclopedia
.. glossary::
.htaccess
the default name of Apache's directory-level configuration file.
.. seealso:: <https://en.wikipedia.org/wiki/.htaccess>
ACL
Access Control List
Blowfish
a keyed, symmetric block cipher, designed in 1993 by `Bruce Schneier <https://en.wikipedia.org/wiki/Bruce_Schneier>`_.
.. seealso:: <https://en.wikipedia.org/wiki/Blowfish_(cipher)>
Browser
a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web.
.. seealso:: <https://en.wikipedia.org/wiki/Web_browser>
bzip2
a free software/open-source data compression algorithm and program developed by Julian Seward.
.. seealso:: <https://en.wikipedia.org/wiki/Bzip2>
CGI
Common Gateway Interface is an important World Wide Web technology that
enables a client web browser to request data from a program executed on
the web server.
.. seealso:: <https://en.wikipedia.org/wiki/Common_Gateway_Interface>
Changelog
a log or record of changes made to a project.
.. seealso:: <https://en.wikipedia.org/wiki/Changelog>
Client
a computer system that accesses a (remote) service on another computer by some kind of network.
.. seealso:: <https://en.wikipedia.org/wiki/Client_(computing)>
column
a set of data values of a particularly simple type, one for each row of the table.
.. seealso:: <https://en.wikipedia.org/wiki/Column_(database)>
Cookie
a packet of information sent by a server to a World Wide Web browser and then sent back by the browser each time it accesses that server.
.. seealso:: <https://en.wikipedia.org/wiki/HTTP_cookie>
CSV
Comma-separated values
.. seealso:: <https://en.wikipedia.org/wiki/Comma-separated_values>
DB
look at :term:`Database`
Database
an organized collection of data.
.. seealso:: <https://en.wikipedia.org/wiki/Database>
Engine
look at :term:`Storage Engines`
PHP extension
a PHP module that extends PHP with additional functionality.
.. seealso:: <https://en.wikipedia.org/wiki/Software_extension>
FAQ
Frequently Asked Questions is a list of commonly asked question and their
answers.
.. seealso:: <https://en.wikipedia.org/wiki/FAQ>
Field
one part of divided data/columns.
.. seealso:: <https://en.wikipedia.org/wiki/Field_(computer_science)>
Foreign key
a column or group of columns in a database row that points to a key column
or group of columns forming a key of another database row in some
(usually different) table.
.. seealso:: <https://en.wikipedia.org/wiki/Foreign_key>
GD
Graphics Library by Thomas Boutell and others for dynamically manipulating images.
.. seealso:: <https://en.wikipedia.org/wiki/GD_Graphics_Library>
GD2
look at :term:`GD`
GZip
GZip is short for GNU zip, a GNU free software file compression program.
.. seealso:: <https://en.wikipedia.org/wiki/Gzip>
host
any machine connected to a computer network, a node that has a hostname.
.. seealso:: <https://en.wikipedia.org/wiki/Host_(network)>
hostname
the unique name by which a network-attached device is known on a network.
.. seealso:: <https://en.wikipedia.org/wiki/Hostname>
HTTP
Hypertext Transfer Protocol is the primary method used to transfer or
convey information on the World Wide Web.
.. seealso:: <https://en.wikipedia.org/wiki/HyperText_Transfer_Protocol>
HTTPS
a :term:`HTTP`-connection with additional security measures.
.. seealso:: <https://en.wikipedia.org/wiki/HTTPS>
IEC
International Electrotechnical Commission
IIS
Internet Information Services is a set of internet-based services for
servers using Microsoft Windows.
.. seealso:: <https://en.wikipedia.org/wiki/Internet_Information_Services>
Index
a feature that allows quick access to the rows in a table.
.. seealso:: <https://en.wikipedia.org/wiki/Database_index>
IP
"Internet Protocol" is a data-oriented protocol used by source and
destination hosts for communicating data across a packet-switched
internetwork.
.. seealso:: <https://en.wikipedia.org/wiki/Internet_Protocol>
IP Address
a unique number that devices use in order to identify and communicate with each other on a network utilizing the Internet Protocol standard.
.. seealso:: <https://en.wikipedia.org/wiki/IP_Address>
IPv6
IPv6 (Internet Protocol version 6) is the latest revision of the
Internet Protocol (:term:`IP`), designed to deal with the
long-anticipated problem of its predecessor IPv4 running out of addresses.
.. seealso:: <https://en.wikipedia.org/wiki/IPv6>
ISAPI
Internet Server Application Programming Interface is the API of Internet Information Services (IIS).
.. seealso:: <https://en.wikipedia.org/wiki/Internet_Server_Application_Programming_Interface>
ISP
An Internet service provider is a business or organization that offers users
access to the Internet and related services.
.. seealso:: <https://en.wikipedia.org/wiki/Internet_service_provider>
ISO
International Standards Organization
.. seealso:: `ISO organization website <https://www.iso.org/about-us.html>`_
.. seealso:: <https://en.wikipedia.org/wiki/International_Organization_for_Standardization>
JPEG
a most commonly used standard method of lossy compression for photographic images.
.. seealso:: <https://en.wikipedia.org/wiki/JPEG>
JPG
look at :term:`JPEG`
Key
look at :term:`Index`
LATEX
a document preparation system for the TeX typesetting program.
.. seealso:: <https://en.wikipedia.org/wiki/LaTeX>
Mac
Apple Macintosh is a line of personal computers designed, developed, manufactured, and marketed by Apple Inc.
.. seealso:: <https://en.wikipedia.org/wiki/Macintosh>
macOS
the operating system which is included with all currently shipping Apple Macintosh computers in the consumer and professional markets.
.. seealso:: <https://en.wikipedia.org/wiki/MacOS>
mbstring
The PHP `mbstring` functions provide support for languages represented by multi-byte character sets, most notably UTF-8.
If you have troubles installing this extension, please follow :ref:`faqmysql`, it provides useful hints.
.. seealso:: <https://www.php.net/manual/en/book.mbstring.php>
Media type
A media type (formerly known as MIME type) is a two-part identifier
for file formats and format contents transmitted on the Internet.
.. seealso:: <https://en.wikipedia.org/wiki/Media_type>
MIME
Multipurpose Internet Mail Extensions is
an Internet Standard for the format of e-mail.
.. seealso:: <https://en.wikipedia.org/wiki/MIME>
module
modular extension for the Apache HTTP Server httpd.
.. seealso:: <https://en.wikipedia.org/wiki/Apache_HTTP_Server>
mod_proxy_fcgi
an Apache module implementing a Fast CGI interface; PHP can be run as a CGI module, FastCGI, or
directly as an Apache module.
.. seealso:: <https://en.wikipedia.org/wiki/Mod_proxy>
MySQL
a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS).
.. seealso:: <https://en.wikipedia.org/wiki/MySQL>
MySQLi
the improved MySQL client PHP extension.
.. seealso:: `PHP manual for MySQL Improved Extension <https://www.php.net/manual/en/book.mysqli.php>`_
.. seealso:: <https://en.wikipedia.org/wiki/MySQLi>
mysql
the MySQL client PHP extension.
.. seealso:: <https://www.php.net/manual/en/book.mysql.php>
OpenDocument
an open standard for office documents.
.. seealso:: <https://en.wikipedia.org/wiki/OpenDocument>
OS X
look at :term:`macOS`.
.. seealso:: <https://en.wikipedia.org/wiki/MacOS>
PDF
Portable Document Format is a file format developed by Adobe Systems for
representing two-dimensional documents in a device-independent and
resolution-independent format.
.. seealso:: <https://en.wikipedia.org/wiki/PDF>
PEAR
the PHP Extension and Application Repository.
.. seealso:: `PEAR website <https://pear.php.net/>`_
.. seealso:: `Wikipedia page for PEAR <https://en.wikipedia.org/wiki/PEAR>`_
PCRE
Perl-Compatible Regular Expressions is the Perl-compatible regular
expression functions for PHP
.. seealso:: <https://www.php.net/pcre>
.. seealso:: `PHP manual for Perl-Compatible Regular Expressions <https://www.php.net/pcre>`_
.. seealso:: <https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions>
PHP
short for "PHP: Hypertext Preprocessor", is an open-source, reflective
programming language used mainly for developing server-side applications
and dynamic web content, and more recently, a broader range of software
applications.
.. seealso:: <https://en.wikipedia.org/wiki/PHP>
port
a connection through which data is sent and received.
.. seealso:: <https://en.wikipedia.org/wiki/Port_(computer_networking)>
primary key
A primary key is an index over one or more fields in a table with
unique values for every single row in this table. Every table should have
a primary key for easier accessing/identifying data in this table. There
can only be one primary key per table and it is named always **PRIMARY**.
In fact, a primary key is just an :term:`unique key` with the name
**PRIMARY**. If no primary key is defined MySQL will use first *unique
key* as primary key if there is one.
You can create the primary key when creating the table (in phpMyAdmin
just check the primary key radio buttons for each field you wish to be
part of the primary key).
You can also add a primary key to an existing table with `ALTER` `TABLE`
or `CREATE` `INDEX` (in phpMyAdmin you can just click on 'add index' on
the table structure page below the listed fields).
RFC
Request for Comments (RFC) documents are a series of memoranda
encompassing new research, innovations, and methodologies applicable to
Internet technologies.
.. seealso:: <https://en.wikipedia.org/wiki/Request_for_Comments>
RFC 1952
GZIP file format specification version 4.3
.. seealso:: :rfc:`1952`
Row (record, tuple)
represents a single, implicitly structured data item in a table.
.. seealso:: <https://en.wikipedia.org/wiki/Row_(database)>
Server
a computer system that provides services to other computing systems over a network.
.. seealso:: <https://en.wikipedia.org/wiki/Server_(computing)>
Sodium
The Sodium PHP extension.
.. seealso:: `PHP manual for Sodium extension <https://www.php.net/manual/en/book.sodium.php>`_
Storage Engines
MySQL can use several different formats for storing data on disk, these
are called storage engines or table types. phpMyAdmin allows a user to
change their storage engine for a particular table through the operations
tab.
Common table types are InnoDB and MyISAM, though many others exist and
may be desirable in some situations.
.. seealso:: `MySQL doc chapter about Alternative Storage Engines <https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html>`_
.. seealso:: <https://en.wikipedia.org/wiki/Database_engine>
socket
a form of inter-process communication.
.. seealso:: <https://en.wikipedia.org/wiki/Unix_domain_socket>
SSL
Secure Sockets Layer, (now superseded by TLS) is a cryptographic protocol
which provides secure communication on the Internet.
.. seealso:: <https://en.wikipedia.org/wiki/Transport_Layer_Security>
Stored procedure
a subroutine available to applications accessing a relational database system
.. seealso:: <https://en.wikipedia.org/wiki/Stored_procedure>
SQL
Structured Query Language
.. seealso:: <https://en.wikipedia.org/wiki/SQL>
table
a set of data elements (cells) that is organized, defined and stored as
horizontal rows and vertical columns where each item can be uniquely
identified by a label or key or by its position in relation to other
items.
.. seealso:: <https://en.wikipedia.org/wiki/Table_(database)>
tar
a type of archive file format, from "Tape Archive".
.. seealso:: <https://en.wikipedia.org/wiki/Tar_(computing)>
TCP
Transmission Control Protocol is one of the core protocols of the
Internet protocol suite.
.. seealso:: <https://en.wikipedia.org/wiki/Internet_protocol_suite>
TCPDF
PHP library to generate PDF files.
.. seealso:: <https://tcpdf.org/>
.. seealso:: <https://en.wikipedia.org/wiki/TCPDF>
trigger
a procedural code that is automatically executed in response to certain events on a particular table or view in a database
.. seealso:: <https://en.wikipedia.org/wiki/Database_trigger>
unique key
A unique key is an index over one or more fields in a table which has a
unique value for each row. The first unique key will be treated as
:term:`primary key` if there is no *primary key* defined.
URL
Uniform Resource Locator is a sequence of characters, conforming to a
standardized format, that is used for referring to resources, such as
documents and images on the Internet, by their location.
.. seealso:: <https://en.wikipedia.org/wiki/URL>
Web server
A computer (program) that is responsible for accepting HTTP requests from clients and serving them web pages.
.. seealso:: <https://en.wikipedia.org/wiki/Web_server>
XML
Extensible Markup Language is a W3C-recommended general-purpose markup
language for creating special-purpose markup languages, capable of
describing many different kinds of data.
.. seealso:: <https://en.wikipedia.org/wiki/XML>
ZIP
a popular data compression and archival format.
.. seealso:: <https://en.wikipedia.org/wiki/Zip_(file_format)>
Zlib
an open-source, cross-platform data compression library by `Jean-loup Gailly <https://en.wikipedia.org/wiki/Jean-Loup_Gailly>`_ and `Mark Adler <https://en.wikipedia.org/wiki/Mark_Adler>`_.
.. seealso:: <https://en.wikipedia.org/wiki/Zlib>
Content Security Policy
The HTTP `Content-Security-Policy` response header allows web site administrators
to control resources the user agent is allowed to load for a given page.
.. seealso:: <https://en.wikipedia.org/wiki/Content_Security_Policy>
.. seealso:: <https://developer.mozilla.org/en/docs/Web/HTTP/CSP>

View File

@@ -0,0 +1,346 @@
Import and export
=================
Import
++++++
To import data, go to the "Import" tab in phpMyAdmin. To import data into a
specific database or table, open the database or table before going to the
"Import" tab.
In addition to the standard Import and Export tab, you can also import an SQL
file directly by dragging and dropping it from your local file manager to the
phpMyAdmin interface in your web browser.
If you are having troubles importing big files, please consult :ref:`faq1_16`.
You can import using following methods:
Form based upload
Can be used with any supported format, also (b|g)zipped files, e.g., mydump.sql.gz .
Form based SQL Query
Can be used with valid SQL dumps.
Using upload directory
You can specify an upload directory on your web server where phpMyAdmin is installed, after uploading your file into this directory you can select this file in the import dialog of phpMyAdmin, see :config:option:`$cfg['UploadDir']`.
phpMyAdmin can import from several various commonly used formats.
CSV
---
Comma separated values format which is often used by spreadsheets or various other programs for export/import.
.. note::
When importing data into a table from a CSV file where the table has an
'auto_increment' field, make the 'auto_increment' value for each record in
the CSV field to be '0' (zero). This allows the 'auto_increment' field to
populate correctly.
It is now possible to import a CSV file at the server or database level.
Instead of having to create a table to import the CSV file into, a best-fit
structure will be determined for you and the data imported into it, instead.
All other features, requirements, and limitations are as before.
CSV using LOAD DATA
-------------------
Similar to CSV, only using the internal MySQL parser and not the phpMyAdmin one.
ESRI Shape File
---------------
The ESRI shapefile or simply a shapefile is a popular geospatial vector data
format for geographic information systems software. It is developed and
regulated by Esri as a (mostly) open specification for data interoperability
among Esri and other software products.
MediaWiki
---------
MediaWiki files, which can be exported by phpMyAdmin (version 4.0 or later),
can now also be imported. This is the format used by Wikipedia to display
tables.
Open Document Spreadsheet (ODS)
-------------------------------
OpenDocument workbooks containing one or more spreadsheets can now be directly imported.
When importing an ODS spreadsheet, the spreadsheet must be named in a specific way in order to make the
import as simple as possible.
Table name
~~~~~~~~~~
During import, phpMyAdmin uses the sheet name as the table name; you should rename the
sheet in your spreadsheet program in order to match your existing table name (or the table you wish to create,
though this is less of a concern since you could quickly rename the new table from the Operations tab).
Column names
~~~~~~~~~~~~
You should also make the first row of your spreadsheet a header with the names of the columns (this can be
accomplished by inserting a new row at the top of your spreadsheet). When on the Import screen, select the
checkbox for "The first line of the file contains the table column names;" this way your newly imported
data will go to the proper columns.
.. note::
Formulas and calculations will NOT be evaluated, rather, their value from
the most recent save will be loaded. Please ensure that all values in the
spreadsheet are as needed before importing it.
SQL
---
SQL can be used to make any manipulation on data, it is also useful for restoring backed up data.
XML
---
XML files exported by phpMyAdmin (version 3.3.0 or later) can now be imported.
Structures (databases, tables, views, triggers, etc.) and/or data will be
created depending on the contents of the file.
The supported xml schemas are not yet documented in this wiki.
Export
++++++
phpMyAdmin can export into text files (even compressed) on your local disk (or
a special the webserver :config:option:`$cfg['SaveDir']` folder) in various
commonly used formats:
CodeGen
-------
`NHibernate <https://en.wikipedia.org/wiki/NHibernate>`_ file format. Planned
versions: Java, Hibernate, PHP PDO, JSON, etc. So the preliminary name is
codegen.
CSV
---
Comma separated values format which is often used by spreadsheets or various
other programs for export/import.
CSV for Microsoft Excel
-----------------------
This is just preconfigured version of CSV export which can be imported into
most English versions of Microsoft Excel. Some localised versions (like
"Danish") are expecting ";" instead of "," as field separator.
Microsoft Word 2000
-------------------
If you're using Microsoft Word 2000 or newer (or compatible such as
OpenOffice.org), you can use this export.
JSON
----
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It
is easy for humans to read and write and it is easy for machines to parse and
generate.
.. versionchanged:: 4.7.0
The generated JSON structure has been changed in phpMyAdmin 4.7.0 to
produce valid JSON data.
The generated JSON is list of objects with following attributes:
.. js:data:: type
Type of given object, can be one of:
``header``
Export header containing comment and phpMyAdmin version.
``database``
Start of a database marker, containing name of database.
``table``
Table data export.
.. js:data:: version
Used in ``header`` :js:data:`type` and indicates phpMyAdmin version.
.. js:data:: comment
Optional textual comment.
.. js:data:: name
Object name - either table or database based on :js:data:`type`.
.. js:data:: database
Database name for ``table`` :js:data:`type`.
.. js:data:: data
Table content for ``table`` :js:data:`type`.
Sample output:
.. code-block:: json
[
{
"comment": "Export to JSON plugin for PHPMyAdmin",
"type": "header",
"version": "4.7.0-dev"
},
{
"name": "cars",
"type": "database"
},
{
"data": [
{
"car_id": "1",
"description": "Green Chrysler 300",
"make_id": "5",
"mileage": "113688",
"price": "13545.00",
"transmission": "automatic",
"yearmade": "2007"
}
],
"database": "cars",
"name": "cars",
"type": "table"
},
{
"data": [
{
"make": "Chrysler",
"make_id": "5"
}
],
"database": "cars",
"name": "makes",
"type": "table"
}
]
LaTeX
-----
If you want to embed table data or structure in LaTeX, this is right choice for you.
LaTeX is a typesetting system that is very suitable for producing scientific
and mathematical documents of high typographical quality. It is also suitable
for producing all sorts of other documents, from simple letters to complete
books. LaTeX uses TeX as its formatting engine. Learn more about TeX and
LaTeX on `the Comprehensive TeX Archive Network <https://www.ctan.org/>`_
also see the `short description od TeX <https://www.ctan.org/tex/>`_.
The output needs to be embedded into a LaTeX document before it can be
rendered, for example in following document:
.. code-block:: latex
\documentclass{article}
\title{phpMyAdmin SQL output}
\author{}
\usepackage{longtable,lscape}
\date{}
\setlength{\parindent}{0pt}
\usepackage[left=2cm,top=2cm,right=2cm,nohead,nofoot]{geometry}
\pdfpagewidth 210mm
\pdfpageheight 297mm
\begin{document}
\maketitle
% insert phpMyAdmin LaTeX Dump here
\end{document}
MediaWiki
---------
Both tables and databases can be exported in the MediaWiki format, which is
used by Wikipedia to display tables. It can export structure, data or both,
including table names or headers.
OpenDocument Spreadsheet
------------------------
Open standard for spreadsheet data, which is being widely adopted. Many recent
spreadsheet programs, such as LibreOffice, OpenOffice, Microsoft Office or
Google Docs can handle this format.
OpenDocument Text
-----------------
New standard for text data which is being widely adopted. Most recent word
processors (such as LibreOffice, OpenOffice, Microsoft Word, AbiWord or KWord)
can handle this.
PDF
---
For presentation purposes, non editable PDF might be best choice for you.
PHP Array
---------
You can generate a php file which will declare a multidimensional array with
the contents of the selected table or database.
SQL
---
Export in SQL can be used to restore your database, thus it is useful for
backing up.
The option 'Maximal length of created query' seems to be undocumented. But
experiments has shown that it splits large extended INSERTS so each one is no
bigger than the given number of bytes (or characters?). Thus when importing the
file, for large tables you avoid the error "Got a packet bigger than
'max_allowed_packet' bytes".
.. seealso::
https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html
Data Options
~~~~~~~~~~~~
**Complete inserts** adds the column names to the SQL dump. This parameter
improves the readability and reliability of the dump. Adding the column names
increases the size of the dump, but when combined with Extended inserts it's
negligible.
**Extended inserts** combines multiple rows of data into a single INSERT query.
This will significantly decrease filesize for large SQL dumps, increases the
INSERT speed when imported, and is generally recommended.
Texy!
-----
`Texy! <https://texy.info/>`_ markup format. You can see example on `Texy! demo
<https://texy.info/en/try/4q5we>`_.
XML
---
Easily parsable export for use with custom scripts.
.. versionchanged:: 3.3.0
The XML schema used has changed as of version 3.3.0
YAML
----
YAML is a data serialization format which is both human readable and
computationally powerful ( <https://yaml.org> ).

View File

@@ -0,0 +1,32 @@
.. phpMyAdmin documentation master file, created by
sphinx-quickstart on Wed Sep 26 14:04:48 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to phpMyAdmin's documentation!
======================================
Contents:
.. toctree::
:maxdepth: 2
intro
require
setup
config
user
faq
developers
security
vendors
copyright
credits
glossary
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`
* :ref:`glossary`

View File

@@ -0,0 +1,80 @@
.. _intro:
Introduction
============
phpMyAdmin is a free software tool written in PHP that is intended to handle the
administration of a MySQL or MariaDB database server. You can use phpMyAdmin to
perform most administration tasks, including creating a database, running queries,
and adding user accounts.
Supported features
------------------
Currently phpMyAdmin can:
* create, browse, edit, and drop databases, tables, views, columns, and indexes
* display multiple results sets through stored procedures or queries
* create, copy, drop, rename and alter databases, tables, columns and
indexes
* maintenance server, databases and tables, with proposals on server
configuration
* execute, edit and bookmark any :term:`SQL`-statement, even batch-queries
* load text files into tables
* create [#f1]_ and read dumps of tables
* export [#f1]_ data to various formats: :term:`CSV`, :term:`XML`, :term:`PDF`,
:term:`ISO`/:term:`IEC` 26300 - :term:`OpenDocument` Text and Spreadsheet, Microsoft
Word 2000, and LATEX formats
* import data and :term:`MySQL` structures from :term:`OpenDocument` spreadsheets, as
well as :term:`XML`, :term:`CSV`, and :term:`SQL` files
* administer multiple servers
* add, edit, and remove MySQL user accounts and privileges
* check referential integrity in MyISAM tables
* using Query-by-example (QBE), create complex queries automatically
connecting required tables
* create :term:`PDF` graphics of your
database layout
* search globally in a database or a subset of it
* transform stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link
* track changes on databases, tables and views
* support InnoDB tables and foreign keys
* support mysqli, the improved MySQL extension see :ref:`faq1_17`
* create, edit, call, export and drop stored procedures and functions
* create, edit, export and drop events and triggers
* communicate in `80 different languages
<https://www.phpmyadmin.net/translations/>`_
Shortcut keys
-------------
Currently phpMyAdmin supports following shortcuts:
* k and CTRL+k - Toggle console
* CTRL+ALT+c - Toggle console
* h - Go to home page
* s - Open settings
* d + s - Go to database structure (Provided you are in database related page)
* d + f - Search database (Provided you are in database related page)
* t + s - Go to table structure (Provided you are in table related page)
* t + f - Search table (Provided you are in table related page)
* backspace - Takes you to older page.
A word about users
------------------
Many people have difficulty understanding the concept of user
management with regards to phpMyAdmin. When a user logs in to
phpMyAdmin, that username and password are passed directly to MySQL.
phpMyAdmin does no account management on its own (other than allowing
one to manipulate the MySQL user account information); all users must
be valid MySQL users.
.. rubric:: Footnotes
.. [#f1]
phpMyAdmin can compress (:term:`ZIP`, :term:`GZip` or :term:`RFC 1952`
formats) dumps and :term:`CSV` exports if you use PHP with
:term:`Zlib` support (``--with-zlib``).
Proper support may also need changes in :file:`php.ini`.

View File

@@ -0,0 +1,32 @@
Other sources of information
============================
Printed Book
------------
The definitive guide to using phpMyAdmin is the book Mastering phpMyAdmin for
Effective MySQL Management by Marc Delisle. You can get information on that
book and other officially endorsed `books at the phpMyAdmin site`_.
.. _books at the phpMyAdmin site: https://www.phpmyadmin.net/docs/
Tutorials
---------
Third party tutorials and articles which you might find interesting:
Česky (Czech)
+++++++++++++
- `Seriál o phpMyAdminovi <https://cihar.com/publications/linuxsoft/>`_
English
+++++++
- `Having fun with phpMyAdmin's MIME-transformations & PDF-features <https://garv.in/tops/texte/mimetutorial>`_
- `Learning SQL Using phpMyAdmin (old tutorial) <http://www.php-editors.com/articles/sql_phpmyadmin.php>`_
Русский (Russian)
+++++++++++++++++
* `Russian server about phpMyAdmin <https://php-myadmin.ru/>`_

View File

@@ -0,0 +1,74 @@
User management
===============
User management is the process of controlling which users are allowed to
connect to the MySQL server and what permissions they have on each database.
phpMyAdmin does not handle user management, rather it passes the username and
password on to MySQL, which then determines whether a user is permitted to
perform a particular action. Within phpMyAdmin, administrators have full
control over creating users, viewing and editing privileges for existing users,
and removing users.
Within phpMyAdmin, user management is controlled via the :guilabel:`User accounts` tab
from the main page. Users can be created, edited, and removed.
Creating a new user
-------------------
To create a new user, click the :guilabel:`Add user account` link near the bottom
of the :guilabel:`User accounts` page (you must be a "superuser", e.g., user "root").
Use the textboxes and drop-downs to configure the user to your particular
needs. You can then select whether to create a database for that user and grant
specific global privileges. Once you've created the user (by clicking Go), you
can define that user's permissions on a specific database (don't grant global
privileges in that case). In general, users do not need any global privileges
(other than USAGE), only permissions for their specific database.
Editing an existing user
------------------------
To edit an existing user, simply click the pencil icon to the right of that
user in the :guilabel:`User accounts` page. You can then edit their global- and
database-specific privileges, change their password, or even copy those
privileges to a new user.
Deleting a user
---------------
From the :guilabel:`User accounts` page, check the checkbox for the user you wish to
remove, select whether or not to also remove any databases of the same name (if
they exist), and click Go.
Assigning privileges to user for a specific database
----------------------------------------------------
Users are assigned to databases by editing the user record (from the
:guilabel:`User accounts` link on the home page).
If you are creating a user specifically for a given table
you will have to create the user first (with no global privileges) and then go
back and edit that user to add the table and privileges for the individual
table.
.. _configurablemenus:
Configurable menus and user groups
----------------------------------
By enabling :config:option:`$cfg['Servers'][$i]['users']` and
:config:option:`$cfg['Servers'][$i]['usergroups']` you can customize what users
will see in the phpMyAdmin navigation.
.. warning::
This feature only limits what a user sees, they are still able to use all the
functions. So this can not be considered as a security limitation. Should
you want to limit what users can do, use MySQL privileges to achieve that.
With this feature enabled, the :guilabel:`User accounts` management interface gains
a second tab for managing :guilabel:`User groups`, where you can define what each
group will view (see image below) and you can then assign each user to one of
these groups. Users will be presented with a simplified user interface, which might be
useful for inexperienced users who could be overwhelmed by all the features
phpMyAdmin provides.
.. image:: images/usergroups.png

View File

@@ -0,0 +1,84 @@
.. _relations:
Relations
=========
phpMyAdmin allows relationships (similar to foreign keys) using MySQL-native
(InnoDB) methods when available and falling back on special phpMyAdmin-only
features when needed. There are two ways of editing these relations, with the
*relation view* and the drag-and-drop *designer* -- both of which are explained
on this page.
.. note::
You need to have configured the :ref:`linked-tables` for using phpMyAdmin
only relations.
Technical info
--------------
Currently the only MySQL table type that natively supports relationships is
InnoDB. When using an InnoDB table, phpMyAdmin will create real InnoDB
relations which will be enforced by MySQL no matter which application accesses
the database. In the case of any other table type, phpMyAdmin enforces the
relations internally and those relations are not applied to any other
application.
Relation view
-------------
In order to get it working, you first have to properly create the
[[pmadb|pmadb]]. Once that is setup, select a table's "Structure" page. Below
the table definition, a link called "Relation view" is shown. If you click that
link, a page will be shown that offers you to create a link to another table
for any (most) fields. Only PRIMARY KEYS are shown there, so if the field you
are referring to is not shown, you most likely are doing something wrong. The
drop-down at the bottom is the field which will be used as the name for a
record.
Relation view example
+++++++++++++++++++++
.. image:: images/pma-relations-relation-view-link.png
.. image:: images/pma-relations-relation-link.png
Let's say you have categories and links and one category can contain several links. Your table structure would be something like this:
- `category.category_id` (must be unique)
- `category.name`
- `link.link_id`
- `link.category_id`
- `link.uri`.
Open the relation view (below the table structure) page for the `link` table and for `category_id` field, you select `category.category_id` as master record.
If you now browse the link table, the `category_id` field will be a clickable hyperlink to the proper category record. But all you see is just the `category_id`, not the name of the category.
.. image:: images/pma-relations-relation-name.png
To fix this, open the relation view of the `category` table and in the drop down at the bottom, select "name". If you now browse the link table again and hover the mouse over the `category_id` hyperlink, the value from the related category will be shown as tooltip.
.. image:: images/pma-relations-links.png
Designer
--------
The Designer feature is a graphical way of creating, editing, and displaying
phpMyAdmin relations. These relations are compatible with those created in
phpMyAdmin's relation view.
To use this feature, you need a properly configured :ref:`linked-tables` and
must have the :config:option:`$cfg['Servers'][$i]['table_coords']` configured.
To use the designer, select a database's structure page, then look for the
:guilabel:`Designer` tab.
To export the view into PDF, you have to create PDF pages first. The Designer
creates the layout, how the tables shall be displayed. To finally export the
view, you have to create this with a PDF page and select your layout, which you
have created with the designer.
.. seealso::
:ref:`faqpdf`

View File

@@ -0,0 +1,65 @@
.. _require:
Requirements
============
Web server
----------
Since phpMyAdmin's interface is based entirely in your browser, you'll need a
web server (such as Apache, nginx, :term:`IIS`) to install phpMyAdmin's files into.
PHP
---
* You need PHP 7.2.5 or newer, with ``session`` support, the Standard PHP Library
(SPL) extension, hash, ctype, and JSON support.
* The ``mbstring`` extension (see :term:`mbstring`) is strongly recommended
for performance reasons.
* To support uploading of ZIP files, you need the PHP ``zip`` extension.
* You need GD2 support in PHP to display inline thumbnails of JPEGs
("image/jpeg: inline") with their original aspect ratio.
* When using the cookie authentication (the default), the `openssl
<https://www.php.net/openssl>`_ extension is strongly suggested.
* To support upload progress bars, see :ref:`faq2_9`.
* To support XML and Open Document Spreadsheet importing, you need the
`libxml <https://www.php.net/libxml>`_ extension.
* To support reCAPTCHA on the login page, you need the
`openssl <https://www.php.net/openssl>`_ extension.
* To support displaying phpMyAdmin's latest version, you need to enable
``allow_url_open`` in your :file:`php.ini` or to have the
`curl <https://www.php.net/curl>`_ extension.
.. seealso:: :ref:`faq1_31`, :ref:`authentication_modes`
Database
--------
phpMyAdmin supports MySQL-compatible databases.
* MySQL 5.5 or newer
* MariaDB 5.5 or newer
.. seealso:: :ref:`faq1_17`
Web browser
-----------
To access phpMyAdmin you need a web browser with cookies and JavaScript
enabled.
You need a browser which is supported by Bootstrap 4.5, see
<https://getbootstrap.com/docs/4.5/getting-started/browsers-devices/>.
.. versionchanged:: 5.2.0
You need a browser which is supported by Bootstrap 5.0, see
<https://getbootstrap.com/docs/5.0/getting-started/browsers-devices/>.

View File

@@ -0,0 +1,113 @@
Security policy
===============
The phpMyAdmin developer team is putting lot of effort to make phpMyAdmin as
secure as possible. But still web application like phpMyAdmin can be vulnerable
to a number of attacks and new ways to exploit are still being explored.
For every reported vulnerability we issue a phpMyAdmin Security Announcement
(PMASA) and it get's assigned a CVE ID as well. We might group similar
vulnerabilities to one PMASA (eg. multiple XSS vulnerabilities can be announced
under one PMASA).
If you think you've found a vulnerability, please see :ref:`reporting-security`.
Typical vulnerabilities
-----------------------
In this section, we will describe typical vulnerabilities, which can appear in
our code base. This list is by no means complete, it is intended to show
typical attack surface.
Cross-site scripting (XSS)
++++++++++++++++++++++++++
When phpMyAdmin shows a piece of user data, e.g. something inside a user's
database, all html special chars have to be escaped. When this escaping is
missing somewhere a malicious user might fill a database with specially crafted
content to trick an other user of that database into executing something. This
could for example be a piece of JavaScript code that would do any number of
nasty things.
phpMyAdmin tries to escape all userdata before it is rendered into html for the
browser.
.. seealso::
`Cross-site scripting on Wikipedia <https://en.wikipedia.org/wiki/Cross-site_scripting>`_
Cross-site request forgery (CSRF)
+++++++++++++++++++++++++++++++++
An attacker would trick a phpMyAdmin user into clicking on a link to provoke
some action in phpMyAdmin. This link could either be sent via email or some
random website. If successful this the attacker would be able to perform some
action with the users privileges.
To mitigate this phpMyAdmin requires a token to be sent on sensitive requests.
The idea is that an attacker does not poses the currently valid token to
include in the presented link.
The token is regenerated for every login, so it's generally valid only for
limited time, what makes it harder for attacker to obtain valid one.
.. seealso::
`Cross-site request forgery on Wikipedia <https://en.wikipedia.org/wiki/Cross-site_request_forgery>`_
SQL injection
+++++++++++++
As the whole purpose of phpMyAdmin is to preform sql queries, this is not our
first concern. SQL injection is sensitive to us though when it concerns the
mysql control connection. This controlconnection can have additional privileges
which the logged in user does not poses. E.g. access the :ref:`linked-tables`.
User data that is included in (administrative) queries should always be run
through DatabaseInterface::escapeString().
.. seealso::
`SQL injection on Wikipedia <https://en.wikipedia.org/wiki/SQL_injection>`_
Brute force attack
++++++++++++++++++
phpMyAdmin on its own does not rate limit authentication attempts in any way.
This is caused by need to work in stateless environment, where there is no way
to protect against such kind of things.
To mitigate this, you can use Captcha or utilize external tools such as
fail2ban, this is more details described in :ref:`securing`.
.. seealso::
`Brute force attack on Wikipedia <https://en.wikipedia.org/wiki/Brute-force_attack>`_
.. _reporting-security:
Reporting security issues
-------------------------
Should you find a security issue in the phpMyAdmin programming code, please
contact the `phpMyAdmin security team <mailto:security@phpmyadmin.net>`_ in
advance before publishing it. This way we can prepare a fix and release the fix together with your
announcement. You will be also given credit in our security announcement.
You can optionally encrypt your report with PGP key ID
``DA68AB39218AB947`` with following fingerprint:
.. code-block:: console
pub 4096R/DA68AB39218AB947 2016-08-02
Key fingerprint = 5BAD 38CF B980 50B9 4BD7 FB5B DA68 AB39 218A B947
uid phpMyAdmin Security Team <security@phpmyadmin.net>
sub 4096R/5E4176FB497A31F7 2016-08-02
The key can be either obtained from the keyserver or is available in
`phpMyAdmin keyring <https://files.phpmyadmin.net/phpmyadmin.keyring>`_
available on our download server or using `Keybase <https://keybase.io/phpmyadmin_sec>`_.
Should you have suggestion on improving phpMyAdmin to make it more secure, please
report that to our `issue tracker <https://github.com/phpmyadmin/phpmyadmin/issues>`_.
Existing improvement suggestions can be found by
`hardening label <https://github.com/phpmyadmin/phpmyadmin/labels/hardening>`_.

View File

@@ -0,0 +1,21 @@
Configuring phpMyAdmin
----------------------
There are many configuration settings that can be used to customize the
interface. Those settings are described in
:ref:`config`. There are several layers of the configuration.
The global settings can be configured in :file:`config.inc.php` as described in
:ref:`config`. This is only way to configure connections to databases and other
system wide settings.
On top of this there are user settings which can be persistently stored in
:ref:`linked-tables`, possibly automatically configured through
:ref:`zeroconf`. If the :ref:`linked-tables` are not configured, the settings
are temporarily stored in the session data; these are valid only until you
logout.
You can also save the user configuration for further use, either download them
as a file or to the browser local storage. You can find both those options in
the :guilabel:`Settings` tab. The settings stored in browser local storage will
be automatically offered for loading upon your login to phpMyAdmin.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,100 @@
.. _themes:
Custom Themes
=============
phpMyAdmin comes with support for third party themes. You can download
additional themes from our website at <https://www.phpmyadmin.net/themes/>.
Configuration
-------------
Themes are configured with :config:option:`$cfg['ThemeManager']` and
:config:option:`$cfg['ThemeDefault']`. Under :file:`./themes/`, you should not
delete the directory ``pmahomme`` or its underlying structure, because this is
the system theme used by phpMyAdmin. ``pmahomme`` contains all images and
styles, for backwards compatibility and for all themes that would not include
images or css-files. If :config:option:`$cfg['ThemeManager']` is enabled, you
can select your favorite theme on the main page. Your selected theme will be
stored in a cookie.
Creating custom theme
---------------------
To create a theme:
* make a new subdirectory (for example "your\_theme\_name") under :file:`./themes/`.
* copy the files and directories from ``pmahomme`` to "your\_theme\_name"
* edit the css-files in "your\_theme\_name/css"
* put your new images in "your\_theme\_name/img"
* edit :file:`_variables.scss` in "your\_theme\_name/scss"
* edit :file:`theme.json` in "your\_theme\_name" to contain theme metadata (see below)
* make a new screenshot of your theme and save it under
"your\_theme\_name/screen.png"
Theme metadata
++++++++++++++
.. versionchanged:: 4.8.0
Before 4.8.0 the theme metadata was passed in the :file:`info.inc.php` file.
It has been replaced by :file:`theme.json` to allow easier parsing (without
need to handle PHP code) and to support additional features.
In theme directory there is file :file:`theme.json` which contains theme
metadata. Currently it consists of:
.. describe:: name
Display name of the theme.
**This field is required.**
.. describe:: version
Theme version, can be quite arbitrary and does not have to match phpMyAdmin version.
**This field is required.**
.. describe:: description
Theme description. this will be shown on the website.
**This field is required.**
.. describe:: author
Theme author name.
**This field is required.**
.. describe:: url
Link to theme author website. It's good idea to have way for getting
support there.
.. describe:: supports
Array of supported phpMyAdmin major versions.
**This field is required.**
For example, the definition for Original theme shipped with phpMyAdmin 4.8:
.. code-block:: json
{
"name": "Original",
"version": "4.8",
"description": "Original phpMyAdmin theme",
"author": "phpMyAdmin developers",
"url": "https://www.phpmyadmin.net/",
"supports": ["4.8"]
}
Sharing images
++++++++++++++
If you do not want to use your own symbols and buttons, remove the
directory "img" in "your\_theme\_name". phpMyAdmin will use the
default icons and buttons (from the system-theme ``pmahomme``).

View File

@@ -0,0 +1,158 @@
.. _transformations:
Transformations
===============
.. note::
You need to have configured the :ref:`linked-tables` to use the transformations
feature.
.. _transformationsintro:
Introduction
++++++++++++
To enable transformations, you have to set up the ``column_info``
table and the proper directives. Please see the :ref:`config` on how to do so.
phpMyAdmin has two different types of transformations: browser display
transformations, which affect only how the data is shown when browsing
through phpMyAdmin; and input transformations, which affect a value
prior to being inserted through phpMyAdmin.
You can apply different transformations to the contents of each
column. Each transformation has options to define how it will affect the
stored data.
Say you have a column ``filename`` which contains a filename. Normally
you would see in phpMyAdmin only this filename. Using display transformations
you can transform that filename into a HTML link, so you can click
inside of the phpMyAdmin structure on the column's link and will see
the file displayed in a new browser window. Using transformation
options you can also specify strings to append/prepend to a string or
the format you want the output stored in.
For a general overview of all available transformations and their
options, you can either go to the ``Change`` link for an existing column
or from the dialog to create a new column, in either case there is a link
on that column structure page for "Browser display transformation" and
"Input transformation" which will show more information about each
transformation that is available on your system.
For a tutorial on how to effectively use transformations, see our
`Link section <https://www.phpmyadmin.net/docs/>`_ on the
official phpMyAdmin homepage.
.. _transformationshowto:
Usage
+++++
Go to the table structure page (reached by clicking on
the 'Structure' link for a table). There click on "Change" (or the change
icon) and there you will see the five transformation--related fields at the end of the line.
They are called ':term:`Media type`', 'Browser transformation' and
'Transformation options'.
* The field ':term:`Media type`' is a drop-down field. Select the :term:`Media type` that
corresponds to the column's contents. Please note that many transformations
are inactive until a :term:`Media type` is selected.
* The field 'Browser display transformation' is a drop-down field. You can
choose from a hopefully growing amount of pre-defined transformations.
See below for information on how to build your own transformation.
There are global transformations and mimetype-bound transformations.
Global transformations can be used for any mimetype. They will take
the mimetype, if necessary, into regard. Mimetype-bound
transformations usually only operate on a certain mimetype. There are
transformations which operate on the main mimetype (like 'image'),
which will most likely take the subtype into regard, and those who
only operate on a specific subtype (like 'image/jpeg'). You can use
transformations on mimetypes for which the function was not defined
for. There is no security check for you selected the right
transformation, so take care of what the output will be like.
* The field 'Browser display transformation options' is a free-type textfield. You have
to enter transform-function specific options here. Usually the
transforms can operate with default options, but it is generally a
good idea to look up the overview to see which options are necessary.
Much like the ENUM/SET-Fields, you have to split up several options
using the format 'a','b','c',...(NOTE THE MISSING BLANKS). This is
because internally the options will be parsed as an array, leaving the
first value the first element in the array, and so forth. If you want
to specify a MIME character set you can define it in the
transformation\_options. You have to put that outside of the pre-
defined options of the specific mime-transform, as the last value of
the set. Use the format "'; charset=XXX'". If you use a transform, for
which you can specify 2 options and you want to append a character
set, enter "'first parameter','second parameter','charset=us-ascii'".
You can, however use the defaults for the parameters: "'','','charset
=us-ascii'". The default options can be configured using
:config:option:`$cfg['DefaultTransformations']`.
* 'Input transformation' is another drop-down menu that corresponds exactly
with the instructions above for "Browser display transformation" except
these these affect the data before insertion in to the database. These are
most commonly used to either provide a specialized editor (for example, using
the phpMyAdmin SQL editor interface) or selector (such as for uploading an image).
It's also possible to manipulate the data such as converting an IPv4 address to binary
or parsing it through a regular expression.
* Finally, 'Input transformation options' is the equivalent of the "Browser display
transformation options" section above and is where optional and required parameters are entered.
.. _transformationsfiles:
File structure
++++++++++++++
All specific transformations for mimetypes are defined through class
files in the directory :file:`libraries/classes/Plugins/Transformations/`. Each of
them extends a certain transformation abstract class declared in
:file:`libraries/classes/Plugins/Transformations/Abs`.
They are stored in files to ease customization and to allow easy adding of
new or custom transformations.
Because the user cannot enter their own mimetypes, it is kept certain that
the transformations will always work. It makes no sense to apply a
transformation to a mimetype the transform-function doesn't know to
handle.
There is a file called :file:`libraries/classes/Plugins/Transformations.php` that provides some
basic functions which can be included by any other transform function.
The file name convention is ``[Mimetype]_[Subtype]_[Transformation
Name].php``, while the abstract class that it extends has the
name ``[Transformation Name]TransformationsPlugin``. All of the
methods that have to be implemented by a transformations plug-in are:
#. getMIMEType() and getMIMESubtype() in the main class;
#. getName(), getInfo() and applyTransformation() in the abstract class
it extends.
The getMIMEType(), getMIMESubtype() and getName() methods return the
name of the MIME type, MIME Subtype and transformation accordingly.
getInfo() returns the transformation's description and possible
options it may receive and applyTransformation() is the method that
does the actual work of the transformation plug-in.
Please see the :file:`libraries/classes/Plugins/Transformations/TEMPLATE` and
:file:`libraries/classes/Plugins/Transformations/TEMPLATE\_ABSTRACT` files for adding
your own transformation plug-in. You can also generate a new
transformation plug-in (with or without the abstract transformation
class), by using
:file:`scripts/transformations_generator_plugin.sh` or
:file:`scripts/transformations_generator_main_class.sh`.
The applyTransformation() method always gets passed three variables:
#. **$buffer** - Contains the text inside of the column. This is the
text, you want to transform.
#. **$options** - Contains any user-passed options to a transform
function as an array.
#. **$meta** - Contains an object with information about your column. The
data is drawn from the output of the `mysql\_fetch\_field()
<https://www.php.net/mysql_fetch_field>`_ function. This means, all
object properties described on the `manual page
<https://www.php.net/mysql_fetch_field>`_ are available in this
variable and can be used to transform a column accordingly to
unsigned/zerofill/not\_null/... properties. The $meta->mimetype
variable contains the original :term:`Media type` of the column (i.e.
'text/plain', 'image/jpeg' etc.)

View File

@@ -0,0 +1,69 @@
.. _2fa:
Two-factor authentication
=========================
.. versionadded:: 4.8.0
Since phpMyAdmin 4.8.0 you can configure two-factor authentication to be
used when logging in. To use this, you first need to configure the
:ref:`linked-tables`. Once this is done, every user can opt-in for the second
authentication factor in the :guilabel:`Settings`.
When running phpMyAdmin from the Git source repository, the dependencies must be installed
manually; the typical way of doing so is with the command:
.. code-block:: sh
composer require pragmarx/google2fa-qrcode bacon/bacon-qr-code
Or when using a hardware security key with FIDO U2F:
.. code-block:: sh
composer require code-lts/u2f-php-server
Authentication Application (2FA)
--------------------------------
Using an application for authentication is a quite common approach based on HOTP and
`TOTP <https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm>`_.
It is based on transmitting a private key from phpMyAdmin to the authentication
application and the application is then able to generate one time codes based
on this key. The easiest way to enter the key in to the application from phpMyAdmin is
through scanning a QR code.
There are dozens of applications available for mobile phones to implement these
standards, the most widely used include:
* `FreeOTP for iOS, Android and Pebble <https://freeotp.github.io/>`_
* `Authy for iOS, Android, Chrome, OS X <https://authy.com/>`_
* `Google Authenticator for iOS <https://apps.apple.com/us/app/google-authenticator/id388497605>`_
* `Google Authenticator for Android <https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2>`_
* `LastPass Authenticator for iOS, Android, OS X, Windows <https://lastpass.com/auth/>`_
Hardware Security Key (FIDO U2F)
--------------------------------
Using hardware tokens is considered to be more secure than a software based
solution. phpMyAdmin supports `FIDO U2F <https://en.wikipedia.org/wiki/Universal_2nd_Factor>`_
tokens.
There are several manufacturers of these tokens, for example:
* `youbico FIDO U2F Security Key <https://www.yubico.com/fido-u2f/>`_
* `HyperFIDO <https://www.hypersecu.com/hyperfido>`_
* `Trezor Hardware Wallet <https://trezor.io/?offer_id=12&aff_id=1592&source=phpmyadmin>`_ can act as an `U2F token <https://trezor.io/learn/a/what-is-u2f>`_
* `List of Two Factor Auth (2FA) Dongles <https://www.dongleauth.com/dongles/>`_
.. _simple2fa:
Simple two-factor authentication
--------------------------------
This authentication is included for testing and demonstration purposes only as
it really does not provide two-factor authentication, it just asks the user to confirm login by
clicking on the button.
It should not be used in the production and is disabled unless
:config:option:`$cfg['DBG']['simple2fa']` is set.

View File

@@ -0,0 +1,16 @@
User Guide
==========
.. toctree::
:maxdepth: 2
settings
two_factor
transformations
bookmarks
privileges
relations
charts
import_export
themes
other

View File

@@ -0,0 +1,51 @@
Distributing and packaging phpMyAdmin
=====================================
This document is intended to give pieces of advice to people who want to
redistribute phpMyAdmin inside other software packages such as Linux
distribution or some all in one package including web server and MySQL
server.
Generally, you can customize some basic aspects (paths to some files and
behavior) in :file:`libraries/vendor_config.php`.
For example, if you want setup script to generate a config file in var, change
``SETUP_CONFIG_FILE`` to :file:`/var/lib/phpmyadmin/config.inc.php` and you
will also probably want to skip directory writable check, so set
``SETUP_DIR_WRITABLE`` to false.
External libraries
------------------
phpMyAdmin includes several external libraries, you might want to
replace them with system ones if they are available, but please note
that you should test whether the version you provide is compatible with the
one we ship.
Currently known list of external libraries:
js/vendor
jQuery js framework libraries and various js libraries.
vendor/
The download kit includes various Composer packages as
dependencies.
Specific files LICENSES
-----------------------
phpMyAdmin distributed themes contain some content that is under licenses.
- The icons of the `Original` and `pmahomme` themes are from the `Silk Icons <https://web.archive.org/web/20221201060206/http://www.famfamfam.com/lab/icons/silk/>`_.
- Some icons of the `Metro` theme are from the `Silk Icons <https://web.archive.org/web/20221201060206/http://www.famfamfam.com/lab/icons/silk/>`_.
- `themes/*/img/b_rename.svg` Is a `Icons8 <https://thenounproject.com/Icons8/>`_, icon from the `Android L Icon Pack Collection <https://thenounproject.com/Icons8/collection/android-l-icon-pack/>`_. The icon `rename <https://thenounproject.com/term/rename/61456/>`_.
- `themes/metro/img/user.svg` Is a IcoMoon the `user <https://github.com/Keyamoon/IcoMoon-Free/blob/master/SVG/114-user.svg>`_
CC BY 4.0 or GPL
Licenses for vendors
--------------------
- Silk Icons are under the `CC BY 2.5 or CC BY 3.0 <https://web.archive.org/web/20221201060206/http://www.famfamfam.com/lab/icons/silk/>`_ licenses.
- `rename` from `Icons8` is under the `"public domain" <https://creativecommons.org/publicdomain/zero/1.0/>`_ (CC0 1.0) license.
- IcoMoon Free is under `"CC BY 4.0 or GPL" <https://github.com/Keyamoon/IcoMoon-Free/blob/master/License.txt>`_.

View File

@@ -0,0 +1,134 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}

View File

@@ -0,0 +1,900 @@
/*
* basic.css
* ~~~~~~~~~
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/* -- main layout ----------------------------------------------------------- */
div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
width: 100%;
font-size: 90%;
}
div.related h3 {
display: none;
}
div.related ul {
margin: 0;
padding: 0 0 0 10px;
list-style: none;
}
div.related li {
display: inline;
}
div.related li.right {
float: right;
margin-right: 5px;
}
/* -- sidebar --------------------------------------------------------------- */
div.sphinxsidebarwrapper {
padding: 10px 5px 0 10px;
}
div.sphinxsidebar {
float: left;
width: 230px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
overflow-wrap : break-word;
}
div.sphinxsidebar ul {
list-style: none;
}
div.sphinxsidebar ul ul,
div.sphinxsidebar ul.want-points {
margin-left: 20px;
list-style: square;
}
div.sphinxsidebar ul ul {
margin-top: 0;
margin-bottom: 0;
}
div.sphinxsidebar form {
margin-top: 10px;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
padding: 0.25em;
box-sizing: border-box;
}
div.sphinxsidebar #searchbox input[type="submit"] {
float: left;
width: 20%;
border-left: none;
padding: 0.25em;
box-sizing: border-box;
}
img {
border: 0;
max-width: 100%;
}
/* -- search page ----------------------------------------------------------- */
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
/* -- index page ------------------------------------------------------------ */
table.contentstable {
width: 90%;
margin-left: auto;
margin-right: auto;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
/* -- general index --------------------------------------------------------- */
table.indextable {
width: 100%;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable ul {
margin-top: 0;
margin-bottom: 0;
list-style-type: none;
}
table.indextable > tbody > tr > td > ul {
padding-left: 0em;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
div.modindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
div.genindex-jumpbox {
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 1em 0 1em 0;
padding: 0.4em;
}
/* -- domain module index --------------------------------------------------- */
table.modindextable td {
padding: 2px;
border-collapse: collapse;
}
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 360px;
max-width: 800px;
}
div.body p, div.body dd, div.body li, div.body blockquote {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
a.headerlink {
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
div.body p.caption {
text-align: inherit;
}
div.body td {
text-align: left;
}
.first {
margin-top: 0 !important;
}
p.rubric {
margin-top: 30px;
font-weight: bold;
}
img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
margin: 10px 0 10px 0;
}
p.topic-title {
font-size: 1.1em;
font-weight: bold;
margin-top: 10px;
}
/* -- admonitions ----------------------------------------------------------- */
div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
}
div.admonition dt {
font-weight: bold;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
}
div.body p.centered {
text-align: center;
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
table caption span.caption-text {
}
table.docutils td, table.docutils th {
padding: 1px 8px 1px 5px;
border-top: 0;
border-left: 0;
border-right: 0;
border-bottom: 1px solid #aaa;
}
th {
text-align: left;
padding-right: 5px;
}
table.citation {
border-left: solid 1px gray;
margin-left: 1px;
}
table.citation td {
border-bottom: none;
}
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption, figcaption {
padding: 0.3em;
}
div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text,
figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
table.field-list td, table.field-list th {
border: 0 !important;
}
.field-list ul {
margin: 0;
padding-left: 1em;
}
.field-list p {
margin: 0;
}
.field-name {
-moz-hyphens: manual;
-ms-hyphens: manual;
-webkit-hyphens: manual;
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
list-style: decimal;
}
ol.loweralpha {
list-style: lower-alpha;
}
ol.upperalpha {
list-style: upper-alpha;
}
ol.lowerroman {
list-style: lower-roman;
}
ol.upperroman {
list-style: upper-roman;
}
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
aside.footnote > span,
div.citation > span {
float: left;
}
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd > :first-child {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
rect.highlighted {
fill: #fbe54e;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
.versionmodified {
font-style: italic;
}
.system-message {
background-color: #fda;
padding: 5px;
border: 3px solid red;
}
.footnote:target {
background-color: #ffa;
}
.line-block {
display: block;
margin-top: 1em;
margin-bottom: 1em;
}
.line-block .line-block {
margin-top: 0;
margin-bottom: 0;
margin-left: 1.5em;
}
.guilabel, .menuselection {
font-family: sans-serif;
}
.accelerator {
text-decoration: underline;
}
.classifier {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
/* -- code displays --------------------------------------------------------- */
pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class*="highlight-"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}
div[class*="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
div.code-block-caption code {
background-color: transparent;
}
table.highlighttable td.linenos,
span.linenos,
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
}
div.code-block-caption span.caption-number {
padding: 0.1em 0.3em;
font-style: italic;
}
div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
margin: 1em 0;
}
code.xref, a code {
background-color: transparent;
font-weight: bold;
}
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
background-color: transparent;
}
.viewcode-link {
float: right;
}
.viewcode-back {
float: right;
font-family: sans-serif;
}
div.viewcode-block:target {
margin: -1px -10px;
padding: 0 10px;
}
/* -- math display ---------------------------------------------------------- */
img.math {
vertical-align: middle;
}
div.body div.math p {
text-align: center;
}
span.eqno {
float: right;
}
span.eqno a.headerlink {
position: absolute;
z-index: 1;
}
div.math:hover a.headerlink {
visibility: visible;
}
/* -- printout stylesheet --------------------------------------------------- */
@media print {
div.document,
div.documentwrapper,
div.bodywrapper {
margin: 0 !important;
width: 100%;
}
div.sphinxsidebar,
div.related,
div.footer,
#top-link {
display: none;
}
}

View File

@@ -0,0 +1,269 @@
/*
* classic.css_t
* ~~~~~~~~~~~~~
*
* Sphinx stylesheet -- classic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
html {
/* CSS hack for macOS's scrollbar (see #1125) */
background-color: #FFFFFF;
}
body {
font-family: sans-serif;
font-size: 100%;
background-color: #11303d;
color: #000;
margin: 0;
padding: 0;
}
div.document {
display: flex;
background-color: #1c4e63;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 230px;
}
div.body {
background-color: #ffffff;
color: #000000;
padding: 0 20px 30px 20px;
}
div.footer {
color: #ffffff;
width: 100%;
padding: 9px 0 9px 0;
text-align: center;
font-size: 75%;
}
div.footer a {
color: #ffffff;
text-decoration: underline;
}
div.related {
background-color: #133f52;
line-height: 30px;
color: #ffffff;
}
div.related a {
color: #ffffff;
}
div.sphinxsidebar {
}
div.sphinxsidebar h3 {
font-family: 'Trebuchet MS', sans-serif;
color: #ffffff;
font-size: 1.4em;
font-weight: normal;
margin: 0;
padding: 0;
}
div.sphinxsidebar h3 a {
color: #ffffff;
}
div.sphinxsidebar h4 {
font-family: 'Trebuchet MS', sans-serif;
color: #ffffff;
font-size: 1.3em;
font-weight: normal;
margin: 5px 0 0 0;
padding: 0;
}
div.sphinxsidebar p {
color: #ffffff;
}
div.sphinxsidebar p.topless {
margin: 5px 10px 10px 10px;
}
div.sphinxsidebar ul {
margin: 10px;
padding: 0;
color: #ffffff;
}
div.sphinxsidebar a {
color: #98dbcc;
}
div.sphinxsidebar input {
border: 1px solid #98dbcc;
font-family: sans-serif;
font-size: 1em;
}
/* -- hyperlink styles ------------------------------------------------------ */
a {
color: #355f7c;
text-decoration: none;
}
a:visited {
color: #355f7c;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* -- body styles ----------------------------------------------------------- */
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: 'Trebuchet MS', sans-serif;
background-color: #f2f2f2;
font-weight: normal;
color: #20435c;
border-bottom: 1px solid #ccc;
margin: 20px -20px 10px -20px;
padding: 3px 0 3px 10px;
}
div.body h1 { margin-top: 0; font-size: 200%; }
div.body h2 { font-size: 160%; }
div.body h3 { font-size: 140%; }
div.body h4 { font-size: 120%; }
div.body h5 { font-size: 110%; }
div.body h6 { font-size: 100%; }
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
div.body p, div.body dd, div.body li, div.body blockquote {
text-align: justify;
line-height: 130%;
}
div.admonition p.admonition-title + p {
display: inline;
}
div.admonition p {
margin-bottom: 5px;
}
div.admonition pre {
margin-bottom: 5px;
}
div.admonition ul, div.admonition ol {
margin-bottom: 5px;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
nav.contents,
aside.topic,
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre {
padding: 5px;
background-color: unset;
color: unset;
line-height: 120%;
border: 1px solid #ac9;
border-left: none;
border-right: none;
}
code {
background-color: #ecf0f3;
padding: 0 1px 0 1px;
font-size: 0.95em;
}
th, dl.field-list > dt {
background-color: #ede;
}
.warning code {
background: #efc2c2;
}
.note code {
background: #d6d6d6;
}
.viewcode-back {
font-family: sans-serif;
}
div.viewcode-block:target {
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
div.code-block-caption {
color: #efefef;
background-color: #1c4e63;
}

View File

@@ -0,0 +1 @@
@import url("classic.css");

View File

@@ -0,0 +1,156 @@
/*
* doctools.js
* ~~~~~~~~~~~
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
document.addEventListener("DOMContentLoaded", callback);
}
};
/**
* Small JavaScript module for the documentation.
*/
const Documentation = {
init: () => {
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
/**
* i18n support
*/
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext: (string) => {
const translated = Documentation.TRANSLATIONS[string];
switch (typeof translated) {
case "undefined":
return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
}
},
ngettext: (singular, plural, n) => {
const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated !== "undefined")
return translated[Documentation.PLURAL_EXPR(n)];
return n === 1 ? singular : plural;
},
addTranslations: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
},
/**
* helper function to focus on search bar
*/
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
},
/**
* Initialise the domain index toggle buttons
*/
initDomainIndexTable: () => {
const toggler = (el) => {
const idNumber = el.id.substr(7);
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (el.src.substr(-9) === "minus.png") {
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
toggledRows.forEach((el) => (el.style.display = "none"));
} else {
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
},
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.altKey || event.ctrlKey || event.metaKey) return;
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
}
break;
case "ArrowRight":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
}
break;
}
}
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
});
},
};
// quick alias for translations
const _ = Documentation.gettext;
_ready(Documentation.init);

View File

@@ -0,0 +1,14 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '5.2.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

10907
pma/doc/html/_static/jquery.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,199 @@
/*
* language_data.js
* ~~~~~~~~~~~~~~~~
*
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
/* Non-minified version is copied as a separate JS file, is available */
/**
* Porter Stemmer
*/
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
};
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

View File

@@ -0,0 +1,74 @@
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #eeffcc; }
.highlight .c { color: #408090; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #007020 } /* Comment.Preproc */
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #333333 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #902000 } /* Keyword.Type */
.highlight .m { color: #208050 } /* Literal.Number */
.highlight .s { color: #4070a0 } /* Literal.String */
.highlight .na { color: #4070a0 } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
.highlight .no { color: #60add5 } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #007020 } /* Name.Exception */
.highlight .nf { color: #06287e } /* Name.Function */
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #bb60d5 } /* Name.Variable */
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
.highlight .mf { color: #208050 } /* Literal.Number.Float */
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
.highlight .sr { color: #235388 } /* Literal.String.Regex */
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #06287e } /* Name.Function.Magic */
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */

View File

@@ -0,0 +1,577 @@
/*
* searchtools.js
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
/**
* Simple result scoring code.
*/
if (typeof Scorer === "undefined") {
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [docname, title, anchor, descr, score, filename]
// and returns the new score.
/*
score: result => {
const [docname, title, anchor, descr, score, filename] = result
return score
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {
0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5, // used to be unimportantResults
},
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
partialTitle: 7,
// query found in terms
term: 5,
partialTerm: 2,
};
}
const _removeChildren = (element) => {
while (element && element.lastChild) element.removeChild(element.lastChild);
};
/**
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
*/
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const [docName, title, anchor, descr, score, _filename] = item;
let listItem = document.createElement("li");
let requestUrl;
let linkUrl;
if (docBuilder === "dirhtml") {
// dirhtml builder
let dirname = docName + "/";
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
const rehighlightListItem = () => window.setTimeout(() => {
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}, 10);
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
rehighlightListItem();
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
.then((data) => {
if (data)
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
rehighlightListItem();
});
Search.output.appendChild(listItem);
};
const _finishSearch = (resultCount) => {
Search.stopPulse();
Search.title.innerText = _("Search Results");
if (!resultCount)
Search.status.innerText = Documentation.gettext(
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
);
else
Search.status.innerText = _(
`Search finished, found ${resultCount} page(s) matching the search query.`
);
};
const _displayNextItem = (
results,
resultCount,
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
// search finished, update title and status message
else _finishSearch(resultCount);
};
/**
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
* custom function per language.
*
* The regular expression works by splitting the string on consecutive characters
* that are not Unicode letters, numbers, underscores, or emoji characters.
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
*/
if (typeof splitQuery === "undefined") {
var splitQuery = (query) => query
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
.filter(term => term) // remove remaining empty strings
}
/**
* Search Module
*/
const Search = {
_index: null,
_queued_query: null,
_pulse_status: -1,
htmlToText: (htmlString) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
const docContent = htmlElement.querySelector('[role="main"]');
if (docContent !== undefined) return docContent.textContent;
console.warn(
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
);
return "";
},
init: () => {
const query = new URLSearchParams(window.location.search).get("q");
document
.querySelectorAll('input[name="q"]')
.forEach((el) => (el.value = query));
if (query) Search.performSearch(query);
},
loadIndex: (url) =>
(document.body.appendChild(document.createElement("script")).src = url),
setIndex: (index) => {
Search._index = index;
if (Search._queued_query !== null) {
const query = Search._queued_query;
Search._queued_query = null;
Search.query(query);
}
},
hasIndex: () => Search._index !== null,
deferQuery: (query) => (Search._queued_query = query),
stopPulse: () => (Search._pulse_status = -1),
startPulse: () => {
if (Search._pulse_status >= 0) return;
const pulse = () => {
Search._pulse_status = (Search._pulse_status + 1) % 4;
Search.dots.innerText = ".".repeat(Search._pulse_status);
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
};
pulse();
},
/**
* perform a search for something (or wait until index is loaded)
*/
performSearch: (query) => {
// create the required interface elements
const searchText = document.createElement("h2");
searchText.textContent = _("Searching");
const searchSummary = document.createElement("p");
searchSummary.classList.add("search-summary");
searchSummary.innerText = "";
const searchList = document.createElement("ul");
searchList.classList.add("search");
const out = document.getElementById("search-results");
Search.title = out.appendChild(searchText);
Search.dots = Search.title.appendChild(document.createElement("span"));
Search.status = out.appendChild(searchSummary);
Search.output = out.appendChild(searchList);
const searchProgress = document.getElementById("search-progress");
// Some themes don't use the search progress node
if (searchProgress) {
searchProgress.innerText = _("Preparing search...");
}
Search.startPulse();
// index already loaded, the browser was quick!
if (Search.hasIndex()) Search.query(query);
else Search.deferQuery(query);
},
/**
* execute search (requires search index to be loaded)
*/
query: (query) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const titles = Search._index.titles;
const allTitles = Search._index.alltitles;
const indexEntries = Search._index.indexentries;
// stem the search terms and add them to the correct list
const stemmer = new Stemmer();
const searchTerms = new Set();
const excludedTerms = new Set();
const highlightTerms = new Set();
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
splitQuery(query.trim()).forEach((queryTerm) => {
const queryTermLower = queryTerm.toLowerCase();
// maybe skip this "word"
// stopwords array is from language_data.js
if (
stopwords.indexOf(queryTermLower) !== -1 ||
queryTerm.match(/^\d+$/)
)
return;
// stem the word
let word = stemmer.stemWord(queryTermLower);
// select the correct list
if (word[0] === "-") excludedTerms.add(word.substr(1));
else {
searchTerms.add(word);
highlightTerms.add(queryTermLower);
}
});
if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
}
// console.debug("SEARCH: searching for:");
// console.info("required: ", [...searchTerms]);
// console.info("excluded: ", [...excludedTerms]);
// array of [docname, title, anchor, descr, score, filename]
let results = [];
_removeChildren(document.getElementById("search-progress"));
const queryLower = query.toLowerCase();
for (const [title, foundTitles] of Object.entries(allTitles)) {
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
for (const [file, id] of foundTitles) {
let score = Math.round(100 * queryLower.length / title.length)
results.push([
docNames[file],
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
null,
score,
filenames[file],
]);
}
}
}
// search for explicit entries in index directives
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
for (const [file, id] of foundEntries) {
let score = Math.round(100 * queryLower.length / entry.length)
results.push([
docNames[file],
titles[file],
id ? "#" + id : "",
null,
score,
filenames[file],
]);
}
}
}
// lookup as object
objectTerms.forEach((term) =>
results.push(...Search.performObjectSearch(term, objectTerms))
);
// lookup as search terms in fulltext
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
// let the scorer override scores with a custom scoring function
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
// now sort the results by score (in opposite order of appearance, since the
// display function below uses pop() to retrieve items) and then
// alphabetically
results.sort((a, b) => {
const leftScore = a[4];
const rightScore = b[4];
if (leftScore === rightScore) {
// same score: sort alphabetically
const leftTitle = a[1].toLowerCase();
const rightTitle = b[1].toLowerCase();
if (leftTitle === rightTitle) return 0;
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
}
return leftScore > rightScore ? 1 : -1;
});
// remove duplicate search results
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
let seen = new Set();
results = results.reverse().reduce((acc, result) => {
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
if (!seen.has(resultStr)) {
acc.push(result);
seen.add(resultStr);
}
return acc;
}, []);
results = results.reverse();
// for debugging
//Search.lastresults = results.slice(); // a copy
// console.info("search results:", Search.lastresults);
// print the results
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},
/**
* search for object names
*/
performObjectSearch: (object, objectTerms) => {
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const objects = Search._index.objects;
const objNames = Search._index.objnames;
const titles = Search._index.titles;
const results = [];
const objectSearchCallback = (prefix, match) => {
const name = match[4]
const fullname = (prefix ? prefix + "." : "") + name;
const fullnameLower = fullname.toLowerCase();
if (fullnameLower.indexOf(object) < 0) return;
let score = 0;
const parts = fullnameLower.split(".");
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullnameLower === object || parts.slice(-1)[0] === object)
score += Scorer.objNameMatch;
else if (parts.slice(-1)[0].indexOf(object) > -1)
score += Scorer.objPartialMatch; // matches in last name
const objName = objNames[match[1]][2];
const title = titles[match[0]];
// If more than one term searched for, we require other words to be
// found in the name/title/description
const otherTerms = new Set(objectTerms);
otherTerms.delete(object);
if (otherTerms.size > 0) {
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
if (
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
)
return;
}
let anchor = match[3];
if (anchor === "") anchor = fullname;
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
const descr = objName + _(", in ") + title;
// add custom score for some objects according to scorer
if (Scorer.objPrio.hasOwnProperty(match[2]))
score += Scorer.objPrio[match[2]];
else score += Scorer.objPrioDefault;
results.push([
docNames[match[0]],
fullname,
"#" + anchor,
descr,
score,
filenames[match[0]],
]);
};
Object.keys(objects).forEach((prefix) => {
if (!(objects[prefix] instanceof Array)) {
objects[prefix] = Object.entries(objects[prefix]).map(([name, match]) => [...match, name]);
}
objects[prefix].forEach((array) =>
objectSearchCallback(prefix, array)
);
});
return results;
},
/**
* search for full-text terms in the index
*/
performTermsSearch: (searchTerms, excludedTerms) => {
// prepare search
const terms = Search._index.terms;
const titleTerms = Search._index.titleterms;
const filenames = Search._index.filenames;
const docNames = Search._index.docnames;
const titles = Search._index.titles;
const scoreMap = new Map();
const fileMap = new Map();
// perform the search on the required terms
searchTerms.forEach((word) => {
const files = [];
const arr = [
{ files: terms[word], score: Scorer.term },
{ files: titleTerms[word], score: Scorer.title },
];
// add support for partial matches
if (word.length > 2) {
const escapedWord = _escapeRegExp(word);
Object.keys(terms).forEach((term) => {
if (term.match(escapedWord) && !terms[word])
arr.push({ files: terms[term], score: Scorer.partialTerm });
});
Object.keys(titleTerms).forEach((term) => {
if (term.match(escapedWord) && !titleTerms[word])
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
});
}
// no match but word was a required one
if (arr.every((record) => record.files === undefined)) return;
// found search word in contents
arr.forEach((record) => {
if (record.files === undefined) return;
let recordFiles = record.files;
if (recordFiles.length === undefined) recordFiles = [recordFiles];
files.push(...recordFiles);
// set score for the word in each file
recordFiles.forEach((file) => {
if (!scoreMap.has(file)) scoreMap.set(file, {});
scoreMap.get(file)[word] = record.score;
});
});
// create the mapping
files.forEach((file) => {
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
fileMap.get(file).push(word);
else fileMap.set(file, [word]);
});
});
// now check if the files don't contain excluded terms
const results = [];
for (const [file, wordList] of fileMap) {
// check if all requirements are matched
// as search terms with length < 3 are discarded
const filteredTermCount = [...searchTerms].filter(
(term) => term.length > 2
).length;
if (
wordList.length !== searchTerms.size &&
wordList.length !== filteredTermCount
)
continue;
// ensure that none of the excluded terms is in the search result
if (
[...excludedTerms].some(
(term) =>
terms[term] === file ||
titleTerms[term] === file ||
(terms[term] || []).includes(file) ||
(titleTerms[term] || []).includes(file)
)
)
break;
// select one (max) score for the file.
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
// add result to the result list
results.push([
docNames[file],
titles[file],
"",
null,
score,
filenames[file],
]);
}
return results;
},
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
* of stemmed words.
*/
makeSearchSummary: (htmlText, keywords) => {
const text = Search.htmlToText(htmlText);
if (text === "") return null;
const textLower = text.toLowerCase();
const actualStartPosition = [...keywords]
.map((k) => textLower.indexOf(k.toLowerCase()))
.filter((i) => i > -1)
.slice(-1)[0];
const startWithContext = Math.max(actualStartPosition - 120, 0);
const top = startWithContext === 0 ? "" : "...";
const tail = startWithContext + 240 < text.length ? "..." : "";
let summary = document.createElement("p");
summary.classList.add("context");
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
return summary;
},
};
_ready(Search.init);

View File

@@ -0,0 +1,70 @@
/*
* sidebar.js
* ~~~~~~~~~~
*
* This script makes the Sphinx sidebar collapsible.
*
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
* used to collapse and expand the sidebar.
*
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
* and the width of the sidebar and the margin-left of the document
* are decreased. When the sidebar is expanded the opposite happens.
* This script saves a per-browser/per-session cookie used to
* remember the position of the sidebar among the pages.
* Once the browser is closed the cookie is deleted and the position
* reset to the default (expanded).
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
const initialiseSidebar = () => {
// global elements used by the functions.
const bodyWrapper = document.getElementsByClassName("bodywrapper")[0]
const sidebar = document.getElementsByClassName("sphinxsidebar")[0]
const sidebarWrapper = document.getElementsByClassName('sphinxsidebarwrapper')[0]
const sidebarButton = document.getElementById("sidebarbutton")
const sidebarArrow = sidebarButton.querySelector('span')
// for some reason, the document has no sidebar; do not run into errors
if (typeof sidebar === "undefined") return;
const flipArrow = element => element.innerText = (element.innerText === "»") ? "«" : "»"
const collapse_sidebar = () => {
bodyWrapper.style.marginLeft = ".8em";
sidebar.style.width = ".8em"
sidebarWrapper.style.display = "none"
flipArrow(sidebarArrow)
sidebarButton.title = _('Expand sidebar')
window.localStorage.setItem("sidebar", "collapsed")
}
const expand_sidebar = () => {
bodyWrapper.style.marginLeft = ""
sidebar.style.removeProperty("width")
sidebarWrapper.style.display = ""
flipArrow(sidebarArrow)
sidebarButton.title = _('Collapse sidebar')
window.localStorage.setItem("sidebar", "expanded")
}
sidebarButton.addEventListener("click", () => {
(sidebarWrapper.style.display === "none") ? expand_sidebar() : collapse_sidebar()
})
if (!window.localStorage.getItem("sidebar")) return
const value = window.localStorage.getItem("sidebar")
if (value === "collapsed") collapse_sidebar();
else if (value === "expanded") expand_sidebar();
}
if (document.readyState !== "loading") initialiseSidebar()
else document.addEventListener("DOMContentLoaded", initialiseSidebar)

View File

@@ -0,0 +1,152 @@
/* Highlighting utilities for Sphinx HTML documentation. */
"use strict";
const SPHINX_HIGHLIGHT_ENABLED = true
/**
* highlight a given string on a node by wrapping it in
* span elements with the given class name.
*/
const _highlight = (node, addItems, text, className) => {
if (node.nodeType === Node.TEXT_NODE) {
const val = node.nodeValue;
const parent = node.parentNode;
const pos = val.toLowerCase().indexOf(text);
if (
pos >= 0 &&
!parent.classList.contains(className) &&
!parent.classList.contains("nohighlight")
) {
let span;
const closestNode = parent.closest("body, svg, foreignObject");
const isInSVG = closestNode && closestNode.matches("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.classList.add(className);
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(rest, node.nextSibling)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);
if (isInSVG) {
const rect = document.createElementNS(
"http://www.w3.org/2000/svg",
"rect"
);
const bbox = parent.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute("class", className);
addItems.push({ parent: parent, target: rect });
}
}
} else if (node.matches && !node.matches("button, select, textarea")) {
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
}
};
const _highlightText = (thisNode, text, className) => {
let addItems = [];
_highlight(thisNode, addItems, text, className);
addItems.forEach((obj) =>
obj.parent.insertAdjacentElement("beforebegin", obj.target)
);
};
/**
* Small JavaScript module for the documentation.
*/
const SphinxHighlight = {
/**
* highlight the search words provided in localstorage in the text
*/
highlightSearchWords: () => {
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
// get and clear terms from localstorage
const url = new URL(window.location);
const highlight =
localStorage.getItem("sphinx_highlight_terms")
|| url.searchParams.get("highlight")
|| "";
localStorage.removeItem("sphinx_highlight_terms")
url.searchParams.delete("highlight");
window.history.replaceState({}, "", url);
// get individual terms from highlight string
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
if (terms.length === 0) return; // nothing to do
// There should never be more than one element matching "div.body"
const divBody = document.querySelectorAll("div.body");
const body = divBody.length ? divBody[0] : document.querySelector("body");
window.setTimeout(() => {
terms.forEach((term) => _highlightText(body, term, "highlighted"));
}, 10);
const searchBox = document.getElementById("searchbox");
if (searchBox === null) return;
searchBox.appendChild(
document
.createRange()
.createContextualFragment(
'<p class="highlight-link">' +
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
_("Hide Search Matches") +
"</a></p>"
)
);
},
/**
* helper function to hide the search marks again
*/
hideSearchWords: () => {
document
.querySelectorAll("#searchbox .highlight-link")
.forEach((el) => el.remove());
document
.querySelectorAll("span.highlighted")
.forEach((el) => el.classList.remove("highlighted"));
localStorage.removeItem("sphinx_highlight_terms")
},
initEscapeListener: () => {
// only install a listener if it is really needed
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
SphinxHighlight.hideSearchWords();
event.preventDefault();
}
});
},
};
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the _previous_ search query.
*/
if (typeof Search === "undefined")
SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});

File diff suppressed because it is too large Load Diff

184
pma/doc/html/bookmarks.html Normal file
View File

@@ -0,0 +1,184 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Bookmarks &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="User management" href="privileges.html" />
<link rel="prev" title="Transformations" href="transformations.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="privileges.html" title="User management"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="transformations.html" title="Transformations"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Bookmarks</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="bookmarks">
<span id="id1"></span><h1>Bookmarks<a class="headerlink" href="#bookmarks" title="Permalink to this heading"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You need to have configured the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> for using bookmarks
feature.</p>
</div>
<section id="storing-bookmarks">
<h2>Storing bookmarks<a class="headerlink" href="#storing-bookmarks" title="Permalink to this heading"></a></h2>
<p>Any query that is executed can be marked as a bookmark on the page
where the results are displayed. You will find a button labeled
<span class="guilabel">Bookmark this query</span> just at the end of the page. As soon as you have
stored a bookmark, that query is linked to the database.
You can now access a bookmark dropdown on each page where the query box appears on for that database.</p>
</section>
<section id="variables-inside-bookmarks">
<h2>Variables inside bookmarks<a class="headerlink" href="#variables-inside-bookmarks" title="Permalink to this heading"></a></h2>
<p>Inside a query, you can also add placeholders for variables.
This is done by inserting into the query SQL comments between <code class="docutils literal notranslate"><span class="pre">/*</span></code> and
<code class="docutils literal notranslate"><span class="pre">*/</span></code>. The special string <code class="docutils literal notranslate"><span class="pre">[VARIABLE{variable-number}]</span></code> is used inside the comments.
Be aware that the whole query minus the SQL comments must be
valid by itself, otherwise you wont be able to store it as a bookmark.
Also, note that the text VARIABLE is case-sensitive.</p>
<p>When you execute the bookmark, everything typed into the <em>Variables</em>
input boxes on the query box page will replace the strings <code class="docutils literal notranslate"><span class="pre">/*[VARIABLE{variable-number}]*/</span></code> in
your stored query.</p>
<p>Also remember, that everything else inside the <code class="docutils literal notranslate"><span class="pre">/*[VARIABLE{variable-number}]*/</span></code> string for
your query will remain the way it is, but will be stripped of the <code class="docutils literal notranslate"><span class="pre">/**/</span></code>
chars. So you can use:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="cm">/*, [VARIABLE1] AS myname */</span>
</pre></div>
</div>
<p>which will be expanded to</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="p">,</span><span class="w"> </span><span class="n">VARIABLE1</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">myname</span>
</pre></div>
</div>
<p>in your query, where VARIABLE1 is the string you entered in the Variable 1 input box.</p>
<p>A more complex example, say you have stored this query:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="k">Name</span><span class="p">,</span><span class="w"> </span><span class="n">Address</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">addresses</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="cm">/* AND Name LIKE &#39;%[VARIABLE1]%&#39; */</span>
</pre></div>
</div>
<p>If you wish to enter “phpMyAdmin” as the variable for the stored query, the full
query will be:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="k">Name</span><span class="p">,</span><span class="w"> </span><span class="n">Address</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">addresses</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="k">Name</span><span class="w"> </span><span class="k">LIKE</span><span class="w"> </span><span class="s1">&#39;%phpMyAdmin%&#39;</span>
</pre></div>
</div>
<p><strong>NOTE THE ABSENCE OF SPACES</strong> inside the <code class="docutils literal notranslate"><span class="pre">/**/</span></code> construct. Any spaces
inserted there will be later also inserted as spaces in your query and may lead
to unexpected results especially when using the variable expansion inside of a
“LIKE ‘’” expression.</p>
</section>
<section id="browsing-a-table-using-a-bookmark">
<h2>Browsing a table using a bookmark<a class="headerlink" href="#browsing-a-table-using-a-bookmark" title="Permalink to this heading"></a></h2>
<p>When a bookmark has the same name as the table, it will be used as the query when browsing
this table.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="faq.html#faqbookmark"><span class="std std-ref">6.18 Bookmarks: Where can I store bookmarks? Why cant I see any bookmarks below the query box? What are these variables for?</span></a>,
<a class="reference internal" href="faq.html#faq6-22"><span class="std std-ref">6.22 Bookmarks: Can I execute a default bookmark automatically when entering Browse mode for a table?</span></a></p>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Bookmarks</a><ul>
<li><a class="reference internal" href="#storing-bookmarks">Storing bookmarks</a></li>
<li><a class="reference internal" href="#variables-inside-bookmarks">Variables inside bookmarks</a></li>
<li><a class="reference internal" href="#browsing-a-table-using-a-bookmark">Browsing a table using a bookmark</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="transformations.html"
title="previous chapter">Transformations</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="privileges.html"
title="next chapter">User management</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/bookmarks.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="privileges.html" title="User management"
>next</a> |</li>
<li class="right" >
<a href="transformations.html" title="Transformations"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Bookmarks</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

286
pma/doc/html/charts.html Normal file
View File

@@ -0,0 +1,286 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Charts &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Import and export" href="import_export.html" />
<link rel="prev" title="Relations" href="relations.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="import_export.html" title="Import and export"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="relations.html" title="Relations"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Charts</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="charts">
<span id="id1"></span><h1>Charts<a class="headerlink" href="#charts" title="Permalink to this heading"></a></h1>
<div class="versionadded">
<p><span class="versionmodified added">New in version 3.4.0.</span></p>
</div>
<p>Since phpMyAdmin version 3.4.0, you can easily generate charts from a SQL query
by clicking the “Display chart” link in the “Query results operations” area.</p>
<img alt="_images/query_result_operations.png" src="_images/query_result_operations.png" />
<p>A window layer “Display chart” is shown in which you can customize the chart with the following options.</p>
<ul class="simple">
<li><p>Chart type: Allows you to choose the type of chart. Supported types are bar charts, column charts, line charts, spline charts, area charts, pie charts and timeline charts (only the chart types applicable for current series selection are offered).</p></li>
<li><p>X-axis: Allows to choose the field for the main axis.</p></li>
<li><p>Series: Allows to choose series for the chart. You can choose multiple series.</p></li>
<li><p>Title: Allows specifying a title for the chart which is displayed above the chart.</p></li>
<li><p>X-axis and Y-axis labels: Allows specifying labels for axes.</p></li>
<li><p>Start row and a number of rows: Allows generating charts only for a specified number of rows of the results set.</p></li>
</ul>
<img alt="_images/chart.png" src="_images/chart.png" />
<section id="chart-implementation">
<h2>Chart implementation<a class="headerlink" href="#chart-implementation" title="Permalink to this heading"></a></h2>
<p>Charts in phpMyAdmin are drawn using <a class="reference external" href="http://www.jqplot.com/">jqPlot</a> jQuery library.</p>
</section>
<section id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h2>
<section id="pie-chart">
<h3>Pie chart<a class="headerlink" href="#pie-chart" title="Permalink to this heading"></a></h3>
<p>Query results for a simple pie chart can be generated with:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;Food&#39;</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;expense&#39;</span><span class="p">,</span>
<span class="w"> </span><span class="mi">1250</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;amount&#39;</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;Accommodation&#39;</span><span class="p">,</span><span class="w"> </span><span class="mi">500</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;Travel&#39;</span><span class="p">,</span><span class="w"> </span><span class="mi">720</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;Misc&#39;</span><span class="p">,</span><span class="w"> </span><span class="mi">220</span>
</pre></div>
</div>
<p>And the result of this query is:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>expense</p></th>
<th class="head"><p>amount</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Food</p></td>
<td><p>1250</p></td>
</tr>
<tr class="row-odd"><td><p>Accommodation</p></td>
<td><p>500</p></td>
</tr>
<tr class="row-even"><td><p>Travel</p></td>
<td><p>720</p></td>
</tr>
<tr class="row-odd"><td><p>Misc</p></td>
<td><p>220</p></td>
</tr>
</tbody>
</table>
<p>Choosing expense as the X-axis and amount in series:</p>
<img alt="_images/pie_chart.png" src="_images/pie_chart.png" />
</section>
<section id="bar-and-column-chart">
<h3>Bar and column chart<a class="headerlink" href="#bar-and-column-chart" title="Permalink to this heading"></a></h3>
<p>Both bar charts and column chats support stacking. Upon selecting one of these types a checkbox is displayed to select stacking.</p>
<p>Query results for a simple bar or column chart can be generated with:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">SELECT</span>
<span class="w"> </span><span class="s1">&#39;ACADEMY DINOSAUR&#39;</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;title&#39;</span><span class="p">,</span>
<span class="w"> </span><span class="mf">0.99</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;rental_rate&#39;</span><span class="p">,</span>
<span class="w"> </span><span class="mf">20.99</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;replacement_cost&#39;</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;ACE GOLDFINGER&#39;</span><span class="p">,</span><span class="w"> </span><span class="mf">4.99</span><span class="p">,</span><span class="w"> </span><span class="mf">12.99</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;ADAPTATION HOLES&#39;</span><span class="p">,</span><span class="w"> </span><span class="mf">2.99</span><span class="p">,</span><span class="w"> </span><span class="mf">18.99</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;AFFAIR PREJUDICE&#39;</span><span class="p">,</span><span class="w"> </span><span class="mf">2.99</span><span class="p">,</span><span class="w"> </span><span class="mf">26.99</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="s1">&#39;AFRICAN EGG&#39;</span><span class="p">,</span><span class="w"> </span><span class="mf">2.99</span><span class="p">,</span><span class="w"> </span><span class="mf">22.99</span>
</pre></div>
</div>
<p>And the result of this query is:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>title</p></th>
<th class="head"><p>rental_rate</p></th>
<th class="head"><p>replacement_cost</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>ACADEMY DINOSAUR</p></td>
<td><p>0.99</p></td>
<td><p>20.99</p></td>
</tr>
<tr class="row-odd"><td><p>ACE GOLDFINGER</p></td>
<td><p>4.99</p></td>
<td><p>12.99</p></td>
</tr>
<tr class="row-even"><td><p>ADAPTATION HOLES</p></td>
<td><p>2.99</p></td>
<td><p>18.99</p></td>
</tr>
<tr class="row-odd"><td><p>AFFAIR PREJUDICE</p></td>
<td><p>2.99</p></td>
<td><p>26.99</p></td>
</tr>
<tr class="row-even"><td><p>AFRICAN EGG</p></td>
<td><p>2.99</p></td>
<td><p>22.99</p></td>
</tr>
</tbody>
</table>
<p>Choosing title as the X-axis and rental_rate and replacement_cost as series:</p>
<img alt="_images/column_chart.png" src="_images/column_chart.png" />
</section>
<section id="scatter-chart">
<h3>Scatter chart<a class="headerlink" href="#scatter-chart" title="Permalink to this heading"></a></h3>
<p>Scatter charts are useful in identifying the movement of one or more variable(s) compared to another variable.</p>
<p>Using the same data set from bar and column charts section and choosing replacement_cost as the X-axis and rental_rate in series:</p>
<img alt="_images/scatter_chart.png" src="_images/scatter_chart.png" />
</section>
<section id="line-spline-and-timeline-charts">
<h3>Line, spline and timeline charts<a class="headerlink" href="#line-spline-and-timeline-charts" title="Permalink to this heading"></a></h3>
<p>These charts can be used to illustrate trends in underlying data. Spline charts draw smooth lines while timeline charts draw X-axis taking the distances between the dates/time into consideration.</p>
<p>Query results for a simple line, spline or timeline chart can be generated with:</p>
<div class="highlight-mysql notranslate"><div class="highlight"><pre><span></span><span class="k">SELECT</span>
<span class="w"> </span><span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-08&#39;</span><span class="p">)</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;date&#39;</span><span class="p">,</span>
<span class="w"> </span><span class="mi">2056</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;revenue&#39;</span><span class="p">,</span>
<span class="w"> </span><span class="mi">1378</span><span class="w"> </span><span class="k">AS</span><span class="w"> </span><span class="s1">&#39;cost&#39;</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-09&#39;</span><span class="p">),</span><span class="w"> </span><span class="mi">1898</span><span class="p">,</span><span class="w"> </span><span class="mi">2301</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-15&#39;</span><span class="p">),</span><span class="w"> </span><span class="mi">1560</span><span class="p">,</span><span class="w"> </span><span class="mi">600</span><span class="w"> </span><span class="k">UNION</span>
<span class="k">SELECT</span><span class="w"> </span><span class="kt">DATE</span><span class="p">(</span><span class="s1">&#39;2006-01-17&#39;</span><span class="p">),</span><span class="w"> </span><span class="mi">3457</span><span class="p">,</span><span class="w"> </span><span class="mi">1565</span>
</pre></div>
</div>
<p>And the result of this query is:</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>date</p></th>
<th class="head"><p>revenue</p></th>
<th class="head"><p>cost</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>2016-01-08</p></td>
<td><p>2056</p></td>
<td><p>1378</p></td>
</tr>
<tr class="row-odd"><td><p>2006-01-09</p></td>
<td><p>1898</p></td>
<td><p>2301</p></td>
</tr>
<tr class="row-even"><td><p>2006-01-15</p></td>
<td><p>1560</p></td>
<td><p>600</p></td>
</tr>
<tr class="row-odd"><td><p>2006-01-17</p></td>
<td><p>3457</p></td>
<td><p>1565</p></td>
</tr>
</tbody>
</table>
<img alt="_images/line_chart.png" src="_images/line_chart.png" />
<img alt="_images/spline_chart.png" src="_images/spline_chart.png" />
<img alt="_images/timeline_chart.png" src="_images/timeline_chart.png" />
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Charts</a><ul>
<li><a class="reference internal" href="#chart-implementation">Chart implementation</a></li>
<li><a class="reference internal" href="#examples">Examples</a><ul>
<li><a class="reference internal" href="#pie-chart">Pie chart</a></li>
<li><a class="reference internal" href="#bar-and-column-chart">Bar and column chart</a></li>
<li><a class="reference internal" href="#scatter-chart">Scatter chart</a></li>
<li><a class="reference internal" href="#line-spline-and-timeline-charts">Line, spline and timeline charts</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="relations.html"
title="previous chapter">Relations</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="import_export.html"
title="next chapter">Import and export</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/charts.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="import_export.html" title="Import and export"
>next</a> |</li>
<li class="right" >
<a href="relations.html" title="Relations"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Charts</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

6451
pma/doc/html/config.html Normal file

File diff suppressed because it is too large Load Diff

152
pma/doc/html/copyright.html Normal file
View File

@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Copyright &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="#" />
<link rel="next" title="Credits" href="credits.html" />
<link rel="prev" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Copyright</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="copyright">
<span id="id1"></span><h1>Copyright<a class="headerlink" href="#copyright" title="Permalink to this heading"></a></h1>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>Copyright (C) 1998-2000 Tobias Ratschiller &lt;tobias_at_ratschiller.com&gt;
Copyright (C) 2001-2018 Marc Delisle &lt;marc_at_infomarc.info&gt;
Olivier Müller &lt;om_at_omnis.ch&gt;
Robin Johnson &lt;robbat2_at_users.sourceforge.net&gt;
Alexander M. Turek &lt;me_at_derrabus.de&gt;
Michal Čihař &lt;michal_at_cihar.com&gt;
Garvin Hicking &lt;me_at_supergarv.de&gt;
Michael Keck &lt;mkkeck_at_users.sourceforge.net&gt;
Sebastian Mendel &lt;cybot_tm_at_users.sourceforge.net&gt;
[check credits for more details]
</pre></div>
</div>
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2, as
published by the Free Software Foundation.</p>
<p>This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License
along with this program. If not, see &lt;<a class="reference external" href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>&gt;.</p>
<section id="third-party-licenses">
<h2>Third party licenses<a class="headerlink" href="#third-party-licenses" title="Permalink to this heading"></a></h2>
<p>phpMyAdmin includes several third-party libraries which come under their
respective licenses.</p>
<p>jQuerys license, which is where we got the files under js/vendor/jquery/ is
(MIT|GPL), a copy of each license is available in this repository (GPL
is available as LICENSE, MIT as js/vendor/jquery/MIT-LICENSE.txt).</p>
<p>The download kit additionally includes several composer libraries. See their
licensing information in the vendor/ directory.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Copyright</a><ul>
<li><a class="reference internal" href="#third-party-licenses">Third party licenses</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="vendors.html"
title="previous chapter">Distributing and packaging phpMyAdmin</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="credits.html"
title="next chapter">Credits</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/copyright.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
>next</a> |</li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Copyright</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="#">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

1474
pma/doc/html/credits.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Developers Information &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Security policy" href="security.html" />
<link rel="prev" title="FAQ - Frequently Asked Questions" href="faq.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="security.html" title="Security policy"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Developers Information</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="developers-information">
<span id="developers"></span><h1>Developers Information<a class="headerlink" href="#developers-information" title="Permalink to this heading"></a></h1>
<p>phpMyAdmin is Open Source, so youre invited to contribute to it. Many
great features have been written by other people and you too can help
to make phpMyAdmin a useful tool.</p>
<p>You can check out all the possibilities to contribute in the
<a class="reference external" href="https://www.phpmyadmin.net/contribute/">contribute section on our website</a>.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="faq.html"
title="previous chapter">FAQ - Frequently Asked Questions</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="security.html"
title="next chapter">Security policy</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/developers.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="security.html" title="Security policy"
>next</a> |</li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Developers Information</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

2035
pma/doc/html/faq.html Normal file

File diff suppressed because it is too large Load Diff

2555
pma/doc/html/genindex.html Normal file

File diff suppressed because it is too large Load Diff

619
pma/doc/html/glossary.html Normal file
View File

@@ -0,0 +1,619 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Glossary &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="prev" title="Credits" href="credits.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Glossary</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="glossary">
<span id="id1"></span><h1>Glossary<a class="headerlink" href="#glossary" title="Permalink to this heading"></a></h1>
<p>From Wikipedia, the free encyclopedia</p>
<dl class="glossary">
<dt id="term-.htaccess">.htaccess<a class="headerlink" href="#term-.htaccess" title="Permalink to this term"></a></dt><dd><p>the default name of Apaches directory-level configuration file.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/.htaccess">https://en.wikipedia.org/wiki/.htaccess</a>&gt;</p>
</div>
</dd>
<dt id="term-ACL">ACL<a class="headerlink" href="#term-ACL" title="Permalink to this term"></a></dt><dd><p>Access Control List</p>
</dd>
<dt id="term-Blowfish">Blowfish<a class="headerlink" href="#term-Blowfish" title="Permalink to this term"></a></dt><dd><p>a keyed, symmetric block cipher, designed in 1993 by <a class="reference external" href="https://en.wikipedia.org/wiki/Bruce_Schneier">Bruce Schneier</a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Blowfish_(cipher)">https://en.wikipedia.org/wiki/Blowfish_(cipher)</a>&gt;</p>
</div>
</dd>
<dt id="term-Browser">Browser<a class="headerlink" href="#term-Browser" title="Permalink to this term"></a></dt><dd><p>a software application that enables a user to display and interact with text, images, and other information typically located on a web page at a website on the World Wide Web.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Web_browser">https://en.wikipedia.org/wiki/Web_browser</a>&gt;</p>
</div>
</dd>
<dt id="term-bzip2">bzip2<a class="headerlink" href="#term-bzip2" title="Permalink to this term"></a></dt><dd><p>a free software/open-source data compression algorithm and program developed by Julian Seward.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Bzip2">https://en.wikipedia.org/wiki/Bzip2</a>&gt;</p>
</div>
</dd>
<dt id="term-CGI">CGI<a class="headerlink" href="#term-CGI" title="Permalink to this term"></a></dt><dd><p>Common Gateway Interface is an important World Wide Web technology that
enables a client web browser to request data from a program executed on
the web server.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Common_Gateway_Interface">https://en.wikipedia.org/wiki/Common_Gateway_Interface</a>&gt;</p>
</div>
</dd>
<dt id="term-Changelog">Changelog<a class="headerlink" href="#term-Changelog" title="Permalink to this term"></a></dt><dd><p>a log or record of changes made to a project.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Changelog">https://en.wikipedia.org/wiki/Changelog</a>&gt;</p>
</div>
</dd>
<dt id="term-Client">Client<a class="headerlink" href="#term-Client" title="Permalink to this term"></a></dt><dd><p>a computer system that accesses a (remote) service on another computer by some kind of network.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Client_(computing)">https://en.wikipedia.org/wiki/Client_(computing)</a>&gt;</p>
</div>
</dd>
<dt id="term-column">column<a class="headerlink" href="#term-column" title="Permalink to this term"></a></dt><dd><p>a set of data values of a particularly simple type, one for each row of the table.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Column_(database)">https://en.wikipedia.org/wiki/Column_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-Cookie">Cookie<a class="headerlink" href="#term-Cookie" title="Permalink to this term"></a></dt><dd><p>a packet of information sent by a server to a World Wide Web browser and then sent back by the browser each time it accesses that server.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/HTTP_cookie">https://en.wikipedia.org/wiki/HTTP_cookie</a>&gt;</p>
</div>
</dd>
<dt id="term-CSV">CSV<a class="headerlink" href="#term-CSV" title="Permalink to this term"></a></dt><dd><p>Comma-separated values</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Comma-separated_values">https://en.wikipedia.org/wiki/Comma-separated_values</a>&gt;</p>
</div>
</dd>
<dt id="term-DB">DB<a class="headerlink" href="#term-DB" title="Permalink to this term"></a></dt><dd><p>look at <a class="reference internal" href="#term-Database"><span class="xref std std-term">Database</span></a></p>
</dd>
<dt id="term-Database">Database<a class="headerlink" href="#term-Database" title="Permalink to this term"></a></dt><dd><p>an organized collection of data.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Database">https://en.wikipedia.org/wiki/Database</a>&gt;</p>
</div>
</dd>
<dt id="term-Engine">Engine<a class="headerlink" href="#term-Engine" title="Permalink to this term"></a></dt><dd><p>look at <a class="reference internal" href="#term-Storage-Engines"><span class="xref std std-term">Storage Engines</span></a></p>
</dd>
<dt id="term-PHP-extension">PHP extension<a class="headerlink" href="#term-PHP-extension" title="Permalink to this term"></a></dt><dd><p>a PHP module that extends PHP with additional functionality.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Software_extension">https://en.wikipedia.org/wiki/Software_extension</a>&gt;</p>
</div>
</dd>
<dt id="term-FAQ">FAQ<a class="headerlink" href="#term-FAQ" title="Permalink to this term"></a></dt><dd><p>Frequently Asked Questions is a list of commonly asked question and their
answers.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/FAQ">https://en.wikipedia.org/wiki/FAQ</a>&gt;</p>
</div>
</dd>
<dt id="term-Field">Field<a class="headerlink" href="#term-Field" title="Permalink to this term"></a></dt><dd><p>one part of divided data/columns.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Field_(computer_science)">https://en.wikipedia.org/wiki/Field_(computer_science)</a>&gt;</p>
</div>
</dd>
<dt id="term-Foreign-key">Foreign key<a class="headerlink" href="#term-Foreign-key" title="Permalink to this term"></a></dt><dd><p>a column or group of columns in a database row that points to a key column
or group of columns forming a key of another database row in some
(usually different) table.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Foreign_key">https://en.wikipedia.org/wiki/Foreign_key</a>&gt;</p>
</div>
</dd>
<dt id="term-GD">GD<a class="headerlink" href="#term-GD" title="Permalink to this term"></a></dt><dd><p>Graphics Library by Thomas Boutell and others for dynamically manipulating images.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/GD_Graphics_Library">https://en.wikipedia.org/wiki/GD_Graphics_Library</a>&gt;</p>
</div>
</dd>
<dt id="term-GD2">GD2<a class="headerlink" href="#term-GD2" title="Permalink to this term"></a></dt><dd><p>look at <a class="reference internal" href="#term-GD"><span class="xref std std-term">GD</span></a></p>
</dd>
<dt id="term-GZip">GZip<a class="headerlink" href="#term-GZip" title="Permalink to this term"></a></dt><dd><p>GZip is short for GNU zip, a GNU free software file compression program.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Gzip">https://en.wikipedia.org/wiki/Gzip</a>&gt;</p>
</div>
</dd>
<dt id="term-host">host<a class="headerlink" href="#term-host" title="Permalink to this term"></a></dt><dd><p>any machine connected to a computer network, a node that has a hostname.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Host_(network)">https://en.wikipedia.org/wiki/Host_(network)</a>&gt;</p>
</div>
</dd>
<dt id="term-hostname">hostname<a class="headerlink" href="#term-hostname" title="Permalink to this term"></a></dt><dd><p>the unique name by which a network-attached device is known on a network.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Hostname">https://en.wikipedia.org/wiki/Hostname</a>&gt;</p>
</div>
</dd>
<dt id="term-HTTP">HTTP<a class="headerlink" href="#term-HTTP" title="Permalink to this term"></a></dt><dd><p>Hypertext Transfer Protocol is the primary method used to transfer or
convey information on the World Wide Web.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/HyperText_Transfer_Protocol">https://en.wikipedia.org/wiki/HyperText_Transfer_Protocol</a>&gt;</p>
</div>
</dd>
<dt id="term-HTTPS">HTTPS<a class="headerlink" href="#term-HTTPS" title="Permalink to this term"></a></dt><dd><p>a <a class="reference internal" href="#term-HTTP"><span class="xref std std-term">HTTP</span></a>-connection with additional security measures.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/HTTPS">https://en.wikipedia.org/wiki/HTTPS</a>&gt;</p>
</div>
</dd>
<dt id="term-IEC">IEC<a class="headerlink" href="#term-IEC" title="Permalink to this term"></a></dt><dd><p>International Electrotechnical Commission</p>
</dd>
<dt id="term-IIS">IIS<a class="headerlink" href="#term-IIS" title="Permalink to this term"></a></dt><dd><p>Internet Information Services is a set of internet-based services for
servers using Microsoft Windows.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Internet_Information_Services">https://en.wikipedia.org/wiki/Internet_Information_Services</a>&gt;</p>
</div>
</dd>
<dt id="term-Index">Index<a class="headerlink" href="#term-Index" title="Permalink to this term"></a></dt><dd><p>a feature that allows quick access to the rows in a table.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Database_index">https://en.wikipedia.org/wiki/Database_index</a>&gt;</p>
</div>
</dd>
<dt id="term-IP">IP<a class="headerlink" href="#term-IP" title="Permalink to this term"></a></dt><dd><p>“Internet Protocol” is a data-oriented protocol used by source and
destination hosts for communicating data across a packet-switched
internetwork.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Internet_Protocol">https://en.wikipedia.org/wiki/Internet_Protocol</a>&gt;</p>
</div>
</dd>
<dt id="term-IP-Address">IP Address<a class="headerlink" href="#term-IP-Address" title="Permalink to this term"></a></dt><dd><p>a unique number that devices use in order to identify and communicate with each other on a network utilizing the Internet Protocol standard.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/IP_Address">https://en.wikipedia.org/wiki/IP_Address</a>&gt;</p>
</div>
</dd>
<dt id="term-IPv6">IPv6<a class="headerlink" href="#term-IPv6" title="Permalink to this term"></a></dt><dd><p>IPv6 (Internet Protocol version 6) is the latest revision of the
Internet Protocol (<a class="reference internal" href="#term-IP"><span class="xref std std-term">IP</span></a>), designed to deal with the
long-anticipated problem of its predecessor IPv4 running out of addresses.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/IPv6">https://en.wikipedia.org/wiki/IPv6</a>&gt;</p>
</div>
</dd>
<dt id="term-ISAPI">ISAPI<a class="headerlink" href="#term-ISAPI" title="Permalink to this term"></a></dt><dd><p>Internet Server Application Programming Interface is the API of Internet Information Services (IIS).</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Internet_Server_Application_Programming_Interface">https://en.wikipedia.org/wiki/Internet_Server_Application_Programming_Interface</a>&gt;</p>
</div>
</dd>
<dt id="term-ISP">ISP<a class="headerlink" href="#term-ISP" title="Permalink to this term"></a></dt><dd><p>An Internet service provider is a business or organization that offers users
access to the Internet and related services.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Internet_service_provider">https://en.wikipedia.org/wiki/Internet_service_provider</a>&gt;</p>
</div>
</dd>
<dt id="term-ISO">ISO<a class="headerlink" href="#term-ISO" title="Permalink to this term"></a></dt><dd><p>International Standards Organization</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://www.iso.org/about-us.html">ISO organization website</a></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/International_Organization_for_Standardization">https://en.wikipedia.org/wiki/International_Organization_for_Standardization</a>&gt;</p>
</div>
</dd>
<dt id="term-JPEG">JPEG<a class="headerlink" href="#term-JPEG" title="Permalink to this term"></a></dt><dd><p>a most commonly used standard method of lossy compression for photographic images.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/JPEG">https://en.wikipedia.org/wiki/JPEG</a>&gt;</p>
</div>
</dd>
<dt id="term-JPG">JPG<a class="headerlink" href="#term-JPG" title="Permalink to this term"></a></dt><dd><p>look at <a class="reference internal" href="#term-JPEG"><span class="xref std std-term">JPEG</span></a></p>
</dd>
<dt id="term-Key">Key<a class="headerlink" href="#term-Key" title="Permalink to this term"></a></dt><dd><p>look at <a class="reference internal" href="#term-Index"><span class="xref std std-term">Index</span></a></p>
</dd>
<dt id="term-LATEX">LATEX<a class="headerlink" href="#term-LATEX" title="Permalink to this term"></a></dt><dd><p>a document preparation system for the TeX typesetting program.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/LaTeX">https://en.wikipedia.org/wiki/LaTeX</a>&gt;</p>
</div>
</dd>
<dt id="term-Mac">Mac<a class="headerlink" href="#term-Mac" title="Permalink to this term"></a></dt><dd><p>Apple Macintosh is a line of personal computers designed, developed, manufactured, and marketed by Apple Inc.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Macintosh">https://en.wikipedia.org/wiki/Macintosh</a>&gt;</p>
</div>
</dd>
<dt id="term-macOS">macOS<a class="headerlink" href="#term-macOS" title="Permalink to this term"></a></dt><dd><p>the operating system which is included with all currently shipping Apple Macintosh computers in the consumer and professional markets.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/MacOS">https://en.wikipedia.org/wiki/MacOS</a>&gt;</p>
</div>
</dd>
<dt id="term-mbstring">mbstring<a class="headerlink" href="#term-mbstring" title="Permalink to this term"></a></dt><dd><p>The PHP <cite>mbstring</cite> functions provide support for languages represented by multi-byte character sets, most notably UTF-8.</p>
<p>If you have troubles installing this extension, please follow <a class="reference internal" href="faq.html#faqmysql"><span class="std std-ref">1.20 I receive an error about missing mysqli and mysql extensions.</span></a>, it provides useful hints.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://www.php.net/manual/en/book.mbstring.php">https://www.php.net/manual/en/book.mbstring.php</a>&gt;</p>
</div>
</dd>
<dt id="term-Media-type">Media type<a class="headerlink" href="#term-Media-type" title="Permalink to this term"></a></dt><dd><p>A media type (formerly known as MIME type) is a two-part identifier
for file formats and format contents transmitted on the Internet.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Media_type">https://en.wikipedia.org/wiki/Media_type</a>&gt;</p>
</div>
</dd>
<dt id="term-MIME">MIME<a class="headerlink" href="#term-MIME" title="Permalink to this term"></a></dt><dd><p>Multipurpose Internet Mail Extensions is
an Internet Standard for the format of e-mail.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/MIME">https://en.wikipedia.org/wiki/MIME</a>&gt;</p>
</div>
</dd>
<dt id="term-module">module<a class="headerlink" href="#term-module" title="Permalink to this term"></a></dt><dd><p>modular extension for the Apache HTTP Server httpd.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Apache_HTTP_Server">https://en.wikipedia.org/wiki/Apache_HTTP_Server</a>&gt;</p>
</div>
</dd>
<dt id="term-mod_proxy_fcgi">mod_proxy_fcgi<a class="headerlink" href="#term-mod_proxy_fcgi" title="Permalink to this term"></a></dt><dd><p>an Apache module implementing a Fast CGI interface; PHP can be run as a CGI module, FastCGI, or
directly as an Apache module.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Mod_proxy">https://en.wikipedia.org/wiki/Mod_proxy</a>&gt;</p>
</div>
</dd>
<dt id="term-MySQL">MySQL<a class="headerlink" href="#term-MySQL" title="Permalink to this term"></a></dt><dd><p>a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS).</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/MySQL">https://en.wikipedia.org/wiki/MySQL</a>&gt;</p>
</div>
</dd>
<dt id="term-MySQLi">MySQLi<a class="headerlink" href="#term-MySQLi" title="Permalink to this term"></a></dt><dd><p>the improved MySQL client PHP extension.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://www.php.net/manual/en/book.mysqli.php">PHP manual for MySQL Improved Extension</a></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/MySQLi">https://en.wikipedia.org/wiki/MySQLi</a>&gt;</p>
</div>
</dd>
<dt id="term-mysql">mysql<a class="headerlink" href="#term-mysql" title="Permalink to this term"></a></dt><dd><p>the MySQL client PHP extension.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://www.php.net/manual/en/book.mysql.php">https://www.php.net/manual/en/book.mysql.php</a>&gt;</p>
</div>
</dd>
<dt id="term-OpenDocument">OpenDocument<a class="headerlink" href="#term-OpenDocument" title="Permalink to this term"></a></dt><dd><p>an open standard for office documents.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/OpenDocument">https://en.wikipedia.org/wiki/OpenDocument</a>&gt;</p>
</div>
</dd>
<dt id="term-OS-X">OS X<a class="headerlink" href="#term-OS-X" title="Permalink to this term"></a></dt><dd><p>look at <a class="reference internal" href="#term-macOS"><span class="xref std std-term">macOS</span></a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/MacOS">https://en.wikipedia.org/wiki/MacOS</a>&gt;</p>
</div>
</dd>
<dt id="term-PDF">PDF<a class="headerlink" href="#term-PDF" title="Permalink to this term"></a></dt><dd><p>Portable Document Format is a file format developed by Adobe Systems for
representing two-dimensional documents in a device-independent and
resolution-independent format.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/PDF">https://en.wikipedia.org/wiki/PDF</a>&gt;</p>
</div>
</dd>
<dt id="term-PEAR">PEAR<a class="headerlink" href="#term-PEAR" title="Permalink to this term"></a></dt><dd><p>the PHP Extension and Application Repository.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://pear.php.net/">PEAR website</a></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/PEAR">Wikipedia page for PEAR</a></p>
</div>
</dd>
<dt id="term-PCRE">PCRE<a class="headerlink" href="#term-PCRE" title="Permalink to this term"></a></dt><dd><p>Perl-Compatible Regular Expressions is the Perl-compatible regular
expression functions for PHP</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://www.php.net/pcre">https://www.php.net/pcre</a>&gt;</p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://www.php.net/pcre">PHP manual for Perl-Compatible Regular Expressions</a></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions">https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions</a>&gt;</p>
</div>
</dd>
<dt id="term-PHP">PHP<a class="headerlink" href="#term-PHP" title="Permalink to this term"></a></dt><dd><p>short for “PHP: Hypertext Preprocessor”, is an open-source, reflective
programming language used mainly for developing server-side applications
and dynamic web content, and more recently, a broader range of software
applications.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/PHP">https://en.wikipedia.org/wiki/PHP</a>&gt;</p>
</div>
</dd>
<dt id="term-port">port<a class="headerlink" href="#term-port" title="Permalink to this term"></a></dt><dd><p>a connection through which data is sent and received.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a>&gt;</p>
</div>
</dd>
<dt id="term-primary-key">primary key<a class="headerlink" href="#term-primary-key" title="Permalink to this term"></a></dt><dd><p>A primary key is an index over one or more fields in a table with
unique values for every single row in this table. Every table should have
a primary key for easier accessing/identifying data in this table. There
can only be one primary key per table and it is named always <strong>PRIMARY</strong>.
In fact, a primary key is just an <a class="reference internal" href="#term-unique-key"><span class="xref std std-term">unique key</span></a> with the name
<strong>PRIMARY</strong>. If no primary key is defined MySQL will use first <em>unique
key</em> as primary key if there is one.</p>
<p>You can create the primary key when creating the table (in phpMyAdmin
just check the primary key radio buttons for each field you wish to be
part of the primary key).</p>
<p>You can also add a primary key to an existing table with <cite>ALTER</cite> <cite>TABLE</cite>
or <cite>CREATE</cite> <cite>INDEX</cite> (in phpMyAdmin you can just click on add index on
the table structure page below the listed fields).</p>
</dd>
<dt id="term-RFC">RFC<a class="headerlink" href="#term-RFC" title="Permalink to this term"></a></dt><dd><p>Request for Comments (RFC) documents are a series of memoranda
encompassing new research, innovations, and methodologies applicable to
Internet technologies.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Request_for_Comments">https://en.wikipedia.org/wiki/Request_for_Comments</a>&gt;</p>
</div>
</dd>
<dt id="term-RFC-1952">RFC 1952<a class="headerlink" href="#term-RFC-1952" title="Permalink to this term"></a></dt><dd><p>GZIP file format specification version 4.3</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><span class="target" id="index-0"></span><a class="rfc reference external" href="https://datatracker.ietf.org/doc/html/rfc1952.html"><strong>RFC 1952</strong></a></p>
</div>
</dd>
<dt id="term-Row-record-tuple">Row (record, tuple)<a class="headerlink" href="#term-Row-record-tuple" title="Permalink to this term"></a></dt><dd><p>represents a single, implicitly structured data item in a table.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Row_(database)">https://en.wikipedia.org/wiki/Row_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-Server">Server<a class="headerlink" href="#term-Server" title="Permalink to this term"></a></dt><dd><p>a computer system that provides services to other computing systems over a network.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Server_(computing)">https://en.wikipedia.org/wiki/Server_(computing)</a>&gt;</p>
</div>
</dd>
<dt id="term-Sodium">Sodium<a class="headerlink" href="#term-Sodium" title="Permalink to this term"></a></dt><dd><p>The Sodium PHP extension.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://www.php.net/manual/en/book.sodium.php">PHP manual for Sodium extension</a></p>
</div>
</dd>
<dt id="term-Storage-Engines">Storage Engines<a class="headerlink" href="#term-Storage-Engines" title="Permalink to this term"></a></dt><dd><p>MySQL can use several different formats for storing data on disk, these
are called storage engines or table types. phpMyAdmin allows a user to
change their storage engine for a particular table through the operations
tab.</p>
<p>Common table types are InnoDB and MyISAM, though many others exist and
may be desirable in some situations.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html">MySQL doc chapter about Alternative Storage Engines</a></p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Database_engine">https://en.wikipedia.org/wiki/Database_engine</a>&gt;</p>
</div>
</dd>
<dt id="term-socket">socket<a class="headerlink" href="#term-socket" title="Permalink to this term"></a></dt><dd><p>a form of inter-process communication.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Unix_domain_socket">https://en.wikipedia.org/wiki/Unix_domain_socket</a>&gt;</p>
</div>
</dd>
<dt id="term-SSL">SSL<a class="headerlink" href="#term-SSL" title="Permalink to this term"></a></dt><dd><p>Secure Sockets Layer, (now superseded by TLS) is a cryptographic protocol
which provides secure communication on the Internet.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Transport_Layer_Security">https://en.wikipedia.org/wiki/Transport_Layer_Security</a>&gt;</p>
</div>
</dd>
<dt id="term-Stored-procedure">Stored procedure<a class="headerlink" href="#term-Stored-procedure" title="Permalink to this term"></a></dt><dd><p>a subroutine available to applications accessing a relational database system</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Stored_procedure">https://en.wikipedia.org/wiki/Stored_procedure</a>&gt;</p>
</div>
</dd>
<dt id="term-SQL">SQL<a class="headerlink" href="#term-SQL" title="Permalink to this term"></a></dt><dd><p>Structured Query Language</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/SQL">https://en.wikipedia.org/wiki/SQL</a>&gt;</p>
</div>
</dd>
<dt id="term-table">table<a class="headerlink" href="#term-table" title="Permalink to this term"></a></dt><dd><p>a set of data elements (cells) that is organized, defined and stored as
horizontal rows and vertical columns where each item can be uniquely
identified by a label or key or by its position in relation to other
items.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Table_(database)">https://en.wikipedia.org/wiki/Table_(database)</a>&gt;</p>
</div>
</dd>
<dt id="term-tar">tar<a class="headerlink" href="#term-tar" title="Permalink to this term"></a></dt><dd><p>a type of archive file format, from “Tape Archive”.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Tar_(computing)">https://en.wikipedia.org/wiki/Tar_(computing)</a>&gt;</p>
</div>
</dd>
<dt id="term-TCP">TCP<a class="headerlink" href="#term-TCP" title="Permalink to this term"></a></dt><dd><p>Transmission Control Protocol is one of the core protocols of the
Internet protocol suite.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Internet_protocol_suite">https://en.wikipedia.org/wiki/Internet_protocol_suite</a>&gt;</p>
</div>
</dd>
<dt id="term-TCPDF">TCPDF<a class="headerlink" href="#term-TCPDF" title="Permalink to this term"></a></dt><dd><p>PHP library to generate PDF files.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://tcpdf.org/">https://tcpdf.org/</a>&gt;</p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/TCPDF">https://en.wikipedia.org/wiki/TCPDF</a>&gt;</p>
</div>
</dd>
<dt id="term-trigger">trigger<a class="headerlink" href="#term-trigger" title="Permalink to this term"></a></dt><dd><p>a procedural code that is automatically executed in response to certain events on a particular table or view in a database</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Database_trigger">https://en.wikipedia.org/wiki/Database_trigger</a>&gt;</p>
</div>
</dd>
<dt id="term-unique-key">unique key<a class="headerlink" href="#term-unique-key" title="Permalink to this term"></a></dt><dd><p>A unique key is an index over one or more fields in a table which has a
unique value for each row. The first unique key will be treated as
<a class="reference internal" href="#term-primary-key"><span class="xref std std-term">primary key</span></a> if there is no <em>primary key</em> defined.</p>
</dd>
<dt id="term-URL">URL<a class="headerlink" href="#term-URL" title="Permalink to this term"></a></dt><dd><p>Uniform Resource Locator is a sequence of characters, conforming to a
standardized format, that is used for referring to resources, such as
documents and images on the Internet, by their location.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/URL">https://en.wikipedia.org/wiki/URL</a>&gt;</p>
</div>
</dd>
<dt id="term-Web-server">Web server<a class="headerlink" href="#term-Web-server" title="Permalink to this term"></a></dt><dd><p>A computer (program) that is responsible for accepting HTTP requests from clients and serving them web pages.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Web_server">https://en.wikipedia.org/wiki/Web_server</a>&gt;</p>
</div>
</dd>
<dt id="term-XML">XML<a class="headerlink" href="#term-XML" title="Permalink to this term"></a></dt><dd><p>Extensible Markup Language is a W3C-recommended general-purpose markup
language for creating special-purpose markup languages, capable of
describing many different kinds of data.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/XML">https://en.wikipedia.org/wiki/XML</a>&gt;</p>
</div>
</dd>
<dt id="term-ZIP">ZIP<a class="headerlink" href="#term-ZIP" title="Permalink to this term"></a></dt><dd><p>a popular data compression and archival format.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Zip_(file_format)">https://en.wikipedia.org/wiki/Zip_(file_format)</a>&gt;</p>
</div>
</dd>
<dt id="term-Zlib">Zlib<a class="headerlink" href="#term-Zlib" title="Permalink to this term"></a></dt><dd><p>an open-source, cross-platform data compression library by <a class="reference external" href="https://en.wikipedia.org/wiki/Jean-Loup_Gailly">Jean-loup Gailly</a> and <a class="reference external" href="https://en.wikipedia.org/wiki/Mark_Adler">Mark Adler</a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Zlib">https://en.wikipedia.org/wiki/Zlib</a>&gt;</p>
</div>
</dd>
<dt id="term-Content-Security-Policy">Content Security Policy<a class="headerlink" href="#term-Content-Security-Policy" title="Permalink to this term"></a></dt><dd><p>The HTTP <cite>Content-Security-Policy</cite> response header allows web site administrators
to control resources the user agent is allowed to load for a given page.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://en.wikipedia.org/wiki/Content_Security_Policy">https://en.wikipedia.org/wiki/Content_Security_Policy</a>&gt;</p>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p>&lt;<a class="reference external" href="https://developer.mozilla.org/en/docs/Web/HTTP/CSP">https://developer.mozilla.org/en/docs/Web/HTTP/CSP</a>&gt;</p>
</div>
</dd>
</dl>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="credits.html"
title="previous chapter">Credits</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/glossary.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="credits.html" title="Credits"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Glossary</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

View File

@@ -0,0 +1,477 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Import and export &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Custom Themes" href="themes.html" />
<link rel="prev" title="Charts" href="charts.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="themes.html" title="Custom Themes"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="charts.html" title="Charts"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Import and export</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="import-and-export">
<h1>Import and export<a class="headerlink" href="#import-and-export" title="Permalink to this heading"></a></h1>
<section id="import">
<h2>Import<a class="headerlink" href="#import" title="Permalink to this heading"></a></h2>
<p>To import data, go to the “Import” tab in phpMyAdmin. To import data into a
specific database or table, open the database or table before going to the
“Import” tab.</p>
<p>In addition to the standard Import and Export tab, you can also import an SQL
file directly by dragging and dropping it from your local file manager to the
phpMyAdmin interface in your web browser.</p>
<p>If you are having troubles importing big files, please consult <a class="reference internal" href="faq.html#faq1-16"><span class="std std-ref">1.16 I cannot upload big dump files (memory, HTTP or timeout problems).</span></a>.</p>
<p>You can import using following methods:</p>
<p>Form based upload</p>
<blockquote>
<div><p>Can be used with any supported format, also (b|g)zipped files, e.g., mydump.sql.gz .</p>
</div></blockquote>
<p>Form based SQL Query</p>
<blockquote>
<div><p>Can be used with valid SQL dumps.</p>
</div></blockquote>
<p>Using upload directory</p>
<blockquote>
<div><p>You can specify an upload directory on your web server where phpMyAdmin is installed, after uploading your file into this directory you can select this file in the import dialog of phpMyAdmin, see <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_UploadDir"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['UploadDir']</span></code></a>.</p>
</div></blockquote>
<p>phpMyAdmin can import from several various commonly used formats.</p>
<section id="csv">
<h3>CSV<a class="headerlink" href="#csv" title="Permalink to this heading"></a></h3>
<p>Comma separated values format which is often used by spreadsheets or various other programs for export/import.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When importing data into a table from a CSV file where the table has an
auto_increment field, make the auto_increment value for each record in
the CSV field to be 0 (zero). This allows the auto_increment field to
populate correctly.</p>
</div>
<p>It is now possible to import a CSV file at the server or database level.
Instead of having to create a table to import the CSV file into, a best-fit
structure will be determined for you and the data imported into it, instead.
All other features, requirements, and limitations are as before.</p>
</section>
<section id="csv-using-load-data">
<h3>CSV using LOAD DATA<a class="headerlink" href="#csv-using-load-data" title="Permalink to this heading"></a></h3>
<p>Similar to CSV, only using the internal MySQL parser and not the phpMyAdmin one.</p>
</section>
<section id="esri-shape-file">
<h3>ESRI Shape File<a class="headerlink" href="#esri-shape-file" title="Permalink to this heading"></a></h3>
<p>The ESRI shapefile or simply a shapefile is a popular geospatial vector data
format for geographic information systems software. It is developed and
regulated by Esri as a (mostly) open specification for data interoperability
among Esri and other software products.</p>
</section>
<section id="mediawiki">
<h3>MediaWiki<a class="headerlink" href="#mediawiki" title="Permalink to this heading"></a></h3>
<p>MediaWiki files, which can be exported by phpMyAdmin (version 4.0 or later),
can now also be imported. This is the format used by Wikipedia to display
tables.</p>
</section>
<section id="open-document-spreadsheet-ods">
<h3>Open Document Spreadsheet (ODS)<a class="headerlink" href="#open-document-spreadsheet-ods" title="Permalink to this heading"></a></h3>
<p>OpenDocument workbooks containing one or more spreadsheets can now be directly imported.</p>
<p>When importing an ODS spreadsheet, the spreadsheet must be named in a specific way in order to make the
import as simple as possible.</p>
<section id="table-name">
<h4>Table name<a class="headerlink" href="#table-name" title="Permalink to this heading"></a></h4>
<p>During import, phpMyAdmin uses the sheet name as the table name; you should rename the
sheet in your spreadsheet program in order to match your existing table name (or the table you wish to create,
though this is less of a concern since you could quickly rename the new table from the Operations tab).</p>
</section>
<section id="column-names">
<h4>Column names<a class="headerlink" href="#column-names" title="Permalink to this heading"></a></h4>
<p>You should also make the first row of your spreadsheet a header with the names of the columns (this can be
accomplished by inserting a new row at the top of your spreadsheet). When on the Import screen, select the
checkbox for “The first line of the file contains the table column names;” this way your newly imported
data will go to the proper columns.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Formulas and calculations will NOT be evaluated, rather, their value from
the most recent save will be loaded. Please ensure that all values in the
spreadsheet are as needed before importing it.</p>
</div>
</section>
</section>
<section id="sql">
<h3>SQL<a class="headerlink" href="#sql" title="Permalink to this heading"></a></h3>
<p>SQL can be used to make any manipulation on data, it is also useful for restoring backed up data.</p>
</section>
<section id="xml">
<h3>XML<a class="headerlink" href="#xml" title="Permalink to this heading"></a></h3>
<p>XML files exported by phpMyAdmin (version 3.3.0 or later) can now be imported.
Structures (databases, tables, views, triggers, etc.) and/or data will be
created depending on the contents of the file.</p>
<p>The supported xml schemas are not yet documented in this wiki.</p>
</section>
</section>
<section id="export">
<h2>Export<a class="headerlink" href="#export" title="Permalink to this heading"></a></h2>
<p>phpMyAdmin can export into text files (even compressed) on your local disk (or
a special the webserver <span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_SaveDir"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['SaveDir']</span></code></a> folder) in various
commonly used formats:</p>
<section id="codegen">
<h3>CodeGen<a class="headerlink" href="#codegen" title="Permalink to this heading"></a></h3>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/NHibernate">NHibernate</a> file format. Planned
versions: Java, Hibernate, PHP PDO, JSON, etc. So the preliminary name is
codegen.</p>
</section>
<section id="id1">
<h3>CSV<a class="headerlink" href="#id1" title="Permalink to this heading"></a></h3>
<p>Comma separated values format which is often used by spreadsheets or various
other programs for export/import.</p>
</section>
<section id="csv-for-microsoft-excel">
<h3>CSV for Microsoft Excel<a class="headerlink" href="#csv-for-microsoft-excel" title="Permalink to this heading"></a></h3>
<p>This is just preconfigured version of CSV export which can be imported into
most English versions of Microsoft Excel. Some localised versions (like
“Danish”) are expecting “;” instead of “,” as field separator.</p>
</section>
<section id="microsoft-word-2000">
<h3>Microsoft Word 2000<a class="headerlink" href="#microsoft-word-2000" title="Permalink to this heading"></a></h3>
<p>If youre using Microsoft Word 2000 or newer (or compatible such as
OpenOffice.org), you can use this export.</p>
</section>
<section id="json">
<h3>JSON<a class="headerlink" href="#json" title="Permalink to this heading"></a></h3>
<p>JSON (JavaScript Object Notation) is a lightweight data-interchange format. It
is easy for humans to read and write and it is easy for machines to parse and
generate.</p>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 4.7.0: </span>The generated JSON structure has been changed in phpMyAdmin 4.7.0 to
produce valid JSON data.</p>
</div>
<p>The generated JSON is list of objects with following attributes:</p>
<dl class="js data">
<dt class="sig sig-object js" id="type">
<span class="sig-name descname"><span class="n"><span class="pre">type</span></span></span><a class="headerlink" href="#type" title="Permalink to this definition"></a></dt>
<dd><p>Type of given object, can be one of:</p>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">header</span></code></dt><dd><p>Export header containing comment and phpMyAdmin version.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">database</span></code></dt><dd><p>Start of a database marker, containing name of database.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">table</span></code></dt><dd><p>Table data export.</p>
</dd>
</dl>
</dd></dl>
<dl class="js data">
<dt class="sig sig-object js" id="version">
<span class="sig-name descname"><span class="n"><span class="pre">version</span></span></span><a class="headerlink" href="#version" title="Permalink to this definition"></a></dt>
<dd><p>Used in <code class="docutils literal notranslate"><span class="pre">header</span></code> <a class="reference internal" href="#type" title="type"><code class="xref js js-data docutils literal notranslate"><span class="pre">type</span></code></a> and indicates phpMyAdmin version.</p>
</dd></dl>
<dl class="js data">
<dt class="sig sig-object js" id="comment">
<span class="sig-name descname"><span class="n"><span class="pre">comment</span></span></span><a class="headerlink" href="#comment" title="Permalink to this definition"></a></dt>
<dd><p>Optional textual comment.</p>
</dd></dl>
<dl class="js data">
<dt class="sig sig-object js" id="name">
<span class="sig-name descname"><span class="n"><span class="pre">name</span></span></span><a class="headerlink" href="#name" title="Permalink to this definition"></a></dt>
<dd><p>Object name - either table or database based on <a class="reference internal" href="#type" title="type"><code class="xref js js-data docutils literal notranslate"><span class="pre">type</span></code></a>.</p>
</dd></dl>
<dl class="js data">
<dt class="sig sig-object js" id="database">
<span class="sig-name descname"><span class="n"><span class="pre">database</span></span></span><a class="headerlink" href="#database" title="Permalink to this definition"></a></dt>
<dd><p>Database name for <code class="docutils literal notranslate"><span class="pre">table</span></code> <a class="reference internal" href="#type" title="type"><code class="xref js js-data docutils literal notranslate"><span class="pre">type</span></code></a>.</p>
</dd></dl>
<dl class="js data">
<dt class="sig sig-object js" id="data">
<span class="sig-name descname"><span class="n"><span class="pre">data</span></span></span><a class="headerlink" href="#data" title="Permalink to this definition"></a></dt>
<dd><p>Table content for <code class="docutils literal notranslate"><span class="pre">table</span></code> <a class="reference internal" href="#type" title="type"><code class="xref js js-data docutils literal notranslate"><span class="pre">type</span></code></a>.</p>
</dd></dl>
<p>Sample output:</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;comment&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Export to JSON plugin for PHPMyAdmin&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;header&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;version&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;4.7.0-dev&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;cars&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;database&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;car_id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;1&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Green Chrysler 300&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;make_id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;5&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;mileage&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;113688&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;price&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;13545.00&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;transmission&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;automatic&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;yearmade&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;2007&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;database&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;cars&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;cars&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;table&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;data&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;make&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Chrysler&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;make_id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;5&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;database&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;cars&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;makes&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;table&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">]</span>
</pre></div>
</div>
</section>
<section id="latex">
<h3>LaTeX<a class="headerlink" href="#latex" title="Permalink to this heading"></a></h3>
<p>If you want to embed table data or structure in LaTeX, this is right choice for you.</p>
<p>LaTeX is a typesetting system that is very suitable for producing scientific
and mathematical documents of high typographical quality. It is also suitable
for producing all sorts of other documents, from simple letters to complete
books. LaTeX uses TeX as its formatting engine. Learn more about TeX and
LaTeX on <a class="reference external" href="https://www.ctan.org/">the Comprehensive TeX Archive Network</a>
also see the <a class="reference external" href="https://www.ctan.org/tex/">short description od TeX</a>.</p>
<p>The output needs to be embedded into a LaTeX document before it can be
rendered, for example in following document:</p>
<div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\documentclass</span><span class="nb">{</span>article<span class="nb">}</span>
<span class="k">\title</span><span class="nb">{</span>phpMyAdmin SQL output<span class="nb">}</span>
<span class="k">\author</span><span class="nb">{}</span>
<span class="k">\usepackage</span><span class="nb">{</span>longtable,lscape<span class="nb">}</span>
<span class="k">\date</span><span class="nb">{}</span>
<span class="k">\setlength</span><span class="nb">{</span><span class="k">\parindent</span><span class="nb">}{</span>0pt<span class="nb">}</span>
<span class="k">\usepackage</span><span class="na">[left=2cm,top=2cm,right=2cm,nohead,nofoot]</span><span class="nb">{</span>geometry<span class="nb">}</span>
<span class="k">\pdfpagewidth</span> 210mm
<span class="k">\pdfpageheight</span> 297mm
<span class="k">\begin</span><span class="nb">{</span>document<span class="nb">}</span>
<span class="k">\maketitle</span>
<span class="c">% insert phpMyAdmin LaTeX Dump here</span>
<span class="k">\end</span><span class="nb">{</span>document<span class="nb">}</span>
</pre></div>
</div>
</section>
<section id="id2">
<h3>MediaWiki<a class="headerlink" href="#id2" title="Permalink to this heading"></a></h3>
<p>Both tables and databases can be exported in the MediaWiki format, which is
used by Wikipedia to display tables. It can export structure, data or both,
including table names or headers.</p>
</section>
<section id="opendocument-spreadsheet">
<h3>OpenDocument Spreadsheet<a class="headerlink" href="#opendocument-spreadsheet" title="Permalink to this heading"></a></h3>
<p>Open standard for spreadsheet data, which is being widely adopted. Many recent
spreadsheet programs, such as LibreOffice, OpenOffice, Microsoft Office or
Google Docs can handle this format.</p>
</section>
<section id="opendocument-text">
<h3>OpenDocument Text<a class="headerlink" href="#opendocument-text" title="Permalink to this heading"></a></h3>
<p>New standard for text data which is being widely adopted. Most recent word
processors (such as LibreOffice, OpenOffice, Microsoft Word, AbiWord or KWord)
can handle this.</p>
</section>
<section id="pdf">
<h3>PDF<a class="headerlink" href="#pdf" title="Permalink to this heading"></a></h3>
<p>For presentation purposes, non editable PDF might be best choice for you.</p>
</section>
<section id="php-array">
<h3>PHP Array<a class="headerlink" href="#php-array" title="Permalink to this heading"></a></h3>
<p>You can generate a php file which will declare a multidimensional array with
the contents of the selected table or database.</p>
</section>
<section id="id3">
<h3>SQL<a class="headerlink" href="#id3" title="Permalink to this heading"></a></h3>
<p>Export in SQL can be used to restore your database, thus it is useful for
backing up.</p>
<p>The option Maximal length of created query seems to be undocumented. But
experiments has shown that it splits large extended INSERTS so each one is no
bigger than the given number of bytes (or characters?). Thus when importing the
file, for large tables you avoid the error “Got a packet bigger than
max_allowed_packet bytes”.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html">https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html</a></p>
</div>
<section id="data-options">
<h4>Data Options<a class="headerlink" href="#data-options" title="Permalink to this heading"></a></h4>
<p><strong>Complete inserts</strong> adds the column names to the SQL dump. This parameter
improves the readability and reliability of the dump. Adding the column names
increases the size of the dump, but when combined with Extended inserts its
negligible.</p>
<p><strong>Extended inserts</strong> combines multiple rows of data into a single INSERT query.
This will significantly decrease filesize for large SQL dumps, increases the
INSERT speed when imported, and is generally recommended.</p>
</section>
</section>
<section id="texy">
<h3>Texy!<a class="headerlink" href="#texy" title="Permalink to this heading"></a></h3>
<p><a class="reference external" href="https://texy.info/">Texy!</a> markup format. You can see example on <a class="reference external" href="https://texy.info/en/try/4q5we">Texy! demo</a>.</p>
</section>
<section id="id5">
<h3>XML<a class="headerlink" href="#id5" title="Permalink to this heading"></a></h3>
<p>Easily parsable export for use with custom scripts.</p>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 3.3.0: </span>The XML schema used has changed as of version 3.3.0</p>
</div>
</section>
<section id="yaml">
<h3>YAML<a class="headerlink" href="#yaml" title="Permalink to this heading"></a></h3>
<p>YAML is a data serialization format which is both human readable and
computationally powerful ( &lt;<a class="reference external" href="https://yaml.org">https://yaml.org</a>&gt; ).</p>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Import and export</a><ul>
<li><a class="reference internal" href="#import">Import</a><ul>
<li><a class="reference internal" href="#csv">CSV</a></li>
<li><a class="reference internal" href="#csv-using-load-data">CSV using LOAD DATA</a></li>
<li><a class="reference internal" href="#esri-shape-file">ESRI Shape File</a></li>
<li><a class="reference internal" href="#mediawiki">MediaWiki</a></li>
<li><a class="reference internal" href="#open-document-spreadsheet-ods">Open Document Spreadsheet (ODS)</a><ul>
<li><a class="reference internal" href="#table-name">Table name</a></li>
<li><a class="reference internal" href="#column-names">Column names</a></li>
</ul>
</li>
<li><a class="reference internal" href="#sql">SQL</a></li>
<li><a class="reference internal" href="#xml">XML</a></li>
</ul>
</li>
<li><a class="reference internal" href="#export">Export</a><ul>
<li><a class="reference internal" href="#codegen">CodeGen</a></li>
<li><a class="reference internal" href="#id1">CSV</a></li>
<li><a class="reference internal" href="#csv-for-microsoft-excel">CSV for Microsoft Excel</a></li>
<li><a class="reference internal" href="#microsoft-word-2000">Microsoft Word 2000</a></li>
<li><a class="reference internal" href="#json">JSON</a><ul>
<li><a class="reference internal" href="#type"><code class="docutils literal notranslate"><span class="pre">type</span></code></a></li>
<li><a class="reference internal" href="#version"><code class="docutils literal notranslate"><span class="pre">version</span></code></a></li>
<li><a class="reference internal" href="#comment"><code class="docutils literal notranslate"><span class="pre">comment</span></code></a></li>
<li><a class="reference internal" href="#name"><code class="docutils literal notranslate"><span class="pre">name</span></code></a></li>
<li><a class="reference internal" href="#database"><code class="docutils literal notranslate"><span class="pre">database</span></code></a></li>
<li><a class="reference internal" href="#data"><code class="docutils literal notranslate"><span class="pre">data</span></code></a></li>
</ul>
</li>
<li><a class="reference internal" href="#latex">LaTeX</a></li>
<li><a class="reference internal" href="#id2">MediaWiki</a></li>
<li><a class="reference internal" href="#opendocument-spreadsheet">OpenDocument Spreadsheet</a></li>
<li><a class="reference internal" href="#opendocument-text">OpenDocument Text</a></li>
<li><a class="reference internal" href="#pdf">PDF</a></li>
<li><a class="reference internal" href="#php-array">PHP Array</a></li>
<li><a class="reference internal" href="#id3">SQL</a><ul>
<li><a class="reference internal" href="#data-options">Data Options</a></li>
</ul>
</li>
<li><a class="reference internal" href="#texy">Texy!</a></li>
<li><a class="reference internal" href="#id5">XML</a></li>
<li><a class="reference internal" href="#yaml">YAML</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="charts.html"
title="previous chapter">Charts</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="themes.html"
title="next chapter">Custom Themes</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/import_export.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="themes.html" title="Custom Themes"
>next</a> |</li>
<li class="right" >
<a href="charts.html" title="Charts"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Import and export</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

230
pma/doc/html/index.html Normal file
View File

@@ -0,0 +1,230 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Welcome to phpMyAdmins documentation! &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Introduction" href="intro.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="intro.html" title="Introduction"
accesskey="N">next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Welcome to phpMyAdmins documentation!</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="welcome-to-phpmyadmin-s-documentation">
<h1>Welcome to phpMyAdmins documentation!<a class="headerlink" href="#welcome-to-phpmyadmin-s-documentation" title="Permalink to this heading"></a></h1>
<p>Contents:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro.html#supported-features">Supported features</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#shortcut-keys">Shortcut keys</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro.html#a-word-about-users">A word about users</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="require.html">Requirements</a><ul>
<li class="toctree-l2"><a class="reference internal" href="require.html#web-server">Web server</a></li>
<li class="toctree-l2"><a class="reference internal" href="require.html#php">PHP</a></li>
<li class="toctree-l2"><a class="reference internal" href="require.html#database">Database</a></li>
<li class="toctree-l2"><a class="reference internal" href="require.html#web-browser">Web browser</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="setup.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="setup.html#linux-distributions">Linux distributions</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-on-windows">Installing on Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-from-git">Installing from Git</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-using-composer">Installing using Composer</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#installing-using-docker">Installing using Docker</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#ibm-cloud">IBM Cloud</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#quick-install">Quick Install</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#verifying-phpmyadmin-releases">Verifying phpMyAdmin releases</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#phpmyadmin-configuration-storage">phpMyAdmin configuration storage</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#upgrading-from-an-older-version">Upgrading from an older version</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#using-authentication-modes">Using authentication modes</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#securing-your-phpmyadmin-installation">Securing your phpMyAdmin installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#using-ssl-for-connection-to-database-server">Using SSL for connection to database server</a></li>
<li class="toctree-l2"><a class="reference internal" href="setup.html#known-issues">Known issues</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="config.html">Configuration</a><ul>
<li class="toctree-l2"><a class="reference internal" href="config.html#basic-settings">Basic settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#server-connection-settings">Server connection settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#generic-settings">Generic settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#cookie-authentication-options">Cookie authentication options</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#navigation-panel-setup">Navigation panel setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#main-panel">Main panel</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#database-structure">Database structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#browse-mode">Browse mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#editing-mode">Editing mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#export-and-import-settings">Export and import settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#tabs-display-settings">Tabs display settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#pdf-options">PDF Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#languages">Languages</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#web-server-settings">Web server settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#theme-settings">Theme settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#design-customization">Design customization</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#text-fields">Text fields</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#sql-query-box-settings">SQL query box settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#web-server-upload-save-import-directories">Web server upload/save/import directories</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#various-display-setting">Various display setting</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#page-titles">Page titles</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#theme-manager-settings">Theme manager settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#default-queries">Default queries</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#mysql-settings">MySQL settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#default-options-for-transformations">Default options for Transformations</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#console-settings">Console settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#developer">Developer</a></li>
<li class="toctree-l2"><a class="reference internal" href="config.html#examples">Examples</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="user.html">User Guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings.html">Configuring phpMyAdmin</a></li>
<li class="toctree-l2"><a class="reference internal" href="two_factor.html">Two-factor authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="transformations.html">Transformations</a></li>
<li class="toctree-l2"><a class="reference internal" href="bookmarks.html">Bookmarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html">User management</a></li>
<li class="toctree-l2"><a class="reference internal" href="relations.html">Relations</a></li>
<li class="toctree-l2"><a class="reference internal" href="charts.html">Charts</a></li>
<li class="toctree-l2"><a class="reference internal" href="import_export.html">Import and export</a></li>
<li class="toctree-l2"><a class="reference internal" href="themes.html">Custom Themes</a></li>
<li class="toctree-l2"><a class="reference internal" href="other.html">Other sources of information</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ - Frequently Asked Questions</a><ul>
<li class="toctree-l2"><a class="reference internal" href="faq.html#server">Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#known-limitations">Known limitations</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#isps-multi-user-installations">ISPs, multi-user installations</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#browsers-or-client-os">Browsers or client OS</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#using-phpmyadmin">Using phpMyAdmin</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#phpmyadmin-project">phpMyAdmin project</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#security">Security</a></li>
<li class="toctree-l2"><a class="reference internal" href="faq.html#synchronization">Synchronization</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developers.html">Developers Information</a></li>
<li class="toctree-l1"><a class="reference internal" href="security.html">Security policy</a><ul>
<li class="toctree-l2"><a class="reference internal" href="security.html#typical-vulnerabilities">Typical vulnerabilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="security.html#reporting-security-issues">Reporting security issues</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="vendors.html">Distributing and packaging phpMyAdmin</a><ul>
<li class="toctree-l2"><a class="reference internal" href="vendors.html#external-libraries">External libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="vendors.html#specific-files-licenses">Specific files LICENSES</a></li>
<li class="toctree-l2"><a class="reference internal" href="vendors.html#licenses-for-vendors">Licenses for vendors</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="copyright.html">Copyright</a><ul>
<li class="toctree-l2"><a class="reference internal" href="copyright.html#third-party-licenses">Third party licenses</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a><ul>
<li class="toctree-l2"><a class="reference internal" href="credits.html#credits-in-chronological-order">Credits, in chronological order</a></li>
<li class="toctree-l2"><a class="reference internal" href="credits.html#translators">Translators</a></li>
<li class="toctree-l2"><a class="reference internal" href="credits.html#documentation-translators">Documentation translators</a></li>
<li class="toctree-l2"><a class="reference internal" href="credits.html#original-credits-of-version-2-1-0">Original Credits of Version 2.1.0</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="glossary.html">Glossary</a></li>
</ul>
</div>
</section>
<section id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this heading"></a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
<li><p><a class="reference internal" href="glossary.html#glossary"><span class="std std-ref">Glossary</span></a></p></li>
</ul>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="#">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Welcome to phpMyAdmins documentation!</a></li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="intro.html"
title="next chapter">Introduction</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="intro.html" title="Introduction"
>next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Welcome to phpMyAdmins documentation!</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

198
pma/doc/html/intro.html Normal file
View File

@@ -0,0 +1,198 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Introduction &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Requirements" href="require.html" />
<link rel="prev" title="Welcome to phpMyAdmins documentation!" href="index.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="require.html" title="Requirements"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Welcome to phpMyAdmins documentation!"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Introduction</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="introduction">
<span id="intro"></span><h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this heading"></a></h1>
<p>phpMyAdmin is a free software tool written in PHP that is intended to handle the
administration of a MySQL or MariaDB database server. You can use phpMyAdmin to
perform most administration tasks, including creating a database, running queries,
and adding user accounts.</p>
<section id="supported-features">
<h2>Supported features<a class="headerlink" href="#supported-features" title="Permalink to this heading"></a></h2>
<p>Currently phpMyAdmin can:</p>
<ul class="simple">
<li><p>create, browse, edit, and drop databases, tables, views, columns, and indexes</p></li>
<li><p>display multiple results sets through stored procedures or queries</p></li>
<li><p>create, copy, drop, rename and alter databases, tables, columns and
indexes</p></li>
<li><p>maintenance server, databases and tables, with proposals on server
configuration</p></li>
<li><p>execute, edit and bookmark any <a class="reference internal" href="glossary.html#term-SQL"><span class="xref std std-term">SQL</span></a>-statement, even batch-queries</p></li>
<li><p>load text files into tables</p></li>
<li><p>create <a class="footnote-reference brackets" href="#f1" id="id1" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> and read dumps of tables</p></li>
<li><p>export <a class="footnote-reference brackets" href="#f1" id="id2" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a> data to various formats: <a class="reference internal" href="glossary.html#term-CSV"><span class="xref std std-term">CSV</span></a>, <a class="reference internal" href="glossary.html#term-XML"><span class="xref std std-term">XML</span></a>, <a class="reference internal" href="glossary.html#term-PDF"><span class="xref std std-term">PDF</span></a>,
<a class="reference internal" href="glossary.html#term-ISO"><span class="xref std std-term">ISO</span></a>/<a class="reference internal" href="glossary.html#term-IEC"><span class="xref std std-term">IEC</span></a> 26300 - <a class="reference internal" href="glossary.html#term-OpenDocument"><span class="xref std std-term">OpenDocument</span></a> Text and Spreadsheet, Microsoft
Word 2000, and LATEX formats</p></li>
<li><p>import data and <a class="reference internal" href="glossary.html#term-MySQL"><span class="xref std std-term">MySQL</span></a> structures from <a class="reference internal" href="glossary.html#term-OpenDocument"><span class="xref std std-term">OpenDocument</span></a> spreadsheets, as
well as <a class="reference internal" href="glossary.html#term-XML"><span class="xref std std-term">XML</span></a>, <a class="reference internal" href="glossary.html#term-CSV"><span class="xref std std-term">CSV</span></a>, and <a class="reference internal" href="glossary.html#term-SQL"><span class="xref std std-term">SQL</span></a> files</p></li>
<li><p>administer multiple servers</p></li>
<li><p>add, edit, and remove MySQL user accounts and privileges</p></li>
<li><p>check referential integrity in MyISAM tables</p></li>
<li><p>using Query-by-example (QBE), create complex queries automatically
connecting required tables</p></li>
<li><p>create <a class="reference internal" href="glossary.html#term-PDF"><span class="xref std std-term">PDF</span></a> graphics of your
database layout</p></li>
<li><p>search globally in a database or a subset of it</p></li>
<li><p>transform stored data into any format using a set of predefined
functions, like displaying BLOB-data as image or download-link</p></li>
<li><p>track changes on databases, tables and views</p></li>
<li><p>support InnoDB tables and foreign keys</p></li>
<li><p>support mysqli, the improved MySQL extension see <a class="reference internal" href="faq.html#faq1-17"><span class="std std-ref">1.17 Which Database versions does phpMyAdmin support?</span></a></p></li>
<li><p>create, edit, call, export and drop stored procedures and functions</p></li>
<li><p>create, edit, export and drop events and triggers</p></li>
<li><p>communicate in <a class="reference external" href="https://www.phpmyadmin.net/translations/">80 different languages</a></p></li>
</ul>
</section>
<section id="shortcut-keys">
<h2>Shortcut keys<a class="headerlink" href="#shortcut-keys" title="Permalink to this heading"></a></h2>
<p>Currently phpMyAdmin supports following shortcuts:</p>
<ul class="simple">
<li><p>k and CTRL+k - Toggle console</p></li>
<li><p>CTRL+ALT+c - Toggle console</p></li>
<li><p>h - Go to home page</p></li>
<li><p>s - Open settings</p></li>
<li><p>d + s - Go to database structure (Provided you are in database related page)</p></li>
<li><p>d + f - Search database (Provided you are in database related page)</p></li>
<li><p>t + s - Go to table structure (Provided you are in table related page)</p></li>
<li><p>t + f - Search table (Provided you are in table related page)</p></li>
<li><p>backspace - Takes you to older page.</p></li>
</ul>
</section>
<section id="a-word-about-users">
<h2>A word about users<a class="headerlink" href="#a-word-about-users" title="Permalink to this heading"></a></h2>
<p>Many people have difficulty understanding the concept of user
management with regards to phpMyAdmin. When a user logs in to
phpMyAdmin, that username and password are passed directly to MySQL.
phpMyAdmin does no account management on its own (other than allowing
one to manipulate the MySQL user account information); all users must
be valid MySQL users.</p>
<p class="rubric">Footnotes</p>
<aside class="footnote-list brackets">
<aside class="footnote brackets" id="f1" role="note">
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#id1">1</a>,<a role="doc-backlink" href="#id2">2</a>)</span>
<p>phpMyAdmin can compress (<a class="reference internal" href="glossary.html#term-ZIP"><span class="xref std std-term">ZIP</span></a>, <a class="reference internal" href="glossary.html#term-GZip"><span class="xref std std-term">GZip</span></a> or <a class="reference internal" href="glossary.html#term-RFC-1952"><span class="xref std std-term">RFC 1952</span></a>
formats) dumps and <a class="reference internal" href="glossary.html#term-CSV"><span class="xref std std-term">CSV</span></a> exports if you use PHP with
<a class="reference internal" href="glossary.html#term-Zlib"><span class="xref std std-term">Zlib</span></a> support (<code class="docutils literal notranslate"><span class="pre">--with-zlib</span></code>).
Proper support may also need changes in <code class="file docutils literal notranslate"><span class="pre">php.ini</span></code>.</p>
</aside>
</aside>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Introduction</a><ul>
<li><a class="reference internal" href="#supported-features">Supported features</a></li>
<li><a class="reference internal" href="#shortcut-keys">Shortcut keys</a></li>
<li><a class="reference internal" href="#a-word-about-users">A word about users</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Welcome to phpMyAdmins documentation!</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="require.html"
title="next chapter">Requirements</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/intro.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="require.html" title="Requirements"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Welcome to phpMyAdmins documentation!"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Introduction</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

158
pma/doc/html/other.html Normal file
View File

@@ -0,0 +1,158 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Other sources of information &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="FAQ - Frequently Asked Questions" href="faq.html" />
<link rel="prev" title="Custom Themes" href="themes.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="themes.html" title="Custom Themes"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Other sources of information</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="other-sources-of-information">
<h1>Other sources of information<a class="headerlink" href="#other-sources-of-information" title="Permalink to this heading"></a></h1>
<section id="printed-book">
<h2>Printed Book<a class="headerlink" href="#printed-book" title="Permalink to this heading"></a></h2>
<p>The definitive guide to using phpMyAdmin is the book Mastering phpMyAdmin for
Effective MySQL Management by Marc Delisle. You can get information on that
book and other officially endorsed <a class="reference external" href="https://www.phpmyadmin.net/docs/">books at the phpMyAdmin site</a>.</p>
</section>
<section id="tutorials">
<h2>Tutorials<a class="headerlink" href="#tutorials" title="Permalink to this heading"></a></h2>
<p>Third party tutorials and articles which you might find interesting:</p>
<section id="cesky-czech">
<h3>Česky (Czech)<a class="headerlink" href="#cesky-czech" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://cihar.com/publications/linuxsoft/">Seriál o phpMyAdminovi</a></p></li>
</ul>
</section>
<section id="english">
<h3>English<a class="headerlink" href="#english" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://garv.in/tops/texte/mimetutorial">Having fun with phpMyAdmins MIME-transformations &amp; PDF-features</a></p></li>
<li><p><a class="reference external" href="http://www.php-editors.com/articles/sql_phpmyadmin.php">Learning SQL Using phpMyAdmin (old tutorial)</a></p></li>
</ul>
</section>
<section id="russian">
<h3>Русский (Russian)<a class="headerlink" href="#russian" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://php-myadmin.ru/">Russian server about phpMyAdmin</a></p></li>
</ul>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Other sources of information</a><ul>
<li><a class="reference internal" href="#printed-book">Printed Book</a></li>
<li><a class="reference internal" href="#tutorials">Tutorials</a><ul>
<li><a class="reference internal" href="#cesky-czech">Česky (Czech)</a></li>
<li><a class="reference internal" href="#english">English</a></li>
<li><a class="reference internal" href="#russian">Русский (Russian)</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="themes.html"
title="previous chapter">Custom Themes</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="faq.html"
title="next chapter">FAQ - Frequently Asked Questions</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/other.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="faq.html" title="FAQ - Frequently Asked Questions"
>next</a> |</li>
<li class="right" >
<a href="themes.html" title="Custom Themes"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Other sources of information</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

View File

@@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>User management &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Relations" href="relations.html" />
<link rel="prev" title="Bookmarks" href="bookmarks.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="relations.html" title="Relations"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="bookmarks.html" title="Bookmarks"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">User management</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="user-management">
<h1>User management<a class="headerlink" href="#user-management" title="Permalink to this heading"></a></h1>
<p>User management is the process of controlling which users are allowed to
connect to the MySQL server and what permissions they have on each database.
phpMyAdmin does not handle user management, rather it passes the username and
password on to MySQL, which then determines whether a user is permitted to
perform a particular action. Within phpMyAdmin, administrators have full
control over creating users, viewing and editing privileges for existing users,
and removing users.</p>
<p>Within phpMyAdmin, user management is controlled via the <span class="guilabel">User accounts</span> tab
from the main page. Users can be created, edited, and removed.</p>
<section id="creating-a-new-user">
<h2>Creating a new user<a class="headerlink" href="#creating-a-new-user" title="Permalink to this heading"></a></h2>
<p>To create a new user, click the <span class="guilabel">Add user account</span> link near the bottom
of the <span class="guilabel">User accounts</span> page (you must be a “superuser”, e.g., user “root”).
Use the textboxes and drop-downs to configure the user to your particular
needs. You can then select whether to create a database for that user and grant
specific global privileges. Once youve created the user (by clicking Go), you
can define that users permissions on a specific database (dont grant global
privileges in that case). In general, users do not need any global privileges
(other than USAGE), only permissions for their specific database.</p>
</section>
<section id="editing-an-existing-user">
<h2>Editing an existing user<a class="headerlink" href="#editing-an-existing-user" title="Permalink to this heading"></a></h2>
<p>To edit an existing user, simply click the pencil icon to the right of that
user in the <span class="guilabel">User accounts</span> page. You can then edit their global- and
database-specific privileges, change their password, or even copy those
privileges to a new user.</p>
</section>
<section id="deleting-a-user">
<h2>Deleting a user<a class="headerlink" href="#deleting-a-user" title="Permalink to this heading"></a></h2>
<p>From the <span class="guilabel">User accounts</span> page, check the checkbox for the user you wish to
remove, select whether or not to also remove any databases of the same name (if
they exist), and click Go.</p>
</section>
<section id="assigning-privileges-to-user-for-a-specific-database">
<h2>Assigning privileges to user for a specific database<a class="headerlink" href="#assigning-privileges-to-user-for-a-specific-database" title="Permalink to this heading"></a></h2>
<p>Users are assigned to databases by editing the user record (from the
<span class="guilabel">User accounts</span> link on the home page).
If you are creating a user specifically for a given table
you will have to create the user first (with no global privileges) and then go
back and edit that user to add the table and privileges for the individual
table.</p>
</section>
<section id="configurable-menus-and-user-groups">
<span id="configurablemenus"></span><h2>Configurable menus and user groups<a class="headerlink" href="#configurable-menus-and-user-groups" title="Permalink to this heading"></a></h2>
<p>By enabling <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_Servers_users"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['users']</span></code></a> and
<span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_Servers_usergroups"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['usergroups']</span></code></a> you can customize what users
will see in the phpMyAdmin navigation.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This feature only limits what a user sees, they are still able to use all the
functions. So this can not be considered as a security limitation. Should
you want to limit what users can do, use MySQL privileges to achieve that.</p>
</div>
<p>With this feature enabled, the <span class="guilabel">User accounts</span> management interface gains
a second tab for managing <span class="guilabel">User groups</span>, where you can define what each
group will view (see image below) and you can then assign each user to one of
these groups. Users will be presented with a simplified user interface, which might be
useful for inexperienced users who could be overwhelmed by all the features
phpMyAdmin provides.</p>
<img alt="_images/usergroups.png" src="_images/usergroups.png" />
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">User management</a><ul>
<li><a class="reference internal" href="#creating-a-new-user">Creating a new user</a></li>
<li><a class="reference internal" href="#editing-an-existing-user">Editing an existing user</a></li>
<li><a class="reference internal" href="#deleting-a-user">Deleting a user</a></li>
<li><a class="reference internal" href="#assigning-privileges-to-user-for-a-specific-database">Assigning privileges to user for a specific database</a></li>
<li><a class="reference internal" href="#configurable-menus-and-user-groups">Configurable menus and user groups</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="bookmarks.html"
title="previous chapter">Bookmarks</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="relations.html"
title="next chapter">Relations</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/privileges.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="relations.html" title="Relations"
>next</a> |</li>
<li class="right" >
<a href="bookmarks.html" title="Bookmarks"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">User management</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

194
pma/doc/html/relations.html Normal file
View File

@@ -0,0 +1,194 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Relations &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Charts" href="charts.html" />
<link rel="prev" title="User management" href="privileges.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="charts.html" title="Charts"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="privileges.html" title="User management"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Relations</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="relations">
<span id="id1"></span><h1>Relations<a class="headerlink" href="#relations" title="Permalink to this heading"></a></h1>
<p>phpMyAdmin allows relationships (similar to foreign keys) using MySQL-native
(InnoDB) methods when available and falling back on special phpMyAdmin-only
features when needed. There are two ways of editing these relations, with the
<em>relation view</em> and the drag-and-drop <em>designer</em> both of which are explained
on this page.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You need to have configured the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> for using phpMyAdmin
only relations.</p>
</div>
<section id="technical-info">
<h2>Technical info<a class="headerlink" href="#technical-info" title="Permalink to this heading"></a></h2>
<p>Currently the only MySQL table type that natively supports relationships is
InnoDB. When using an InnoDB table, phpMyAdmin will create real InnoDB
relations which will be enforced by MySQL no matter which application accesses
the database. In the case of any other table type, phpMyAdmin enforces the
relations internally and those relations are not applied to any other
application.</p>
</section>
<section id="relation-view">
<h2>Relation view<a class="headerlink" href="#relation-view" title="Permalink to this heading"></a></h2>
<p>In order to get it working, you first have to properly create the
[[pmadb|pmadb]]. Once that is setup, select a tables “Structure” page. Below
the table definition, a link called “Relation view” is shown. If you click that
link, a page will be shown that offers you to create a link to another table
for any (most) fields. Only PRIMARY KEYS are shown there, so if the field you
are referring to is not shown, you most likely are doing something wrong. The
drop-down at the bottom is the field which will be used as the name for a
record.</p>
<section id="relation-view-example">
<h3>Relation view example<a class="headerlink" href="#relation-view-example" title="Permalink to this heading"></a></h3>
<img alt="_images/pma-relations-relation-view-link.png" src="_images/pma-relations-relation-view-link.png" />
<img alt="_images/pma-relations-relation-link.png" src="_images/pma-relations-relation-link.png" />
<p>Lets say you have categories and links and one category can contain several links. Your table structure would be something like this:</p>
<ul class="simple">
<li><p><cite>category.category_id</cite> (must be unique)</p></li>
<li><p><cite>category.name</cite></p></li>
<li><p><cite>link.link_id</cite></p></li>
<li><p><cite>link.category_id</cite></p></li>
<li><p><cite>link.uri</cite>.</p></li>
</ul>
<p>Open the relation view (below the table structure) page for the <cite>link</cite> table and for <cite>category_id</cite> field, you select <cite>category.category_id</cite> as master record.</p>
<p>If you now browse the link table, the <cite>category_id</cite> field will be a clickable hyperlink to the proper category record. But all you see is just the <cite>category_id</cite>, not the name of the category.</p>
<img alt="_images/pma-relations-relation-name.png" src="_images/pma-relations-relation-name.png" />
<p>To fix this, open the relation view of the <cite>category</cite> table and in the drop down at the bottom, select “name”. If you now browse the link table again and hover the mouse over the <cite>category_id</cite> hyperlink, the value from the related category will be shown as tooltip.</p>
<img alt="_images/pma-relations-links.png" src="_images/pma-relations-links.png" />
</section>
</section>
<section id="designer">
<h2>Designer<a class="headerlink" href="#designer" title="Permalink to this heading"></a></h2>
<p>The Designer feature is a graphical way of creating, editing, and displaying
phpMyAdmin relations. These relations are compatible with those created in
phpMyAdmins relation view.</p>
<p>To use this feature, you need a properly configured <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> and
must have the <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_Servers_table_coords"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['Servers'][$i]['table_coords']</span></code></a> configured.</p>
<p>To use the designer, select a databases structure page, then look for the
<span class="guilabel">Designer</span> tab.</p>
<p>To export the view into PDF, you have to create PDF pages first. The Designer
creates the layout, how the tables shall be displayed. To finally export the
view, you have to create this with a PDF page and select your layout, which you
have created with the designer.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="faq.html#faqpdf"><span class="std std-ref">6.8 How can I produce a PDF schema of my database?</span></a></p>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Relations</a><ul>
<li><a class="reference internal" href="#technical-info">Technical info</a></li>
<li><a class="reference internal" href="#relation-view">Relation view</a><ul>
<li><a class="reference internal" href="#relation-view-example">Relation view example</a></li>
</ul>
</li>
<li><a class="reference internal" href="#designer">Designer</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="privileges.html"
title="previous chapter">User management</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="charts.html"
title="next chapter">Charts</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/relations.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="charts.html" title="Charts"
>next</a> |</li>
<li class="right" >
<a href="privileges.html" title="User management"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Relations</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

177
pma/doc/html/require.html Normal file
View File

@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Requirements &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Installation" href="setup.html" />
<link rel="prev" title="Introduction" href="intro.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="setup.html" title="Installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="intro.html" title="Introduction"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Requirements</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="requirements">
<span id="require"></span><h1>Requirements<a class="headerlink" href="#requirements" title="Permalink to this heading"></a></h1>
<section id="web-server">
<h2>Web server<a class="headerlink" href="#web-server" title="Permalink to this heading"></a></h2>
<p>Since phpMyAdmins interface is based entirely in your browser, youll need a
web server (such as Apache, nginx, <a class="reference internal" href="glossary.html#term-IIS"><span class="xref std std-term">IIS</span></a>) to install phpMyAdmins files into.</p>
</section>
<section id="php">
<h2>PHP<a class="headerlink" href="#php" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>You need PHP 7.2.5 or newer, with <code class="docutils literal notranslate"><span class="pre">session</span></code> support, the Standard PHP Library
(SPL) extension, hash, ctype, and JSON support.</p></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">mbstring</span></code> extension (see <a class="reference internal" href="glossary.html#term-mbstring"><span class="xref std std-term">mbstring</span></a>) is strongly recommended
for performance reasons.</p></li>
<li><p>To support uploading of ZIP files, you need the PHP <code class="docutils literal notranslate"><span class="pre">zip</span></code> extension.</p></li>
<li><p>You need GD2 support in PHP to display inline thumbnails of JPEGs
(“image/jpeg: inline”) with their original aspect ratio.</p></li>
<li><p>When using the cookie authentication (the default), the <a class="reference external" href="https://www.php.net/openssl">openssl</a> extension is strongly suggested.</p></li>
<li><p>To support upload progress bars, see <a class="reference internal" href="faq.html#faq2-9"><span class="std std-ref">2.9 Seeing an upload progress bar</span></a>.</p></li>
<li><p>To support XML and Open Document Spreadsheet importing, you need the
<a class="reference external" href="https://www.php.net/libxml">libxml</a> extension.</p></li>
<li><p>To support reCAPTCHA on the login page, you need the
<a class="reference external" href="https://www.php.net/openssl">openssl</a> extension.</p></li>
<li><p>To support displaying phpMyAdmins latest version, you need to enable
<code class="docutils literal notranslate"><span class="pre">allow_url_open</span></code> in your <code class="file docutils literal notranslate"><span class="pre">php.ini</span></code> or to have the
<a class="reference external" href="https://www.php.net/curl">curl</a> extension.</p></li>
</ul>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="faq.html#faq1-31"><span class="std std-ref">1.31 Which PHP versions does phpMyAdmin support?</span></a>, <a class="reference internal" href="setup.html#authentication-modes"><span class="std std-ref">Using authentication modes</span></a></p>
</div>
</section>
<section id="database">
<h2>Database<a class="headerlink" href="#database" title="Permalink to this heading"></a></h2>
<p>phpMyAdmin supports MySQL-compatible databases.</p>
<ul class="simple">
<li><p>MySQL 5.5 or newer</p></li>
<li><p>MariaDB 5.5 or newer</p></li>
</ul>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="faq.html#faq1-17"><span class="std std-ref">1.17 Which Database versions does phpMyAdmin support?</span></a></p>
</div>
</section>
<section id="web-browser">
<h2>Web browser<a class="headerlink" href="#web-browser" title="Permalink to this heading"></a></h2>
<p>To access phpMyAdmin you need a web browser with cookies and JavaScript
enabled.</p>
<p>You need a browser which is supported by Bootstrap 4.5, see
&lt;<a class="reference external" href="https://getbootstrap.com/docs/4.5/getting-started/browsers-devices/">https://getbootstrap.com/docs/4.5/getting-started/browsers-devices/</a>&gt;.</p>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 5.2.0: </span>You need a browser which is supported by Bootstrap 5.0, see
&lt;<a class="reference external" href="https://getbootstrap.com/docs/5.0/getting-started/browsers-devices/">https://getbootstrap.com/docs/5.0/getting-started/browsers-devices/</a>&gt;.</p>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Requirements</a><ul>
<li><a class="reference internal" href="#web-server">Web server</a></li>
<li><a class="reference internal" href="#php">PHP</a></li>
<li><a class="reference internal" href="#database">Database</a></li>
<li><a class="reference internal" href="#web-browser">Web browser</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="intro.html"
title="previous chapter">Introduction</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="setup.html"
title="next chapter">Installation</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/require.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="setup.html" title="Installation"
>next</a> |</li>
<li class="right" >
<a href="intro.html" title="Introduction"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Requirements</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

101
pma/doc/html/search.html Normal file
View File

@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<script src="searchindex.js" defer></script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1 id="search-documentation">Search</h1>
<noscript>
<div class="admonition warning">
<p>
Please activate JavaScript to enable the search
functionality.
</p>
</div>
</noscript>
<p>
Searching for multiple words only shows matches that contain
all words.
</p>
<form action="" method="get">
<input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="search" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
<div id="search-results">
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

220
pma/doc/html/security.html Normal file
View File

@@ -0,0 +1,220 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Security policy &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Distributing and packaging phpMyAdmin" href="vendors.html" />
<link rel="prev" title="Developers Information" href="developers.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="developers.html" title="Developers Information"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Security policy</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="security-policy">
<h1>Security policy<a class="headerlink" href="#security-policy" title="Permalink to this heading"></a></h1>
<p>The phpMyAdmin developer team is putting lot of effort to make phpMyAdmin as
secure as possible. But still web application like phpMyAdmin can be vulnerable
to a number of attacks and new ways to exploit are still being explored.</p>
<p>For every reported vulnerability we issue a phpMyAdmin Security Announcement
(PMASA) and it gets assigned a CVE ID as well. We might group similar
vulnerabilities to one PMASA (eg. multiple XSS vulnerabilities can be announced
under one PMASA).</p>
<p>If you think youve found a vulnerability, please see <a class="reference internal" href="#reporting-security"><span class="std std-ref">Reporting security issues</span></a>.</p>
<section id="typical-vulnerabilities">
<h2>Typical vulnerabilities<a class="headerlink" href="#typical-vulnerabilities" title="Permalink to this heading"></a></h2>
<p>In this section, we will describe typical vulnerabilities, which can appear in
our code base. This list is by no means complete, it is intended to show
typical attack surface.</p>
<section id="cross-site-scripting-xss">
<h3>Cross-site scripting (XSS)<a class="headerlink" href="#cross-site-scripting-xss" title="Permalink to this heading"></a></h3>
<p>When phpMyAdmin shows a piece of user data, e.g. something inside a users
database, all html special chars have to be escaped. When this escaping is
missing somewhere a malicious user might fill a database with specially crafted
content to trick an other user of that database into executing something. This
could for example be a piece of JavaScript code that would do any number of
nasty things.</p>
<p>phpMyAdmin tries to escape all userdata before it is rendered into html for the
browser.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Cross-site_scripting">Cross-site scripting on Wikipedia</a></p>
</div>
</section>
<section id="cross-site-request-forgery-csrf">
<h3>Cross-site request forgery (CSRF)<a class="headerlink" href="#cross-site-request-forgery-csrf" title="Permalink to this heading"></a></h3>
<p>An attacker would trick a phpMyAdmin user into clicking on a link to provoke
some action in phpMyAdmin. This link could either be sent via email or some
random website. If successful this the attacker would be able to perform some
action with the users privileges.</p>
<p>To mitigate this phpMyAdmin requires a token to be sent on sensitive requests.
The idea is that an attacker does not poses the currently valid token to
include in the presented link.</p>
<p>The token is regenerated for every login, so its generally valid only for
limited time, what makes it harder for attacker to obtain valid one.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Cross-site_request_forgery">Cross-site request forgery on Wikipedia</a></p>
</div>
</section>
<section id="sql-injection">
<h3>SQL injection<a class="headerlink" href="#sql-injection" title="Permalink to this heading"></a></h3>
<p>As the whole purpose of phpMyAdmin is to preform sql queries, this is not our
first concern. SQL injection is sensitive to us though when it concerns the
mysql control connection. This controlconnection can have additional privileges
which the logged in user does not poses. E.g. access the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>.</p>
<p>User data that is included in (administrative) queries should always be run
through DatabaseInterface::escapeString().</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/SQL_injection">SQL injection on Wikipedia</a></p>
</div>
</section>
<section id="brute-force-attack">
<h3>Brute force attack<a class="headerlink" href="#brute-force-attack" title="Permalink to this heading"></a></h3>
<p>phpMyAdmin on its own does not rate limit authentication attempts in any way.
This is caused by need to work in stateless environment, where there is no way
to protect against such kind of things.</p>
<p>To mitigate this, you can use Captcha or utilize external tools such as
fail2ban, this is more details described in <a class="reference internal" href="setup.html#securing"><span class="std std-ref">Securing your phpMyAdmin installation</span></a>.</p>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference external" href="https://en.wikipedia.org/wiki/Brute-force_attack">Brute force attack on Wikipedia</a></p>
</div>
</section>
</section>
<section id="reporting-security-issues">
<span id="reporting-security"></span><h2>Reporting security issues<a class="headerlink" href="#reporting-security-issues" title="Permalink to this heading"></a></h2>
<p>Should you find a security issue in the phpMyAdmin programming code, please
contact the <a class="reference external" href="mailto:security&#37;&#52;&#48;phpmyadmin&#46;net">phpMyAdmin security team</a> in
advance before publishing it. This way we can prepare a fix and release the fix together with your
announcement. You will be also given credit in our security announcement.
You can optionally encrypt your report with PGP key ID
<code class="docutils literal notranslate"><span class="pre">DA68AB39218AB947</span></code> with following fingerprint:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">pub 4096R/DA68AB39218AB947 2016-08-02</span>
<span class="go"> Key fingerprint = 5BAD 38CF B980 50B9 4BD7 FB5B DA68 AB39 218A B947</span>
<span class="go">uid phpMyAdmin Security Team &lt;security@phpmyadmin.net&gt;</span>
<span class="go">sub 4096R/5E4176FB497A31F7 2016-08-02</span>
</pre></div>
</div>
<p>The key can be either obtained from the keyserver or is available in
<a class="reference external" href="https://files.phpmyadmin.net/phpmyadmin.keyring">phpMyAdmin keyring</a>
available on our download server or using <a class="reference external" href="https://keybase.io/phpmyadmin_sec">Keybase</a>.</p>
<p>Should you have suggestion on improving phpMyAdmin to make it more secure, please
report that to our <a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/issues">issue tracker</a>.
Existing improvement suggestions can be found by
<a class="reference external" href="https://github.com/phpmyadmin/phpmyadmin/labels/hardening">hardening label</a>.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Security policy</a><ul>
<li><a class="reference internal" href="#typical-vulnerabilities">Typical vulnerabilities</a><ul>
<li><a class="reference internal" href="#cross-site-scripting-xss">Cross-site scripting (XSS)</a></li>
<li><a class="reference internal" href="#cross-site-request-forgery-csrf">Cross-site request forgery (CSRF)</a></li>
<li><a class="reference internal" href="#sql-injection">SQL injection</a></li>
<li><a class="reference internal" href="#brute-force-attack">Brute force attack</a></li>
</ul>
</li>
<li><a class="reference internal" href="#reporting-security-issues">Reporting security issues</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="developers.html"
title="previous chapter">Developers Information</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="vendors.html"
title="next chapter">Distributing and packaging phpMyAdmin</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/security.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="vendors.html" title="Distributing and packaging phpMyAdmin"
>next</a> |</li>
<li class="right" >
<a href="developers.html" title="Developers Information"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Security policy</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

128
pma/doc/html/settings.html Normal file
View File

@@ -0,0 +1,128 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Configuring phpMyAdmin &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Two-factor authentication" href="two_factor.html" />
<link rel="prev" title="User Guide" href="user.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="two_factor.html" title="Two-factor authentication"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="user.html" title="User Guide"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Configuring phpMyAdmin</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="configuring-phpmyadmin">
<h1>Configuring phpMyAdmin<a class="headerlink" href="#configuring-phpmyadmin" title="Permalink to this heading"></a></h1>
<p>There are many configuration settings that can be used to customize the
interface. Those settings are described in
<a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a>. There are several layers of the configuration.</p>
<p>The global settings can be configured in <code class="file docutils literal notranslate"><span class="pre">config.inc.php</span></code> as described in
<a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a>. This is only way to configure connections to databases and other
system wide settings.</p>
<p>On top of this there are user settings which can be persistently stored in
<a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>, possibly automatically configured through
<a class="reference internal" href="setup.html#zeroconf"><span class="std std-ref">Zero configuration</span></a>. If the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> are not configured, the settings
are temporarily stored in the session data; these are valid only until you
logout.</p>
<p>You can also save the user configuration for further use, either download them
as a file or to the browser local storage. You can find both those options in
the <span class="guilabel">Settings</span> tab. The settings stored in browser local storage will
be automatically offered for loading upon your login to phpMyAdmin.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="user.html"
title="previous chapter">User Guide</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="two_factor.html"
title="next chapter">Two-factor authentication</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/settings.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="two_factor.html" title="Two-factor authentication"
>next</a> |</li>
<li class="right" >
<a href="user.html" title="User Guide"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Configuring phpMyAdmin</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

1757
pma/doc/html/setup.html Normal file

File diff suppressed because it is too large Load Diff

224
pma/doc/html/themes.html Normal file
View File

@@ -0,0 +1,224 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Custom Themes &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Other sources of information" href="other.html" />
<link rel="prev" title="Import and export" href="import_export.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="other.html" title="Other sources of information"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="import_export.html" title="Import and export"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Custom Themes</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="custom-themes">
<span id="themes"></span><h1>Custom Themes<a class="headerlink" href="#custom-themes" title="Permalink to this heading"></a></h1>
<p>phpMyAdmin comes with support for third party themes. You can download
additional themes from our website at &lt;<a class="reference external" href="https://www.phpmyadmin.net/themes/">https://www.phpmyadmin.net/themes/</a>&gt;.</p>
<section id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this heading"></a></h2>
<p>Themes are configured with <span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_ThemeManager"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['ThemeManager']</span></code></a> and
<span class="target" id="index-1"></span><a class="reference internal" href="config.html#cfg_ThemeDefault"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['ThemeDefault']</span></code></a>. Under <code class="file docutils literal notranslate"><span class="pre">./themes/</span></code>, you should not
delete the directory <code class="docutils literal notranslate"><span class="pre">pmahomme</span></code> or its underlying structure, because this is
the system theme used by phpMyAdmin. <code class="docutils literal notranslate"><span class="pre">pmahomme</span></code> contains all images and
styles, for backwards compatibility and for all themes that would not include
images or css-files. If <span class="target" id="index-2"></span><a class="reference internal" href="config.html#cfg_ThemeManager"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['ThemeManager']</span></code></a> is enabled, you
can select your favorite theme on the main page. Your selected theme will be
stored in a cookie.</p>
</section>
<section id="creating-custom-theme">
<h2>Creating custom theme<a class="headerlink" href="#creating-custom-theme" title="Permalink to this heading"></a></h2>
<p>To create a theme:</p>
<ul class="simple">
<li><p>make a new subdirectory (for example “your_theme_name”) under <code class="file docutils literal notranslate"><span class="pre">./themes/</span></code>.</p></li>
<li><p>copy the files and directories from <code class="docutils literal notranslate"><span class="pre">pmahomme</span></code> to “your_theme_name”</p></li>
<li><p>edit the css-files in “your_theme_name/css”</p></li>
<li><p>put your new images in “your_theme_name/img”</p></li>
<li><p>edit <code class="file docutils literal notranslate"><span class="pre">_variables.scss</span></code> in “your_theme_name/scss”</p></li>
<li><p>edit <code class="file docutils literal notranslate"><span class="pre">theme.json</span></code> in “your_theme_name” to contain theme metadata (see below)</p></li>
<li><p>make a new screenshot of your theme and save it under
“your_theme_name/screen.png”</p></li>
</ul>
<section id="theme-metadata">
<h3>Theme metadata<a class="headerlink" href="#theme-metadata" title="Permalink to this heading"></a></h3>
<div class="versionchanged">
<p><span class="versionmodified changed">Changed in version 4.8.0: </span>Before 4.8.0 the theme metadata was passed in the <code class="file docutils literal notranslate"><span class="pre">info.inc.php</span></code> file.
It has been replaced by <code class="file docutils literal notranslate"><span class="pre">theme.json</span></code> to allow easier parsing (without
need to handle PHP code) and to support additional features.</p>
</div>
<p>In theme directory there is file <code class="file docutils literal notranslate"><span class="pre">theme.json</span></code> which contains theme
metadata. Currently it consists of:</p>
<dl class="describe">
<dt class="sig sig-object">
<span class="sig-name descname"><span class="pre">name</span></span></dt>
<dd><p>Display name of the theme.</p>
<p><strong>This field is required.</strong></p>
</dd></dl>
<dl class="describe">
<dt class="sig sig-object">
<span class="sig-name descname"><span class="pre">version</span></span></dt>
<dd><p>Theme version, can be quite arbitrary and does not have to match phpMyAdmin version.</p>
<p><strong>This field is required.</strong></p>
</dd></dl>
<dl class="describe">
<dt class="sig sig-object">
<span class="sig-name descname"><span class="pre">description</span></span></dt>
<dd><p>Theme description. this will be shown on the website.</p>
<p><strong>This field is required.</strong></p>
</dd></dl>
<dl class="describe">
<dt class="sig sig-object">
<span class="sig-name descname"><span class="pre">author</span></span></dt>
<dd><p>Theme author name.</p>
<p><strong>This field is required.</strong></p>
</dd></dl>
<dl class="describe">
<dt class="sig sig-object">
<span class="sig-name descname"><span class="pre">url</span></span></dt>
<dd><p>Link to theme author website. Its good idea to have way for getting
support there.</p>
</dd></dl>
<dl class="describe">
<dt class="sig sig-object">
<span class="sig-name descname"><span class="pre">supports</span></span></dt>
<dd><p>Array of supported phpMyAdmin major versions.</p>
<p><strong>This field is required.</strong></p>
</dd></dl>
<p>For example, the definition for Original theme shipped with phpMyAdmin 4.8:</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Original&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;version&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;4.8&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;Original phpMyAdmin theme&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;author&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;phpMyAdmin developers&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;url&quot;</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;https://www.phpmyadmin.net/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;supports&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;4.8&quot;</span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
</section>
<section id="sharing-images">
<h3>Sharing images<a class="headerlink" href="#sharing-images" title="Permalink to this heading"></a></h3>
<p>If you do not want to use your own symbols and buttons, remove the
directory “img” in “your_theme_name”. phpMyAdmin will use the
default icons and buttons (from the system-theme <code class="docutils literal notranslate"><span class="pre">pmahomme</span></code>).</p>
</section>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Custom Themes</a><ul>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
<li><a class="reference internal" href="#creating-custom-theme">Creating custom theme</a><ul>
<li><a class="reference internal" href="#theme-metadata">Theme metadata</a></li>
<li><a class="reference internal" href="#sharing-images">Sharing images</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="import_export.html"
title="previous chapter">Import and export</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="other.html"
title="next chapter">Other sources of information</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/themes.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="other.html" title="Other sources of information"
>next</a> |</li>
<li class="right" >
<a href="import_export.html" title="Import and export"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Custom Themes</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

View File

@@ -0,0 +1,260 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Transformations &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Bookmarks" href="bookmarks.html" />
<link rel="prev" title="Two-factor authentication" href="two_factor.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="bookmarks.html" title="Bookmarks"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="two_factor.html" title="Two-factor authentication"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Transformations</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="transformations">
<span id="id1"></span><h1>Transformations<a class="headerlink" href="#transformations" title="Permalink to this heading"></a></h1>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You need to have configured the <a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a> to use the transformations
feature.</p>
</div>
<section id="introduction">
<span id="transformationsintro"></span><h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this heading"></a></h2>
<p>To enable transformations, you have to set up the <code class="docutils literal notranslate"><span class="pre">column_info</span></code>
table and the proper directives. Please see the <a class="reference internal" href="config.html#config"><span class="std std-ref">Configuration</span></a> on how to do so.</p>
<p>phpMyAdmin has two different types of transformations: browser display
transformations, which affect only how the data is shown when browsing
through phpMyAdmin; and input transformations, which affect a value
prior to being inserted through phpMyAdmin.
You can apply different transformations to the contents of each
column. Each transformation has options to define how it will affect the
stored data.</p>
<p>Say you have a column <code class="docutils literal notranslate"><span class="pre">filename</span></code> which contains a filename. Normally
you would see in phpMyAdmin only this filename. Using display transformations
you can transform that filename into a HTML link, so you can click
inside of the phpMyAdmin structure on the columns link and will see
the file displayed in a new browser window. Using transformation
options you can also specify strings to append/prepend to a string or
the format you want the output stored in.</p>
<p>For a general overview of all available transformations and their
options, you can either go to the <code class="docutils literal notranslate"><span class="pre">Change</span></code> link for an existing column
or from the dialog to create a new column, in either case there is a link
on that column structure page for “Browser display transformation” and
“Input transformation” which will show more information about each
transformation that is available on your system.</p>
<p>For a tutorial on how to effectively use transformations, see our
<a class="reference external" href="https://www.phpmyadmin.net/docs/">Link section</a> on the
official phpMyAdmin homepage.</p>
</section>
<section id="usage">
<span id="transformationshowto"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this heading"></a></h2>
<p>Go to the table structure page (reached by clicking on
the Structure link for a table). There click on “Change” (or the change
icon) and there you will see the five transformationrelated fields at the end of the line.
They are called <a class="reference internal" href="glossary.html#term-Media-type"><span class="xref std std-term">Media type</span></a>, Browser transformation and
Transformation options.</p>
<ul class="simple">
<li><p>The field <a class="reference internal" href="glossary.html#term-Media-type"><span class="xref std std-term">Media type</span></a> is a drop-down field. Select the <a class="reference internal" href="glossary.html#term-Media-type"><span class="xref std std-term">Media type</span></a> that
corresponds to the columns contents. Please note that many transformations
are inactive until a <a class="reference internal" href="glossary.html#term-Media-type"><span class="xref std std-term">Media type</span></a> is selected.</p></li>
<li><p>The field Browser display transformation is a drop-down field. You can
choose from a hopefully growing amount of pre-defined transformations.
See below for information on how to build your own transformation.
There are global transformations and mimetype-bound transformations.
Global transformations can be used for any mimetype. They will take
the mimetype, if necessary, into regard. Mimetype-bound
transformations usually only operate on a certain mimetype. There are
transformations which operate on the main mimetype (like image),
which will most likely take the subtype into regard, and those who
only operate on a specific subtype (like image/jpeg). You can use
transformations on mimetypes for which the function was not defined
for. There is no security check for you selected the right
transformation, so take care of what the output will be like.</p></li>
<li><p>The field Browser display transformation options is a free-type textfield. You have
to enter transform-function specific options here. Usually the
transforms can operate with default options, but it is generally a
good idea to look up the overview to see which options are necessary.
Much like the ENUM/SET-Fields, you have to split up several options
using the format a,b,c,…(NOTE THE MISSING BLANKS). This is
because internally the options will be parsed as an array, leaving the
first value the first element in the array, and so forth. If you want
to specify a MIME character set you can define it in the
transformation_options. You have to put that outside of the pre-
defined options of the specific mime-transform, as the last value of
the set. Use the format “’; charset=XXX”. If you use a transform, for
which you can specify 2 options and you want to append a character
set, enter “first parameter,second parameter,charset=us-ascii”.
You can, however use the defaults for the parameters: “’’,,charset
=us-ascii”. The default options can be configured using
<span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_DefaultTransformations"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['DefaultTransformations']</span></code></a>.</p></li>
<li><p>Input transformation is another drop-down menu that corresponds exactly
with the instructions above for “Browser display transformation” except
these these affect the data before insertion in to the database. These are
most commonly used to either provide a specialized editor (for example, using
the phpMyAdmin SQL editor interface) or selector (such as for uploading an image).
Its also possible to manipulate the data such as converting an IPv4 address to binary
or parsing it through a regular expression.</p></li>
<li><p>Finally, Input transformation options is the equivalent of the “Browser display
transformation options” section above and is where optional and required parameters are entered.</p></li>
</ul>
</section>
<section id="file-structure">
<span id="transformationsfiles"></span><h2>File structure<a class="headerlink" href="#file-structure" title="Permalink to this heading"></a></h2>
<p>All specific transformations for mimetypes are defined through class
files in the directory <code class="file docutils literal notranslate"><span class="pre">libraries/classes/Plugins/Transformations/</span></code>. Each of
them extends a certain transformation abstract class declared in
<code class="file docutils literal notranslate"><span class="pre">libraries/classes/Plugins/Transformations/Abs</span></code>.</p>
<p>They are stored in files to ease customization and to allow easy adding of
new or custom transformations.</p>
<p>Because the user cannot enter their own mimetypes, it is kept certain that
the transformations will always work. It makes no sense to apply a
transformation to a mimetype the transform-function doesnt know to
handle.</p>
<p>There is a file called <code class="file docutils literal notranslate"><span class="pre">libraries/classes/Plugins/Transformations.php</span></code> that provides some
basic functions which can be included by any other transform function.</p>
<p>The file name convention is <code class="docutils literal notranslate"><span class="pre">[Mimetype]_[Subtype]_[Transformation</span>
<span class="pre">Name].php</span></code>, while the abstract class that it extends has the
name <code class="docutils literal notranslate"><span class="pre">[Transformation</span> <span class="pre">Name]TransformationsPlugin</span></code>. All of the
methods that have to be implemented by a transformations plug-in are:</p>
<ol class="arabic simple">
<li><p>getMIMEType() and getMIMESubtype() in the main class;</p></li>
<li><p>getName(), getInfo() and applyTransformation() in the abstract class
it extends.</p></li>
</ol>
<p>The getMIMEType(), getMIMESubtype() and getName() methods return the
name of the MIME type, MIME Subtype and transformation accordingly.
getInfo() returns the transformations description and possible
options it may receive and applyTransformation() is the method that
does the actual work of the transformation plug-in.</p>
<p>Please see the <code class="file docutils literal notranslate"><span class="pre">libraries/classes/Plugins/Transformations/TEMPLATE</span></code> and
<code class="file docutils literal notranslate"><span class="pre">libraries/classes/Plugins/Transformations/TEMPLATE_ABSTRACT</span></code> files for adding
your own transformation plug-in. You can also generate a new
transformation plug-in (with or without the abstract transformation
class), by using
<code class="file docutils literal notranslate"><span class="pre">scripts/transformations_generator_plugin.sh</span></code> or
<code class="file docutils literal notranslate"><span class="pre">scripts/transformations_generator_main_class.sh</span></code>.</p>
<p>The applyTransformation() method always gets passed three variables:</p>
<ol class="arabic simple">
<li><p><strong>$buffer</strong> - Contains the text inside of the column. This is the
text, you want to transform.</p></li>
<li><p><strong>$options</strong> - Contains any user-passed options to a transform
function as an array.</p></li>
<li><p><strong>$meta</strong> - Contains an object with information about your column. The
data is drawn from the output of the <a class="reference external" href="https://www.php.net/mysql_fetch_field">mysql_fetch_field()</a> function. This means, all
object properties described on the <a class="reference external" href="https://www.php.net/mysql_fetch_field">manual page</a> are available in this
variable and can be used to transform a column accordingly to
unsigned/zerofill/not_null/… properties. The $meta-&gt;mimetype
variable contains the original <a class="reference internal" href="glossary.html#term-Media-type"><span class="xref std std-term">Media type</span></a> of the column (i.e.
text/plain, image/jpeg etc.)</p></li>
</ol>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Transformations</a><ul>
<li><a class="reference internal" href="#introduction">Introduction</a></li>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#file-structure">File structure</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="two_factor.html"
title="previous chapter">Two-factor authentication</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="bookmarks.html"
title="next chapter">Bookmarks</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/transformations.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="bookmarks.html" title="Bookmarks"
>next</a> |</li>
<li class="right" >
<a href="two_factor.html" title="Two-factor authentication"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Transformations</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

View File

@@ -0,0 +1,180 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Two-factor authentication &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Transformations" href="transformations.html" />
<link rel="prev" title="Configuring phpMyAdmin" href="settings.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="transformations.html" title="Transformations"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="settings.html" title="Configuring phpMyAdmin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" accesskey="U">User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Two-factor authentication</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="two-factor-authentication">
<span id="fa"></span><h1>Two-factor authentication<a class="headerlink" href="#two-factor-authentication" title="Permalink to this heading"></a></h1>
<div class="versionadded">
<p><span class="versionmodified added">New in version 4.8.0.</span></p>
</div>
<p>Since phpMyAdmin 4.8.0 you can configure two-factor authentication to be
used when logging in. To use this, you first need to configure the
<a class="reference internal" href="setup.html#linked-tables"><span class="std std-ref">phpMyAdmin configuration storage</span></a>. Once this is done, every user can opt-in for the second
authentication factor in the <span class="guilabel">Settings</span>.</p>
<p>When running phpMyAdmin from the Git source repository, the dependencies must be installed
manually; the typical way of doing so is with the command:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer<span class="w"> </span>require<span class="w"> </span>pragmarx/google2fa-qrcode<span class="w"> </span>bacon/bacon-qr-code
</pre></div>
</div>
<p>Or when using a hardware security key with FIDO U2F:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>composer<span class="w"> </span>require<span class="w"> </span>code-lts/u2f-php-server
</pre></div>
</div>
<section id="authentication-application-2fa">
<h2>Authentication Application (2FA)<a class="headerlink" href="#authentication-application-2fa" title="Permalink to this heading"></a></h2>
<p>Using an application for authentication is a quite common approach based on HOTP and
<a class="reference external" href="https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm">TOTP</a>.
It is based on transmitting a private key from phpMyAdmin to the authentication
application and the application is then able to generate one time codes based
on this key. The easiest way to enter the key in to the application from phpMyAdmin is
through scanning a QR code.</p>
<p>There are dozens of applications available for mobile phones to implement these
standards, the most widely used include:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://freeotp.github.io/">FreeOTP for iOS, Android and Pebble</a></p></li>
<li><p><a class="reference external" href="https://authy.com/">Authy for iOS, Android, Chrome, OS X</a></p></li>
<li><p><a class="reference external" href="https://apps.apple.com/us/app/google-authenticator/id388497605">Google Authenticator for iOS</a></p></li>
<li><p><a class="reference external" href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2">Google Authenticator for Android</a></p></li>
<li><p><a class="reference external" href="https://lastpass.com/auth/">LastPass Authenticator for iOS, Android, OS X, Windows</a></p></li>
</ul>
</section>
<section id="hardware-security-key-fido-u2f">
<h2>Hardware Security Key (FIDO U2F)<a class="headerlink" href="#hardware-security-key-fido-u2f" title="Permalink to this heading"></a></h2>
<p>Using hardware tokens is considered to be more secure than a software based
solution. phpMyAdmin supports <a class="reference external" href="https://en.wikipedia.org/wiki/Universal_2nd_Factor">FIDO U2F</a>
tokens.</p>
<p>There are several manufacturers of these tokens, for example:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.yubico.com/fido-u2f/">youbico FIDO U2F Security Key</a></p></li>
<li><p><a class="reference external" href="https://www.hypersecu.com/hyperfido">HyperFIDO</a></p></li>
<li><p><a class="reference external" href="https://trezor.io/?offer_id=12&amp;aff_id=1592&amp;source=phpmyadmin">Trezor Hardware Wallet</a> can act as an <a class="reference external" href="https://trezor.io/learn/a/what-is-u2f">U2F token</a></p></li>
<li><p><a class="reference external" href="https://www.dongleauth.com/dongles/">List of Two Factor Auth (2FA) Dongles</a></p></li>
</ul>
</section>
<section id="simple-two-factor-authentication">
<span id="simple2fa"></span><h2>Simple two-factor authentication<a class="headerlink" href="#simple-two-factor-authentication" title="Permalink to this heading"></a></h2>
<p>This authentication is included for testing and demonstration purposes only as
it really does not provide two-factor authentication, it just asks the user to confirm login by
clicking on the button.</p>
<p>It should not be used in the production and is disabled unless
<span class="target" id="index-0"></span><a class="reference internal" href="config.html#cfg_DBG_simple2fa"><code class="xref config config-option docutils literal notranslate"><span class="pre">$cfg['DBG']['simple2fa']</span></code></a> is set.</p>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Two-factor authentication</a><ul>
<li><a class="reference internal" href="#authentication-application-2fa">Authentication Application (2FA)</a></li>
<li><a class="reference internal" href="#hardware-security-key-fido-u2f">Hardware Security Key (FIDO U2F)</a></li>
<li><a class="reference internal" href="#simple-two-factor-authentication">Simple two-factor authentication</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="settings.html"
title="previous chapter">Configuring phpMyAdmin</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="transformations.html"
title="next chapter">Transformations</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/two_factor.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="transformations.html" title="Transformations"
>next</a> |</li>
<li class="right" >
<a href="settings.html" title="Configuring phpMyAdmin"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="user.html" >User Guide</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Two-factor authentication</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

168
pma/doc/html/user.html Normal file
View File

@@ -0,0 +1,168 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>User Guide &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Configuring phpMyAdmin" href="settings.html" />
<link rel="prev" title="Configuration" href="config.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="settings.html" title="Configuring phpMyAdmin"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="config.html" title="Configuration"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">User Guide</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="user-guide">
<h1>User Guide<a class="headerlink" href="#user-guide" title="Permalink to this heading"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="settings.html">Configuring phpMyAdmin</a></li>
<li class="toctree-l1"><a class="reference internal" href="two_factor.html">Two-factor authentication</a><ul>
<li class="toctree-l2"><a class="reference internal" href="two_factor.html#authentication-application-2fa">Authentication Application (2FA)</a></li>
<li class="toctree-l2"><a class="reference internal" href="two_factor.html#hardware-security-key-fido-u2f">Hardware Security Key (FIDO U2F)</a></li>
<li class="toctree-l2"><a class="reference internal" href="two_factor.html#simple-two-factor-authentication">Simple two-factor authentication</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="transformations.html">Transformations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="transformations.html#introduction">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="transformations.html#usage">Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="transformations.html#file-structure">File structure</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="bookmarks.html">Bookmarks</a><ul>
<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#storing-bookmarks">Storing bookmarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#variables-inside-bookmarks">Variables inside bookmarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="bookmarks.html#browsing-a-table-using-a-bookmark">Browsing a table using a bookmark</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="privileges.html">User management</a><ul>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#creating-a-new-user">Creating a new user</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#editing-an-existing-user">Editing an existing user</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#deleting-a-user">Deleting a user</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#assigning-privileges-to-user-for-a-specific-database">Assigning privileges to user for a specific database</a></li>
<li class="toctree-l2"><a class="reference internal" href="privileges.html#configurable-menus-and-user-groups">Configurable menus and user groups</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="relations.html">Relations</a><ul>
<li class="toctree-l2"><a class="reference internal" href="relations.html#technical-info">Technical info</a></li>
<li class="toctree-l2"><a class="reference internal" href="relations.html#relation-view">Relation view</a></li>
<li class="toctree-l2"><a class="reference internal" href="relations.html#designer">Designer</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="charts.html">Charts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="charts.html#chart-implementation">Chart implementation</a></li>
<li class="toctree-l2"><a class="reference internal" href="charts.html#examples">Examples</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="import_export.html">Import and export</a><ul>
<li class="toctree-l2"><a class="reference internal" href="import_export.html#import">Import</a></li>
<li class="toctree-l2"><a class="reference internal" href="import_export.html#export">Export</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="themes.html">Custom Themes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="themes.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="themes.html#creating-custom-theme">Creating custom theme</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="other.html">Other sources of information</a><ul>
<li class="toctree-l2"><a class="reference internal" href="other.html#printed-book">Printed Book</a></li>
<li class="toctree-l2"><a class="reference internal" href="other.html#tutorials">Tutorials</a></li>
</ul>
</li>
</ul>
</div>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="config.html"
title="previous chapter">Configuration</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="settings.html"
title="next chapter">Configuring phpMyAdmin</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/user.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="settings.html" title="Configuring phpMyAdmin"
>next</a> |</li>
<li class="right" >
<a href="config.html" title="Configuration"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">User Guide</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

167
pma/doc/html/vendors.html Normal file
View File

@@ -0,0 +1,167 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>Distributing and packaging phpMyAdmin &#8212; phpMyAdmin 5.2.2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="copyright" title="Copyright" href="copyright.html" />
<link rel="next" title="Copyright" href="copyright.html" />
<link rel="prev" title="Security policy" href="security.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="copyright.html" title="Copyright"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="security.html" title="Security policy"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Distributing and packaging phpMyAdmin</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="distributing-and-packaging-phpmyadmin">
<h1>Distributing and packaging phpMyAdmin<a class="headerlink" href="#distributing-and-packaging-phpmyadmin" title="Permalink to this heading"></a></h1>
<p>This document is intended to give pieces of advice to people who want to
redistribute phpMyAdmin inside other software packages such as Linux
distribution or some all in one package including web server and MySQL
server.</p>
<p>Generally, you can customize some basic aspects (paths to some files and
behavior) in <code class="file docutils literal notranslate"><span class="pre">libraries/vendor_config.php</span></code>.</p>
<p>For example, if you want setup script to generate a config file in var, change
<code class="docutils literal notranslate"><span class="pre">SETUP_CONFIG_FILE</span></code> to <code class="file docutils literal notranslate"><span class="pre">/var/lib/phpmyadmin/config.inc.php</span></code> and you
will also probably want to skip directory writable check, so set
<code class="docutils literal notranslate"><span class="pre">SETUP_DIR_WRITABLE</span></code> to false.</p>
<section id="external-libraries">
<h2>External libraries<a class="headerlink" href="#external-libraries" title="Permalink to this heading"></a></h2>
<p>phpMyAdmin includes several external libraries, you might want to
replace them with system ones if they are available, but please note
that you should test whether the version you provide is compatible with the
one we ship.</p>
<p>Currently known list of external libraries:</p>
<dl class="simple">
<dt>js/vendor</dt><dd><p>jQuery js framework libraries and various js libraries.</p>
</dd>
<dt>vendor/</dt><dd><p>The download kit includes various Composer packages as
dependencies.</p>
</dd>
</dl>
</section>
<section id="specific-files-licenses">
<h2>Specific files LICENSES<a class="headerlink" href="#specific-files-licenses" title="Permalink to this heading"></a></h2>
<p>phpMyAdmin distributed themes contain some content that is under licenses.</p>
<ul class="simple">
<li><p>The icons of the <cite>Original</cite> and <cite>pmahomme</cite> themes are from the <a class="reference external" href="https://web.archive.org/web/20221201060206/http://www.famfamfam.com/lab/icons/silk/">Silk Icons</a>.</p></li>
<li><p>Some icons of the <cite>Metro</cite> theme are from the <a class="reference external" href="https://web.archive.org/web/20221201060206/http://www.famfamfam.com/lab/icons/silk/">Silk Icons</a>.</p></li>
<li><p><cite>themes/*/img/b_rename.svg</cite> Is a <a class="reference external" href="https://thenounproject.com/Icons8/">Icons8</a>, icon from the <a class="reference external" href="https://thenounproject.com/Icons8/collection/android-l-icon-pack/">Android L Icon Pack Collection</a>. The icon <a class="reference external" href="https://thenounproject.com/term/rename/61456/">rename</a>.</p></li>
<li><p><cite>themes/metro/img/user.svg</cite> Is a IcoMoon the <a class="reference external" href="https://github.com/Keyamoon/IcoMoon-Free/blob/master/SVG/114-user.svg">user</a></p></li>
</ul>
<p>CC BY 4.0 or GPL</p>
</section>
<section id="licenses-for-vendors">
<h2>Licenses for vendors<a class="headerlink" href="#licenses-for-vendors" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>Silk Icons are under the <a class="reference external" href="https://web.archive.org/web/20221201060206/http://www.famfamfam.com/lab/icons/silk/">CC BY 2.5 or CC BY 3.0</a> licenses.</p></li>
<li><p><cite>rename</cite> from <cite>Icons8</cite> is under the <a class="reference external" href="https://creativecommons.org/publicdomain/zero/1.0/">“public domain”</a> (CC0 1.0) license.</p></li>
<li><p>IcoMoon Free is under <a class="reference external" href="https://github.com/Keyamoon/IcoMoon-Free/blob/master/License.txt">“CC BY 4.0 or GPL”</a>.</p></li>
</ul>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Distributing and packaging phpMyAdmin</a><ul>
<li><a class="reference internal" href="#external-libraries">External libraries</a></li>
<li><a class="reference internal" href="#specific-files-licenses">Specific files LICENSES</a></li>
<li><a class="reference internal" href="#licenses-for-vendors">Licenses for vendors</a></li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="security.html"
title="previous chapter">Security policy</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="copyright.html"
title="next chapter">Copyright</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/vendors.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="copyright.html" title="Copyright"
>next</a> |</li>
<li class="right" >
<a href="security.html" title="Security policy"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">phpMyAdmin 5.2.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Distributing and packaging phpMyAdmin</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; <a href="copyright.html">Copyright</a> 2012 - 2024, The phpMyAdmin devel team.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<?php
/**
* This example configuration shows how to configure phpMyAdmin for
* many hosts that all have identical configuration otherwise. To add
* a new host, just drop it into $hosts below. Contributed by
* Matthew Hawkins.
*/
declare(strict_types=1);
$i = 0;
$hosts = [
'foo.example.com',
'bar.example.com',
'baz.example.com',
'quux.example.com',
];
foreach ($hosts as $host) {
$i++;
$cfg['Servers'][$i]['host'] = $host;
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['only_db'] = '';
$cfg['Servers'][$i]['verbose'] = '';
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
}

171
pma/examples/openid.php Normal file
View File

@@ -0,0 +1,171 @@
<?php
/**
* Single signon for phpMyAdmin using OpenID
*
* This is just example how to use single signon with phpMyAdmin, it is
* not intended to be perfect code and look, only shows how you can
* integrate this functionality in your application.
*
* It uses OpenID pear package, see https://pear.php.net/package/OpenID
*
* User first authenticates using OpenID and based on content of $AUTH_MAP
* the login information is passed to phpMyAdmin in session data.
*/
declare(strict_types=1);
if (false === @include_once 'OpenID/RelyingParty.php') {
exit;
}
/* Change this to true if using phpMyAdmin over https */
$secure_cookie = false;
/**
* Map of authenticated users to MySQL user/password pairs.
*/
$AUTH_MAP = [
'https://launchpad.net/~username' => [
'user' => 'root',
'password' => '',
],
];
// phpcs:disable PSR1.Files.SideEffects,Squiz.Functions.GlobalFunction
/**
* Simple function to show HTML page with given content.
*
* @param string $contents Content to include in page
*/
function Show_page($contents): void
{
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
echo '<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<meta charset="utf-8">
<title>phpMyAdmin OpenID signon example</title>
</head>
<body>';
if (isset($_SESSION['PMA_single_signon_error_message'])) {
echo '<p class="error">' . $_SESSION['PMA_single_signon_message'] . '</p>';
unset($_SESSION['PMA_single_signon_message']);
}
echo $contents;
echo '</body></html>';
}
/**
* Display error and exit
*
* @param Exception $e Exception object
*/
function Die_error($e): void
{
$contents = "<div class='relyingparty_results'>\n";
$contents .= '<pre>' . htmlspecialchars($e->getMessage()) . "</pre>\n";
$contents .= "</div class='relyingparty_results'>";
Show_page($contents);
exit;
}
// phpcs:enable
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', $secure_cookie, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);
@session_start();
// Determine realm and return_to
$base = 'http';
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') {
$base .= 's';
}
$base .= '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
$realm = $base . '/';
$returnTo = $base . dirname($_SERVER['PHP_SELF']);
if ($returnTo[strlen($returnTo) - 1] !== '/') {
$returnTo .= '/';
}
$returnTo .= 'openid.php';
/* Display form */
if ((! count($_GET) && ! count($_POST)) || isset($_GET['phpMyAdmin'])) {
/* Show simple form */
$content = '<form action="openid.php" method="post">
OpenID: <input type="text" name="identifier"><br>
<input type="submit" name="start">
</form>';
Show_page($content);
exit;
}
/* Grab identifier */
$identifier = null;
if (isset($_POST['identifier']) && is_string($_POST['identifier'])) {
$identifier = $_POST['identifier'];
} elseif (isset($_SESSION['identifier']) && is_string($_SESSION['identifier'])) {
$identifier = $_SESSION['identifier'];
}
/* Create OpenID object */
try {
$o = new OpenID_RelyingParty($returnTo, $realm, $identifier);
} catch (Throwable $e) {
Die_error($e);
}
/* Redirect to OpenID provider */
if (isset($_POST['start'])) {
try {
$authRequest = $o->prepare();
} catch (Throwable $e) {
Die_error($e);
}
$url = $authRequest->getAuthorizeURL();
header('Location: ' . $url);
exit;
}
/* Grab query string */
if (! count($_POST)) {
[, $queryString] = explode('?', $_SERVER['REQUEST_URI']);
} else {
// Fetch the raw query body
$queryString = file_get_contents('php://input');
}
/* Check reply */
try {
$message = new OpenID_Message($queryString, OpenID_Message::FORMAT_HTTP);
} catch (Throwable $e) {
Die_error($e);
}
$id = $message->get('openid.claimed_id');
if (empty($id) || ! isset($AUTH_MAP[$id])) {
Show_page('<p>User not allowed!</p>');
exit;
}
$_SESSION['PMA_single_signon_user'] = $AUTH_MAP[$id]['user'];
$_SESSION['PMA_single_signon_password'] = $AUTH_MAP[$id]['password'];
$_SESSION['PMA_single_signon_HMAC_secret'] = hash('sha1', uniqid(strval(random_int(0, mt_getrandmax())), true));
session_write_close();
/* Redirect to phpMyAdmin (should use absolute URL here!) */
header('Location: ../index.php');

View File

@@ -0,0 +1,38 @@
<?php
/**
* Single signon for phpMyAdmin
*
* This is just example how to use script based single signon with
* phpMyAdmin, it is not intended to be perfect code and look, only
* shows how you can integrate this functionality in your application.
*/
declare(strict_types=1);
// phpcs:disable Squiz.Functions.GlobalFunction
/**
* This function returns username and password.
*
* It can optionally use configured username as parameter.
*
* @param string $user User name
*
* @return array
*/
function get_login_credentials($user)
{
/* Optionally we can use passed username */
if (! empty($user)) {
return [
$user,
'password',
];
}
/* Here we would retrieve the credentials */
return [
'root',
'',
];
}

72
pma/examples/signon.php Normal file
View File

@@ -0,0 +1,72 @@
<?php
/**
* Single signon for phpMyAdmin
*
* This is just example how to use session based single signon with
* phpMyAdmin, it is not intended to be perfect code and look, only
* shows how you can integrate this functionality in your application.
*/
declare(strict_types=1);
/* Use cookies for session */
ini_set('session.use_cookies', 'true');
/* Change this to true if using phpMyAdmin over https */
$secure_cookie = false;
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', $secure_cookie, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);
// Uncomment and change the following line to match your $cfg['SessionSavePath']
//session_save_path('/foobar');
@session_start();
/* Was data posted? */
if (isset($_POST['user'])) {
/* Store there credentials */
$_SESSION['PMA_single_signon_user'] = $_POST['user'];
$_SESSION['PMA_single_signon_password'] = $_POST['password'];
$_SESSION['PMA_single_signon_host'] = $_POST['host'];
$_SESSION['PMA_single_signon_port'] = $_POST['port'];
/* Update another field of server configuration */
$_SESSION['PMA_single_signon_cfgupdate'] = ['verbose' => 'Signon test'];
$_SESSION['PMA_single_signon_HMAC_secret'] = hash('sha1', uniqid(strval(random_int(0, mt_getrandmax())), true));
$id = session_id();
/* Close that session */
@session_write_close();
/* Redirect to phpMyAdmin (should use absolute URL here!) */
header('Location: ../index.php');
} else {
/* Show simple form */
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
echo '<!DOCTYPE HTML>
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="../favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
<meta charset="utf-8">
<title>phpMyAdmin single signon example</title>
</head>
<body>';
if (isset($_SESSION['PMA_single_signon_error_message'])) {
echo '<p class="error">';
echo $_SESSION['PMA_single_signon_error_message'];
echo '</p>';
}
echo '<form action="signon.php" method="post">
Username: <input type="text" name="user" autocomplete="username" spellcheck="false"><br>
Password: <input type="password" name="password" autocomplete="current-password" spellcheck="false"><br>
Host: (will use the one from config.inc.php by default)
<input type="text" name="host"><br>
Port: (will use the one from config.inc.php by default)
<input type="text" name="port"><br>
<input type="submit">
</form>
</body>
</html>';
}

BIN
pma/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

43
pma/index.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
use PhpMyAdmin\Common;
use PhpMyAdmin\Routing;
if (! defined('ROOT_PATH')) {
// phpcs:disable PSR1.Files.SideEffects
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
// phpcs:enable
}
if (PHP_VERSION_ID < 70205) {
die('<p>PHP 7.2.5+ is required.</p><p>Currently installed version is: ' . PHP_VERSION . '</p>');
}
// phpcs:disable PSR1.Files.SideEffects
define('PHPMYADMIN', true);
// phpcs:enable
require_once ROOT_PATH . 'libraries/constants.php';
/**
* Activate autoloader
*/
if (! @is_readable(AUTOLOAD_FILE)) {
die(
'<p>File <samp>' . AUTOLOAD_FILE . '</samp> missing or not readable.</p>'
. '<p>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>.</p>'
);
}
require AUTOLOAD_FILE;
global $route, $containerBuilder, $request;
Common::run();
$dispatcher = Routing::getDispatcher();
Routing::callControllerForRoute($request, $route, $dispatcher, $containerBuilder);

View File

@@ -0,0 +1,22 @@
const path = require('path');
module.exports = {
entry: './js/src/ol.mjs',
devtool: 'source-map',
mode: 'production',
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
output: {
path: path.resolve('./js/vendor/openlayers'),
filename: 'OpenLayers.js',
library: 'ol',
libraryTarget: 'umd',
libraryExport: 'default',
},
optimization: {
minimize: false,
},
};

873
pma/js/dist/ajax.js vendored Normal file
View File

@@ -0,0 +1,873 @@
/**
* This object handles ajax requests for pages. It also
* handles the reloading of the main menu and scripts.
*
* @test-module AJAX
*/
var AJAX = {
/**
* @var {boolean} active Whether we are busy
*/
active: false,
/**
* @var {object} source The object whose event initialized the request
*/
source: null,
/**
* @var {object} xhr A reference to the ajax request that is currently running
*/
xhr: null,
/**
* @var {object} lockedTargets, list of locked targets
*/
lockedTargets: {},
// eslint-disable-next-line valid-jsdoc
/**
* @var {Function} callback Callback to execute after a successful request
* Used by CommonActions from common.js
*/
callback: function () {},
/**
* @var {boolean} debug Makes noise in your Firebug console
*/
debug: false,
/**
* @var {object} $msgbox A reference to a jQuery object that links to a message
* box that is generated by Functions.ajaxShowMessage()
*/
$msgbox: null,
/**
* Given the filename of a script, returns a hash to be
* used to refer to all the events registered for the file
*
* @param {string} key key The filename for which to get the event name
*
* @return {number}
*/
hash: function (key) {
var newKey = key;
/* https://burtleburtle.net/bob/hash/doobs.html#one */
newKey += '';
var len = newKey.length;
var hash = 0;
var i = 0;
for (; i < len; ++i) {
hash += newKey.charCodeAt(i);
hash += hash << 10;
hash ^= hash >> 6;
}
hash += hash << 3;
hash ^= hash >> 11;
hash += hash << 15;
return Math.abs(hash);
},
/**
* Registers an onload event for a file
*
* @param {string} file The filename for which to register the event
* @param {Function} func The function to execute when the page is ready
*
* @return {self} For chaining
*/
registerOnload: function (file, func) {
var eventName = 'onload_' + AJAX.hash(file);
$(document).on(eventName, func);
if (this.debug) {
// eslint-disable-next-line no-console
console.log(
// no need to translate
'Registered event ' + eventName + ' for file ' + file);
}
return this;
},
/**
* Registers a teardown event for a file. This is useful to execute functions
* that unbind events for page elements that are about to be removed.
*
* @param {string} file The filename for which to register the event
* @param {Function} func The function to execute when
* the page is about to be torn down
*
* @return {self} For chaining
*/
registerTeardown: function (file, func) {
var eventName = 'teardown_' + AJAX.hash(file);
$(document).on(eventName, func);
if (this.debug) {
// eslint-disable-next-line no-console
console.log(
// no need to translate
'Registered event ' + eventName + ' for file ' + file);
}
return this;
},
/**
* Called when a page has finished loading, once for every
* file that registered to the onload event of that file.
*
* @param {string} file The filename for which to fire the event
*
* @return {void}
*/
fireOnload: function (file) {
var eventName = 'onload_' + AJAX.hash(file);
$(document).trigger(eventName);
if (this.debug) {
// eslint-disable-next-line no-console
console.log(
// no need to translate
'Fired event ' + eventName + ' for file ' + file);
}
},
/**
* Called just before a page is torn down, once for every
* file that registered to the teardown event of that file.
*
* @param {string} file The filename for which to fire the event
*
* @return {void}
*/
fireTeardown: function (file) {
var eventName = 'teardown_' + AJAX.hash(file);
$(document).triggerHandler(eventName);
if (this.debug) {
// eslint-disable-next-line no-console
console.log(
// no need to translate
'Fired event ' + eventName + ' for file ' + file);
}
},
/**
* function to handle lock page mechanism
*
* @param event the event object
*
* @return {void}
*/
lockPageHandler: function (event) {
// don't consider checkbox event
if (typeof event.target !== 'undefined') {
if (event.target.type === 'checkbox') {
return;
}
}
var newHash = null;
var oldHash = null;
var lockId;
// CodeMirror lock
if (event.data.value === 3) {
newHash = event.data.content;
oldHash = true;
lockId = 'cm';
} else {
// Don't lock on enter.
if (0 === event.charCode) {
return;
}
lockId = $(this).data('lock-id');
if (typeof lockId === 'undefined') {
return;
}
/*
* @todo Fix Code mirror does not give correct full value (query)
* in textarea, it returns only the change in content.
*/
if (event.data.value === 1) {
newHash = AJAX.hash($(this).val());
} else {
newHash = AJAX.hash($(this).is(':checked'));
}
oldHash = $(this).data('val-hash');
}
// Set lock if old value !== new value
// otherwise release lock
if (oldHash !== newHash) {
AJAX.lockedTargets[lockId] = true;
} else {
delete AJAX.lockedTargets[lockId];
}
// Show lock icon if locked targets is not empty.
// otherwise remove lock icon
if (!jQuery.isEmptyObject(AJAX.lockedTargets)) {
$('#lock_page_icon').html(Functions.getImage('s_lock', Messages.strLockToolTip).toString());
} else {
$('#lock_page_icon').html('');
}
},
/**
* resets the lock
*
* @return {void}
*/
resetLock: function () {
AJAX.lockedTargets = {};
$('#lock_page_icon').html('');
},
handleMenu: {
replace: function (content) {
$('#floating_menubar').html(content)
// Remove duplicate wrapper
// TODO: don't send it in the response
.children().first().remove();
$('#topmenu').menuResizer(Functions.mainMenuResizerCallback);
}
},
/**
* Event handler for clicks on links and form submissions
*
* @param {KeyboardEvent} event Event data
*
* @return {boolean | void}
*/
requestHandler: function (event) {
// In some cases we don't want to handle the request here and either
// leave the browser deal with it natively (e.g: file download)
// or leave an existing ajax event handler present elsewhere deal with it
var href = $(this).attr('href');
if (typeof event !== 'undefined' && (event.shiftKey || event.ctrlKey || event.metaKey)) {
return true;
} else if ($(this).attr('target')) {
return true;
} else if ($(this).hasClass('ajax') || $(this).hasClass('disableAjax')) {
// reset the lockedTargets object, as specified AJAX operation has finished
AJAX.resetLock();
return true;
} else if (href && href.match(/^#/)) {
return true;
} else if (href && href.match(/^mailto/)) {
return true;
} else if ($(this).hasClass('ui-datepicker-next') || $(this).hasClass('ui-datepicker-prev')) {
return true;
}
if (typeof event !== 'undefined') {
event.preventDefault();
event.stopImmediatePropagation();
}
// triggers a confirm dialog if:
// the user has performed some operations on loaded page
// the user clicks on some link, (won't trigger for buttons)
// the click event is not triggered by script
if (typeof event !== 'undefined' && event.type === 'click' && event.isTrigger !== true && !jQuery.isEmptyObject(AJAX.lockedTargets) && confirm(Messages.strConfirmNavigation) === false) {
return false;
}
AJAX.resetLock();
var isLink = !!href || false;
var previousLinkAborted = false;
if (AJAX.active === true) {
// Cancel the old request if abortable, when the user requests
// something else. Otherwise silently bail out, as there is already
// a request well in progress.
if (AJAX.xhr) {
// In case of a link request, attempt aborting
AJAX.xhr.abort();
if (AJAX.xhr.status === 0 && AJAX.xhr.statusText === 'abort') {
// If aborted
AJAX.$msgbox = Functions.ajaxShowMessage(Messages.strAbortedRequest);
AJAX.active = false;
AJAX.xhr = null;
previousLinkAborted = true;
} else {
// If can't abort
return false;
}
} else {
// In case submitting a form, don't attempt aborting
return false;
}
}
AJAX.source = $(this);
$('html, body').animate({
scrollTop: 0
}, 'fast');
var url = isLink ? href : $(this).attr('action');
var argsep = CommonParams.get('arg_separator');
var params = 'ajax_request=true' + argsep + 'ajax_page_request=true';
var dataPost = AJAX.source.getPostData();
if (!isLink) {
params += argsep + $(this).serialize();
} else if (dataPost) {
params += argsep + dataPost;
isLink = false;
}
if (AJAX.debug) {
// eslint-disable-next-line no-console
console.log('Loading: ' + url); // no need to translate
}
if (isLink) {
AJAX.active = true;
AJAX.$msgbox = Functions.ajaxShowMessage();
// Save reference for the new link request
AJAX.xhr = $.get(url, params, AJAX.responseHandler);
var state = {
url: href
};
if (previousLinkAborted) {
// hack: there is already an aborted entry on stack
// so just modify the aborted one
history.replaceState(state, null, href);
} else {
history.pushState(state, null, href);
}
} else {
/**
* Manually fire the onsubmit event for the form, if any.
* The event was saved in the jQuery data object by an onload
* handler defined below. Workaround for bug #3583316
*/
var onsubmit = $(this).data('onsubmit');
// Submit the request if there is no onsubmit handler
// or if it returns a value that evaluates to true
if (typeof onsubmit !== 'function' || onsubmit.apply(this, [event])) {
AJAX.active = true;
AJAX.$msgbox = Functions.ajaxShowMessage();
if ($(this).attr('id') === 'login_form') {
$.post(url, params, AJAX.loginResponseHandler);
} else {
$.post(url, params, AJAX.responseHandler);
}
}
}
},
/**
* Response handler to handle login request from login modal after session expiration
*
* To refer to self use 'AJAX', instead of 'this' as this function
* is called in the jQuery context.
*
* @param {object} data Event data
*
* @return {void}
*/
loginResponseHandler: function (data) {
if (typeof data === 'undefined' || data === null) {
return;
}
Functions.ajaxRemoveMessage(AJAX.$msgbox);
CommonParams.set('token', data.new_token);
AJAX.scriptHandler.load([]);
if (data.displayMessage) {
$('#page_content').prepend(data.displayMessage);
Functions.highlightSql($('#page_content'));
}
$('#pma_errors').remove();
var msg = '';
if (data.errSubmitMsg) {
msg = data.errSubmitMsg;
}
if (data.errors) {
$('<div></div>', {
id: 'pma_errors',
class: 'clearfloat d-print-none'
}).insertAfter('#selflink').append(data.errors);
// bind for php error reporting forms (bottom)
$('#pma_ignore_errors_bottom').on('click', function (e) {
e.preventDefault();
Functions.ignorePhpErrors();
});
$('#pma_ignore_all_errors_bottom').on('click', function (e) {
e.preventDefault();
Functions.ignorePhpErrors(false);
});
// In case of 'sendErrorReport'='always'
// submit the hidden error reporting form.
if (data.sendErrorAlways === '1' && data.stopErrorReportLoop !== '1') {
$('#pma_report_errors_form').trigger('submit');
Functions.ajaxShowMessage(Messages.phpErrorsBeingSubmitted, false);
$('html, body').animate({
scrollTop: $(document).height()
}, 'slow');
} else if (data.promptPhpErrors) {
// otherwise just prompt user if it is set so.
msg = msg + Messages.phpErrorsFound;
// scroll to bottom where all the errors are displayed.
$('html, body').animate({
scrollTop: $(document).height()
}, 'slow');
}
}
Functions.ajaxShowMessage(msg, false);
// bind for php error reporting forms (popup)
$('#pma_ignore_errors_popup').on('click', function () {
Functions.ignorePhpErrors();
});
$('#pma_ignore_all_errors_popup').on('click', function () {
Functions.ignorePhpErrors(false);
});
if (typeof data.success !== 'undefined' && data.success) {
// reload page if user trying to login has changed
if (CommonParams.get('user') !== data.params.user) {
window.location = 'index.php';
Functions.ajaxShowMessage(Messages.strLoading, false);
AJAX.active = false;
AJAX.xhr = null;
return;
}
// remove the login modal if the login is successful otherwise show error.
if (typeof data.logged_in !== 'undefined' && data.logged_in === 1) {
if ($('#modalOverlay').length) {
$('#modalOverlay').remove();
}
$('fieldset.disabled_for_expiration').removeAttr('disabled').removeClass('disabled_for_expiration');
AJAX.fireTeardown('functions.js');
AJAX.fireOnload('functions.js');
}
if (typeof data.new_token !== 'undefined') {
$('input[name=token]').val(data.new_token);
}
} else if (typeof data.logged_in !== 'undefined' && data.logged_in === 0) {
$('#modalOverlay').replaceWith(data.error);
} else {
Functions.ajaxShowMessage(data.error, false);
AJAX.active = false;
AJAX.xhr = null;
Functions.handleRedirectAndReload(data);
if (data.fieldWithError) {
$(':input.error').removeClass('error');
$('#' + data.fieldWithError).addClass('error');
}
}
},
/**
* Called after the request that was initiated by this.requestHandler()
* has completed successfully or with a caught error. For completely
* failed requests or requests with uncaught errors, see the .ajaxError
* handler at the bottom of this file.
*
* To refer to self use 'AJAX', instead of 'this' as this function
* is called in the jQuery context.
*
* @param {object} data Event data
*
* @return {void}
*/
responseHandler: function (data) {
if (typeof data === 'undefined' || data === null) {
return;
}
// Can be a string when an error occurred and only HTML was returned.
if (typeof data === 'string') {
Functions.ajaxRemoveMessage(AJAX.$msgbox);
Functions.ajaxShowMessage($(data).text(), false, 'error');
AJAX.active = false;
AJAX.xhr = null;
return;
}
if (typeof data.success !== 'undefined' && data.success) {
$('html, body').animate({
scrollTop: 0
}, 'fast');
Functions.ajaxRemoveMessage(AJAX.$msgbox);
if (data.redirect) {
Functions.ajaxShowMessage(data.redirect, false);
AJAX.active = false;
AJAX.xhr = null;
return;
}
AJAX.scriptHandler.reset(function () {
if (data.reloadNavigation) {
Navigation.reload();
}
if (data.title) {
$('title').replaceWith(data.title);
}
if (data.menu) {
var state = {
url: data.selflink,
menu: data.menu
};
history.replaceState(state, null);
AJAX.handleMenu.replace(data.menu);
}
if (data.disableNaviSettings) {
Navigation.disableSettings();
} else {
Navigation.ensureSettings(data.selflink);
}
// Remove all containers that may have
// been added outside of #page_content
$('body').children().not('div.modal').not('#pma_navigation').not('#floating_menubar').not('#page_nav_icons').not('#page_content').not('#selflink').not('#pma_header').not('#pma_footer').not('#pma_demo').not('#pma_console_container').not('#prefs_autoload').remove();
// Replace #page_content with new content
if (data.message && data.message.length > 0) {
$('#page_content').replaceWith('<div id=\'page_content\'>' + data.message + '</div>');
Functions.highlightSql($('#page_content'));
Functions.checkNumberOfFields();
}
if (data.selflink) {
var source = data.selflink.split('?')[0];
// Check for faulty links
var $selflinkReplace = {
'index.php?route=/import': 'index.php?route=/table/sql',
'index.php?route=/table/chart': 'index.php?route=/sql',
'index.php?route=/table/gis-visualization': 'index.php?route=/sql'
};
if ($selflinkReplace[source]) {
var replacement = $selflinkReplace[source];
data.selflink = data.selflink.replace(source, replacement);
}
$('#selflink').find('> a').attr('href', data.selflink);
}
if (data.params) {
CommonParams.setAll(data.params);
}
if (data.scripts) {
AJAX.scriptHandler.load(data.scripts);
}
if (data.displayMessage) {
$('#page_content').prepend(data.displayMessage);
Functions.highlightSql($('#page_content'));
}
$('#pma_errors').remove();
var msg = '';
if (data.errSubmitMsg) {
msg = data.errSubmitMsg;
}
if (data.errors) {
$('<div></div>', {
id: 'pma_errors',
class: 'clearfloat d-print-none'
}).insertAfter('#selflink').append(data.errors);
// bind for php error reporting forms (bottom)
$('#pma_ignore_errors_bottom').on('click', function (e) {
e.preventDefault();
Functions.ignorePhpErrors();
});
$('#pma_ignore_all_errors_bottom').on('click', function (e) {
e.preventDefault();
Functions.ignorePhpErrors(false);
});
// In case of 'sendErrorReport'='always'
// submit the hidden error reporting form.
if (data.sendErrorAlways === '1' && data.stopErrorReportLoop !== '1') {
$('#pma_report_errors_form').trigger('submit');
Functions.ajaxShowMessage(Messages.phpErrorsBeingSubmitted, false);
$('html, body').animate({
scrollTop: $(document).height()
}, 'slow');
} else if (data.promptPhpErrors) {
// otherwise just prompt user if it is set so.
msg = msg + Messages.phpErrorsFound;
// scroll to bottom where all the errors are displayed.
$('html, body').animate({
scrollTop: $(document).height()
}, 'slow');
}
}
Functions.ajaxShowMessage(msg, false);
// bind for php error reporting forms (popup)
$('#pma_ignore_errors_popup').on('click', function () {
Functions.ignorePhpErrors();
});
$('#pma_ignore_all_errors_popup').on('click', function () {
Functions.ignorePhpErrors(false);
});
if (typeof AJAX.callback === 'function') {
AJAX.callback.call();
}
AJAX.callback = function () {};
});
} else {
Functions.ajaxShowMessage(data.error, false);
Functions.ajaxRemoveMessage(AJAX.$msgbox);
var $ajaxError = $('<div></div>');
$ajaxError.attr({
'id': 'ajaxError'
});
$('#page_content').append($ajaxError);
$ajaxError.html(data.error);
$('html, body').animate({
scrollTop: $(document).height()
}, 200);
AJAX.active = false;
AJAX.xhr = null;
Functions.handleRedirectAndReload(data);
if (data.fieldWithError) {
$(':input.error').removeClass('error');
$('#' + data.fieldWithError).addClass('error');
}
}
},
/**
* This object is in charge of downloading scripts,
* keeping track of what's downloaded and firing
* the onload event for them when the page is ready.
*/
scriptHandler: {
/**
* @var {string[]} scripts The list of files already downloaded
*/
scripts: [],
/**
* @var {string} scriptsVersion version of phpMyAdmin from which the
* scripts have been loaded
*/
scriptsVersion: null,
/**
* @var {string[]} scriptsToBeLoaded The list of files that
* need to be downloaded
*/
scriptsToBeLoaded: [],
/**
* @var {string[]} scriptsToBeFired The list of files for which
* to fire the onload and unload events
*/
scriptsToBeFired: [],
scriptsCompleted: false,
/**
* Records that a file has been downloaded
*
* @param {string} file The filename
* @param {string} fire Whether this file will be registering
* onload/teardown events
*
* @return {self} For chaining
*/
add: function (file, fire) {
this.scripts.push(file);
if (fire) {
// Record whether to fire any events for the file
// This is necessary to correctly tear down the initial page
this.scriptsToBeFired.push(file);
}
return this;
},
/**
* Download a list of js files in one request
*
* @param {string[]} files An array of filenames and flags
* @param {Function} callback
*
* @return {void}
*/
load: function (files, callback) {
var self = this;
var i;
// Clear loaded scripts if they are from another version of phpMyAdmin.
// Depends on common params being set before loading scripts in responseHandler
if (self.scriptsVersion === null) {
self.scriptsVersion = CommonParams.get('version');
} else if (self.scriptsVersion !== CommonParams.get('version')) {
self.scripts = [];
self.scriptsVersion = CommonParams.get('version');
}
self.scriptsCompleted = false;
self.scriptsToBeFired = [];
// We need to first complete list of files to load
// as next loop will directly fire requests to load them
// and that triggers removal of them from
// self.scriptsToBeLoaded
for (i in files) {
self.scriptsToBeLoaded.push(files[i].name);
if (files[i].fire) {
self.scriptsToBeFired.push(files[i].name);
}
}
for (i in files) {
var script = files[i].name;
// Only for scripts that we don't already have
if ($.inArray(script, self.scripts) === -1) {
this.add(script);
this.appendScript(script, callback);
} else {
self.done(script, callback);
}
}
// Trigger callback if there is nothing else to load
self.done(null, callback);
},
/**
* Called whenever all files are loaded
*
* @param {string} script
* @param {Function?} callback
*
* @return {void}
*/
done: function (script, callback) {
if ($.inArray(script, this.scriptsToBeFired)) {
AJAX.fireOnload(script);
}
if ($.inArray(script, this.scriptsToBeLoaded)) {
this.scriptsToBeLoaded.splice($.inArray(script, this.scriptsToBeLoaded), 1);
}
if (script === null) {
this.scriptsCompleted = true;
}
/* We need to wait for last signal (with null) or last script load */
AJAX.active = this.scriptsToBeLoaded.length > 0 || !this.scriptsCompleted;
/* Run callback on last script */
if (!AJAX.active && typeof callback === 'function') {
callback();
}
},
/**
* Appends a script element to the head to load the scripts
*
* @param {string} name
* @param {Function} callback
*
* @return {void}
*/
appendScript: function (name, callback) {
var head = document.head || document.getElementsByTagName('head')[0];
var script = document.createElement('script');
var self = this;
script.type = 'text/javascript';
var file = name.indexOf('vendor/') !== -1 ? name : 'dist/' + name;
script.src = 'js/' + file + '?' + 'v=' + encodeURIComponent(CommonParams.get('version'));
script.async = false;
script.onload = function () {
self.done(name, callback);
};
head.appendChild(script);
},
/**
* Fires all the teardown event handlers for the current page
* and rebinds all forms and links to the request handler
*
* @param {Function} callback The callback to call after resetting
*
* @return {void}
*/
reset: function (callback) {
for (var i in this.scriptsToBeFired) {
AJAX.fireTeardown(this.scriptsToBeFired[i]);
}
this.scriptsToBeFired = [];
/**
* Re-attach a generic event handler to clicks
* on pages and submissions of forms
*/
$(document).off('click', 'a').on('click', 'a', AJAX.requestHandler);
$(document).off('submit', 'form').on('submit', 'form', AJAX.requestHandler);
callback();
}
}
};
/**
* Here we register a function that will remove the onsubmit event from all
* forms that will be handled by the generic page loader. We then save this
* event handler in the "jQuery data", so that we can fire it up later in
* AJAX.requestHandler().
*
* See bug #3583316
*/
AJAX.registerOnload('functions.js', function () {
// Registering the onload event for functions.js
// ensures that it will be fired for all pages
$('form').not('.ajax').not('.disableAjax').each(function () {
if ($(this).attr('onsubmit')) {
$(this).data('onsubmit', this.onsubmit).attr('onsubmit', '');
}
});
var $pageContent = $('#page_content');
/**
* Workaround for passing submit button name,value on ajax form submit
* by appending hidden element with submit button name and value.
*/
$pageContent.on('click', 'form input[type=submit]', function () {
var buttonName = $(this).attr('name');
if (typeof buttonName === 'undefined') {
return;
}
$(this).closest('form').append($('<input>', {
'type': 'hidden',
'name': buttonName,
'value': $(this).val()
}));
});
/**
* Attach event listener to events when user modify visible
* Input,Textarea and select fields to make changes in forms
*/
$pageContent.on('keyup change', 'form.lock-page textarea, ' + 'form.lock-page input[type="text"], ' + 'form.lock-page input[type="number"], ' + 'form.lock-page select', {
value: 1
}, AJAX.lockPageHandler);
$pageContent.on('change', 'form.lock-page input[type="checkbox"], ' + 'form.lock-page input[type="radio"]', {
value: 2
}, AJAX.lockPageHandler);
/**
* Reset lock when lock-page form reset event is fired
* Note: reset does not bubble in all browser so attach to
* form directly.
*/
$('form.lock-page').on('reset', function () {
AJAX.resetLock();
});
});
/**
* Page load event handler
*/
$(function () {
var menuContent = $('<div></div>').append($('#server-breadcrumb').clone()).append($('#topmenucontainer').clone()).html();
// set initial state reload
var initState = 'state' in window.history && window.history.state !== null;
var initURL = $('#selflink').find('> a').attr('href') || location.href;
var state = {
url: initURL,
menu: menuContent
};
history.replaceState(state, null);
$(window).on('popstate', function (event) {
var initPop = !initState && location.href === initURL;
initState = true;
// check if popstate fired on first page itself
if (initPop) {
return;
}
var state = event.originalEvent.state;
if (state && state.menu) {
AJAX.$msgbox = Functions.ajaxShowMessage();
var params = 'ajax_request=true' + CommonParams.get('arg_separator') + 'ajax_page_request=true';
var url = state.url || location.href;
$.get(url, params, AJAX.responseHandler);
// TODO: Check if sometimes menu is not retrieved from server,
// Not sure but it seems menu was missing only for printview which
// been removed lately, so if it's right some dead menu checks/fallbacks
// may need to be removed from this file and Header.php
// AJAX.handleMenu.replace(event.originalEvent.state.menu);
}
});
});
/**
* Attach a generic event handler to clicks
* on pages and submissions of forms
*/
$(document).on('click', 'a', AJAX.requestHandler);
$(document).on('submit', 'form', AJAX.requestHandler);
/**
* Gracefully handle fatal server errors
* (e.g: 500 - Internal server error)
*/
$(document).on('ajaxError', function (event, request, settings) {
if (AJAX.debug) {
// eslint-disable-next-line no-console
console.log('AJAX error: status=' + request.status + ', text=' + request.statusText);
}
if (settings.url.includes('/git-revision')) {
return;
}
// Don't handle aborted requests
if (request.status !== 0 || request.statusText !== 'abort') {
var details = '';
var state = request.state();
if (request.status !== 0) {
details += '<div>' + Functions.escapeHtml(Functions.sprintf(Messages.strErrorCode, request.status)) + '</div>';
}
details += '<div>' + Functions.escapeHtml(Functions.sprintf(Messages.strErrorText, request.statusText + ' (' + state + ')')) + '</div>';
if (state === 'rejected' || state === 'timeout') {
details += '<div>' + Functions.escapeHtml(Messages.strErrorConnection) + '</div>';
}
Functions.ajaxShowMessage('<div class="alert alert-danger" role="alert">' + Messages.strErrorProcessingRequest + details + '</div>', false);
AJAX.active = false;
AJAX.xhr = null;
}
});

656
pma/js/dist/chart.js vendored Normal file
View File

@@ -0,0 +1,656 @@
/**
* Chart type enumerations
*/
var ChartType = {
LINE: 'line',
SPLINE: 'spline',
AREA: 'area',
BAR: 'bar',
COLUMN: 'column',
PIE: 'pie',
TIMELINE: 'timeline',
SCATTER: 'scatter'
};
/**
* Column type enumeration
*/
var ColumnType = {
STRING: 'string',
NUMBER: 'number',
BOOLEAN: 'boolean',
DATE: 'date'
};
/**
* Abstract chart factory which defines the contract for chart factories
*/
var ChartFactory = function () {};
ChartFactory.prototype = {
createChart: function () {
throw new Error('createChart must be implemented by a subclass');
}
};
/**
* Abstract chart which defines the contract for charts
*
* @param elementId
* id of the div element the chart is drawn in
*/
var Chart = function (elementId) {
this.elementId = elementId;
};
Chart.prototype = {
draw: function () {
throw new Error('draw must be implemented by a subclass');
},
redraw: function () {
throw new Error('redraw must be implemented by a subclass');
},
destroy: function () {
throw new Error('destroy must be implemented by a subclass');
},
toImageString: function () {
throw new Error('toImageString must be implemented by a subclass');
}
};
/**
* Abstract representation of charts that operates on DataTable where,<br>
* <ul>
* <li>First column provides index to the data.</li>
* <li>Each subsequent columns are of type
* <code>ColumnType.NUMBER<code> and represents a data series.</li>
* </ul>
* Line chart, area chart, bar chart, column chart are typical examples.
*
* @param elementId
* id of the div element the chart is drawn in
*/
var BaseChart = function (elementId) {
Chart.call(this, elementId);
};
BaseChart.prototype = new Chart();
BaseChart.prototype.constructor = BaseChart;
BaseChart.prototype.validateColumns = function (dataTable) {
var columns = dataTable.getColumns();
if (columns.length < 2) {
throw new Error('Minimum of two columns are required for this chart');
}
for (var i = 1; i < columns.length; i++) {
if (columns[i].type !== ColumnType.NUMBER) {
throw new Error('Column ' + (i + 1) + ' should be of type \'Number\'');
}
}
return true;
};
/**
* Abstract pie chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var PieChart = function (elementId) {
BaseChart.call(this, elementId);
};
PieChart.prototype = new BaseChart();
PieChart.prototype.constructor = PieChart;
PieChart.prototype.validateColumns = function (dataTable) {
var columns = dataTable.getColumns();
if (columns.length > 2) {
throw new Error('Pie charts can draw only one series');
}
return BaseChart.prototype.validateColumns.call(this, dataTable);
};
/**
* Abstract timeline chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var TimelineChart = function (elementId) {
BaseChart.call(this, elementId);
};
TimelineChart.prototype = new BaseChart();
TimelineChart.prototype.constructor = TimelineChart;
TimelineChart.prototype.validateColumns = function (dataTable) {
var result = BaseChart.prototype.validateColumns.call(this, dataTable);
if (result) {
var columns = dataTable.getColumns();
if (columns[0].type !== ColumnType.DATE) {
throw new Error('First column of timeline chart need to be a date column');
}
}
return result;
};
/**
* Abstract scatter chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var ScatterChart = function (elementId) {
BaseChart.call(this, elementId);
};
ScatterChart.prototype = new BaseChart();
ScatterChart.prototype.constructor = ScatterChart;
ScatterChart.prototype.validateColumns = function (dataTable) {
var result = BaseChart.prototype.validateColumns.call(this, dataTable);
if (result) {
var columns = dataTable.getColumns();
if (columns[0].type !== ColumnType.NUMBER) {
throw new Error('First column of scatter chart need to be a numeric column');
}
}
return result;
};
/**
* The data table contains column information and data for the chart.
*/
// eslint-disable-next-line no-unused-vars
var DataTable = function () {
var columns = [];
var data = null;
this.addColumn = function (type, name) {
columns.push({
'type': type,
'name': name
});
};
this.getColumns = function () {
return columns;
};
this.setData = function (rows) {
data = rows;
fillMissingValues();
};
this.getData = function () {
return data;
};
var fillMissingValues = function () {
if (columns.length === 0) {
throw new Error('Set columns first');
}
var row;
for (var i = 0; i < data.length; i++) {
row = data[i];
if (row.length > columns.length) {
row.splice(columns.length - 1, row.length - columns.length);
} else if (row.length < columns.length) {
for (var j = row.length; j < columns.length; j++) {
row.push(null);
}
}
}
};
};
/** *****************************************************************************
* JQPlot specific code
******************************************************************************/
/**
* Abstract JQplot chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotChart = function (elementId) {
Chart.call(this, elementId);
this.plot = null;
this.validator = null;
};
JQPlotChart.prototype = new Chart();
JQPlotChart.prototype.constructor = JQPlotChart;
JQPlotChart.prototype.draw = function (data, options) {
if (this.validator.validateColumns(data)) {
this.plot = $.jqplot(this.elementId, this.prepareData(data), this.populateOptions(data, options));
}
};
JQPlotChart.prototype.destroy = function () {
if (this.plot !== null) {
this.plot.destroy();
}
};
JQPlotChart.prototype.redraw = function (options) {
if (this.plot !== null) {
this.plot.replot(options);
}
};
JQPlotChart.prototype.toImageString = function () {
if (this.plot !== null) {
return $('#' + this.elementId).jqplotToImageStr({});
}
};
JQPlotChart.prototype.populateOptions = function () {
throw new Error('populateOptions must be implemented by a subclass');
};
JQPlotChart.prototype.prepareData = function () {
throw new Error('prepareData must be implemented by a subclass');
};
/**
* JQPlot line chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotLineChart = function (elementId) {
JQPlotChart.call(this, elementId);
this.validator = BaseChart.prototype;
};
JQPlotLineChart.prototype = new JQPlotChart();
JQPlotLineChart.prototype.constructor = JQPlotLineChart;
JQPlotLineChart.prototype.populateOptions = function (dataTable, options) {
var columns = dataTable.getColumns();
var optional = {
axes: {
xaxis: {
label: columns[0].name,
renderer: $.jqplot.CategoryAxisRenderer,
ticks: []
},
yaxis: {
label: columns.length === 2 ? columns[1].name : 'Values',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
},
highlighter: {
show: true,
tooltipAxes: 'y',
formatString: '%d'
},
series: []
};
$.extend(true, optional, options);
if (optional.series.length === 0) {
for (var i = 1; i < columns.length; i++) {
optional.series.push({
label: columns[i].name.toString()
});
}
}
if (optional.axes.xaxis.ticks.length === 0) {
var data = dataTable.getData();
for (var j = 0; j < data.length; j++) {
optional.axes.xaxis.ticks.push(data[j][0] !== null ? data[j][0].toString() : null);
}
}
return optional;
};
JQPlotLineChart.prototype.prepareData = function (dataTable) {
var data = dataTable.getData();
var row;
var retData = [];
var retRow;
for (var i = 0; i < data.length; i++) {
row = data[i];
for (var j = 1; j < row.length; j++) {
retRow = retData[j - 1];
if (retRow === undefined) {
retRow = [];
retData[j - 1] = retRow;
}
retRow.push(row[j]);
}
}
return retData;
};
/**
* JQPlot spline chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotSplineChart = function (elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotSplineChart.prototype = new JQPlotLineChart();
JQPlotSplineChart.prototype.constructor = JQPlotSplineChart;
JQPlotSplineChart.prototype.populateOptions = function (dataTable, options) {
var optional = {};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options);
var compulsory = {
seriesDefaults: {
rendererOptions: {
smooth: true
}
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
/**
* JQPlot scatter chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotScatterChart = function (elementId) {
JQPlotChart.call(this, elementId);
this.validator = ScatterChart.prototype;
};
JQPlotScatterChart.prototype = new JQPlotChart();
JQPlotScatterChart.prototype.constructor = JQPlotScatterChart;
JQPlotScatterChart.prototype.populateOptions = function (dataTable, options) {
var columns = dataTable.getColumns();
var optional = {
axes: {
xaxis: {
label: columns[0].name
},
yaxis: {
label: columns.length === 2 ? columns[1].name : 'Values',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
},
highlighter: {
show: true,
tooltipAxes: 'xy',
formatString: '%d, %d'
},
series: []
};
for (var i = 1; i < columns.length; i++) {
optional.series.push({
label: columns[i].name.toString()
});
}
var compulsory = {
seriesDefaults: {
showLine: false,
markerOptions: {
size: 7,
style: 'x'
}
}
};
$.extend(true, optional, options, compulsory);
return optional;
};
JQPlotScatterChart.prototype.prepareData = function (dataTable) {
var data = dataTable.getData();
var row;
var retData = [];
var retRow;
for (var i = 0; i < data.length; i++) {
row = data[i];
if (row[0]) {
for (var j = 1; j < row.length; j++) {
retRow = retData[j - 1];
if (retRow === undefined) {
retRow = [];
retData[j - 1] = retRow;
}
retRow.push([row[0], row[j]]);
}
}
}
return retData;
};
/**
* JQPlot timeline chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotTimelineChart = function (elementId) {
JQPlotLineChart.call(this, elementId);
this.validator = TimelineChart.prototype;
};
JQPlotTimelineChart.prototype = new JQPlotLineChart();
JQPlotTimelineChart.prototype.constructor = JQPlotTimelineChart;
JQPlotTimelineChart.prototype.populateOptions = function (dataTable, options) {
var optional = {
axes: {
xaxis: {
tickOptions: {
formatString: '%b %#d, %y'
}
}
}
};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options);
var compulsory = {
axes: {
xaxis: {
renderer: $.jqplot.DateAxisRenderer
}
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
JQPlotTimelineChart.prototype.prepareData = function (dataTable) {
var data = dataTable.getData();
var row;
var d;
var retData = [];
var retRow;
for (var i = 0; i < data.length; i++) {
row = data[i];
d = row[0];
for (var j = 1; j < row.length; j++) {
retRow = retData[j - 1];
if (retRow === undefined) {
retRow = [];
retData[j - 1] = retRow;
}
// See https://github.com/phpmyadmin/phpmyadmin/issues/14395 for the block
if (d !== null && typeof d === 'object') {
retRow.push([d.getTime(), row[j]]);
} else if (typeof d === 'string') {
d = new Date(d);
retRow.push([d.getTime(), row[j]]);
}
}
}
return retData;
};
/**
* JQPlot area chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotAreaChart = function (elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotAreaChart.prototype = new JQPlotLineChart();
JQPlotAreaChart.prototype.constructor = JQPlotAreaChart;
JQPlotAreaChart.prototype.populateOptions = function (dataTable, options) {
var optional = {
seriesDefaults: {
fillToZero: true
}
};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options);
var compulsory = {
seriesDefaults: {
fill: true
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
/**
* JQPlot column chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotColumnChart = function (elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotColumnChart.prototype = new JQPlotLineChart();
JQPlotColumnChart.prototype.constructor = JQPlotColumnChart;
JQPlotColumnChart.prototype.populateOptions = function (dataTable, options) {
var optional = {
seriesDefaults: {
fillToZero: true
}
};
var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options);
var compulsory = {
seriesDefaults: {
renderer: $.jqplot.BarRenderer
}
};
$.extend(true, optional, opt, compulsory);
return optional;
};
/**
* JQPlot bar chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotBarChart = function (elementId) {
JQPlotLineChart.call(this, elementId);
};
JQPlotBarChart.prototype = new JQPlotLineChart();
JQPlotBarChart.prototype.constructor = JQPlotBarChart;
JQPlotBarChart.prototype.populateOptions = function (dataTable, options) {
var columns = dataTable.getColumns();
var optional = {
axes: {
yaxis: {
label: columns[0].name,
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
renderer: $.jqplot.CategoryAxisRenderer,
ticks: []
},
xaxis: {
label: columns.length === 2 ? columns[1].name : 'Values',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
},
highlighter: {
show: true,
tooltipAxes: 'x',
formatString: '%d'
},
series: [],
seriesDefaults: {
fillToZero: true
}
};
var compulsory = {
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barDirection: 'horizontal'
}
}
};
$.extend(true, optional, options, compulsory);
if (optional.axes.yaxis.ticks.length === 0) {
var data = dataTable.getData();
for (var i = 0; i < data.length; i++) {
optional.axes.yaxis.ticks.push(data[i][0].toString());
}
}
if (optional.series.length === 0) {
for (var j = 1; j < columns.length; j++) {
optional.series.push({
label: columns[j].name.toString()
});
}
}
return optional;
};
/**
* JQPlot pie chart
*
* @param elementId
* id of the div element the chart is drawn in
*/
var JQPlotPieChart = function (elementId) {
JQPlotChart.call(this, elementId);
this.validator = PieChart.prototype;
};
JQPlotPieChart.prototype = new JQPlotChart();
JQPlotPieChart.prototype.constructor = JQPlotPieChart;
JQPlotPieChart.prototype.populateOptions = function (dataTable, options) {
var optional = {
highlighter: {
show: true,
tooltipAxes: 'xy',
formatString: '%s, %d',
useAxesFormatters: false
},
legend: {
renderer: $.jqplot.EnhancedPieLegendRenderer
}
};
var compulsory = {
seriesDefaults: {
shadow: false,
renderer: $.jqplot.PieRenderer,
rendererOptions: {
sliceMargin: 1,
showDataLabels: true
}
}
};
$.extend(true, optional, options, compulsory);
return optional;
};
JQPlotPieChart.prototype.prepareData = function (dataTable) {
var data = dataTable.getData();
var row;
var retData = [];
for (var i = 0; i < data.length; i++) {
row = data[i];
retData.push([row[0], row[1]]);
}
return [retData];
};
/**
* Chart factory that returns JQPlotCharts
*/
var JQPlotChartFactory = function () {};
JQPlotChartFactory.prototype = new ChartFactory();
JQPlotChartFactory.prototype.createChart = function (type, elementId) {
var chart = null;
switch (type) {
case ChartType.LINE:
chart = new JQPlotLineChart(elementId);
break;
case ChartType.SPLINE:
chart = new JQPlotSplineChart(elementId);
break;
case ChartType.TIMELINE:
chart = new JQPlotTimelineChart(elementId);
break;
case ChartType.AREA:
chart = new JQPlotAreaChart(elementId);
break;
case ChartType.BAR:
chart = new JQPlotBarChart(elementId);
break;
case ChartType.COLUMN:
chart = new JQPlotColumnChart(elementId);
break;
case ChartType.PIE:
chart = new JQPlotPieChart(elementId);
break;
case ChartType.SCATTER:
chart = new JQPlotScatterChart(elementId);
break;
}
return chart;
};

View File

@@ -0,0 +1,34 @@
CodeMirror.sqlLint = function (text, updateLinting, options, cm) {
// Skipping check if text box is empty.
if (text.trim() === '') {
updateLinting(cm, []);
return;
}
function handleResponse(response) {
var found = [];
for (var idx in response) {
found.push({
// eslint-disable-next-line new-cap
from: CodeMirror.Pos(response[idx].fromLine, response[idx].fromColumn),
// eslint-disable-next-line new-cap
to: CodeMirror.Pos(response[idx].toLine, response[idx].toColumn),
messageHTML: response[idx].message,
severity: response[idx].severity
});
}
updateLinting(cm, found);
}
$.ajax({
method: 'POST',
url: 'index.php?route=/lint',
dataType: 'json',
data: {
'sql_query': text,
'server': CommonParams.get('server'),
'options': options.lintOptions,
'no_history': true,
'ajax_request': true
},
success: handleResponse
});
};

157
pma/js/dist/common.js vendored Normal file
View File

@@ -0,0 +1,157 @@
$(function () {
Functions.checkNumberOfFields();
});
/**
* Holds common parameters such as server, db, table, etc
*
* The content for this is normally loaded from Header.php or
* Response.php and executed by ajax.js
*
* @test-module CommonParams
*/
var CommonParams = function () {
/**
* @var {Object} params An associative array of key value pairs
* @access private
*/
var params = {};
// The returned object is the public part of the module
return {
/**
* Saves all the key value pair that
* are provided in the input array
*
* @param obj hash The input array
*
* @return {void}
*/
setAll: function (obj) {
var updateNavigation = false;
for (var i in obj) {
if (params[i] !== undefined && params[i] !== obj[i]) {
if (i === 'db' || i === 'table') {
updateNavigation = true;
}
}
params[i] = obj[i];
}
if (updateNavigation && $('#pma_navigation_tree').hasClass('synced')) {
Navigation.showCurrent();
}
},
/**
* Retrieves a value given its key
* Returns empty string for undefined values
*
* @param {string} name The key
*
* @return {string}
*/
get: function (name) {
return params[name];
},
/**
* Saves a single key value pair
*
* @param {string} name The key
* @param {string} value The value
*
* @return {CommonParams} For chainability
*/
set: function (name, value) {
var updateNavigation = false;
if (name === 'db' || name === 'table' && params[name] !== value) {
updateNavigation = true;
}
params[name] = value;
if (updateNavigation && $('#pma_navigation_tree').hasClass('synced')) {
Navigation.showCurrent();
}
return this;
},
/**
* Returns the url query string using the saved parameters
*
* @param {string} separator New separator
*
* @return {string}
*/
getUrlQuery: function (separator) {
var sep = typeof separator !== 'undefined' ? separator : '?';
var common = this.get('common_query');
var argsep = CommonParams.get('arg_separator');
if (typeof common === 'string' && common.length > 0) {
// If the last char is the separator, do not add it
// Else add it
common = common.substr(common.length - 1, common.length) === argsep ? common : common + argsep;
}
return Functions.sprintf('%s%sserver=%s' + argsep + 'db=%s' + argsep + 'table=%s', sep, common, encodeURIComponent(this.get('server')), encodeURIComponent(this.get('db')), encodeURIComponent(this.get('table')));
}
};
}();
/**
* Holds common parameters such as server, db, table, etc
*
* The content for this is normally loaded from Header.php or
* Response.php and executed by ajax.js
*/
// eslint-disable-next-line no-unused-vars
var CommonActions = {
/**
* Saves the database name when it's changed
* and reloads the query window, if necessary
*
* @param {string} newDb new_db The name of the new database
*
* @return {void}
*/
setDb: function (newDb) {
if (newDb !== CommonParams.get('db')) {
CommonParams.setAll({
'db': newDb,
'table': ''
});
}
},
/**
* Opens a database in the main part of the page
*
* @param {string} newDb The name of the new database
*
* @return {void}
*/
openDb: function (newDb) {
CommonParams.set('db', newDb).set('table', '');
this.refreshMain(CommonParams.get('opendb_url'));
},
/**
* Refreshes the main frame
*
* @param {any} url Undefined to refresh to the same page
* String to go to a different page, e.g: 'index.php'
* @param {function | undefined} callback
*
* @return {void}
*/
refreshMain: function (url) {
let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
var newUrl = url;
if (!newUrl) {
newUrl = $('#selflink').find('a').attr('href') || window.location.pathname;
newUrl = newUrl.substring(0, newUrl.indexOf('?'));
}
if (newUrl.indexOf('?') !== -1) {
newUrl += CommonParams.getUrlQuery(CommonParams.get('arg_separator'));
} else {
newUrl += CommonParams.getUrlQuery('?');
}
$('<a></a>', {
href: newUrl
}).appendTo('body').trigger('click').remove();
if (typeof callback !== 'undefined') {
AJAX.callback = callback;
}
}
};

835
pma/js/dist/config.js vendored Normal file
View File

@@ -0,0 +1,835 @@
/**
* Functions used in configuration forms and on user preferences pages
*/
/* exported PASSIVE_EVENT_LISTENERS */
var configInlineParams;
var configScriptLoaded;
/**
* checks whether browser supports web storage
*
* @param {'localStorage' | 'sessionStorage'} type the type of storage i.e. localStorage or sessionStorage
* @param {boolean} warn Wether to show a warning on error
*
* @return {boolean}
*/
function isStorageSupported(type) {
let warn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
try {
window[type].setItem('PMATest', 'test');
// Check whether key-value pair was set successfully
if (window[type].getItem('PMATest') === 'test') {
// Supported, remove test variable from storage
window[type].removeItem('PMATest');
return true;
}
} catch (error) {
// Not supported
if (warn) {
Functions.ajaxShowMessage(Messages.strNoLocalStorage, false);
}
}
return false;
}
/**
* Unbind all event handlers before tearing down a page
*/
AJAX.registerTeardown('config.js', function () {
$('.optbox input[id], .optbox select[id], .optbox textarea[id]').off('change').off('keyup');
$('.optbox input[type=button][name=submit_reset]').off('click');
$('div.tab-content').off();
$('#import_local_storage, #export_local_storage').off('click');
$('form.prefs-form').off('change').off('submit');
$(document).off('click', 'div.click-hide-message');
$('#prefs_autoload').find('a').off('click');
});
AJAX.registerOnload('config.js', function () {
var $topmenuUpt = $('#user_prefs_tabs');
$topmenuUpt.find('a.active').attr('rel', 'samepage');
$topmenuUpt.find('a:not(.active)').attr('rel', 'newpage');
});
// default values for fields
var defaultValues = {};
/**
* Returns field type
*
* @param {Element} field
*
* @return {string}
*/
function getFieldType(field) {
var $field = $(field);
var tagName = $field.prop('tagName');
if (tagName === 'INPUT') {
return $field.attr('type');
} else if (tagName === 'SELECT') {
return 'select';
} else if (tagName === 'TEXTAREA') {
return 'text';
}
return '';
}
/**
* Enables or disables the "restore default value" button
*
* @param {Element} field
* @param {boolean} display
*
* @return {void}
*/
function setRestoreDefaultBtn(field, display) {
var $el = $(field).closest('td').find('.restore-default img');
$el[display ? 'show' : 'hide']();
}
/**
* Marks field depending on its value (system default or custom)
*
* @param {Element | JQuery<Element>} field
*
* @return {void}
*/
function markField(field) {
var $field = $(field);
var type = getFieldType($field);
var isDefault = checkFieldDefault($field, type);
// checkboxes uses parent <span> for marking
var $fieldMarker = type === 'checkbox' ? $field.parent() : $field;
setRestoreDefaultBtn($field, !isDefault);
$fieldMarker[isDefault ? 'removeClass' : 'addClass']('custom');
}
/**
* Sets field value
*
* value must be of type:
* o undefined (omitted) - restore default value (form default, not PMA default)
* o String - if field_type is 'text'
* o boolean - if field_type is 'checkbox'
* o Array of values - if field_type is 'select'
*
* @param {Element} field
* @param {string} fieldType see {@link #getFieldType}
* @param {string | boolean} value
*/
function setFieldValue(field, fieldType, value) {
var $field = $(field);
switch (fieldType) {
case 'text':
case 'number':
$field.val(value);
break;
case 'checkbox':
$field.prop('checked', value);
break;
case 'select':
var options = $field.prop('options');
var i;
var imax = options.length;
for (i = 0; i < imax; i++) {
options[i].selected = value.indexOf(options[i].value) !== -1;
}
break;
}
markField($field);
}
/**
* Gets field value
*
* Will return one of:
* o String - if type is 'text'
* o boolean - if type is 'checkbox'
* o Array of values - if type is 'select'
*
* @param {Element} field
* @param {string} fieldType returned by {@link #getFieldType}
*
* @return {boolean | string | string[] | null}
*/
function getFieldValue(field, fieldType) {
var $field = $(field);
switch (fieldType) {
case 'text':
case 'number':
return $field.prop('value');
case 'checkbox':
return $field.prop('checked');
case 'select':
var options = $field.prop('options');
var i;
var imax = options.length;
var items = [];
for (i = 0; i < imax; i++) {
if (options[i].selected) {
items.push(options[i].value);
}
}
return items;
}
return null;
}
/**
* Returns values for all fields in fieldsets
*
* @return {object}
*/
// eslint-disable-next-line no-unused-vars
function getAllValues() {
var $elements = $('fieldset input, fieldset select, fieldset textarea');
var values = {};
var type;
var value;
for (var i = 0; i < $elements.length; i++) {
type = getFieldType($elements[i]);
value = getFieldValue($elements[i], type);
if (typeof value !== 'undefined') {
// we only have single selects, fatten array
if (type === 'select') {
value = value[0];
}
values[$elements[i].name] = value;
}
}
return values;
}
/**
* Checks whether field has its default value
*
* @param {Element} field
* @param {string} type
*
* @return {boolean}
*/
function checkFieldDefault(field, type) {
var $field = $(field);
var fieldId = $field.attr('id');
if (typeof defaultValues[fieldId] === 'undefined') {
return true;
}
var isDefault = true;
var currentValue = getFieldValue($field, type);
if (type !== 'select') {
isDefault = currentValue === defaultValues[fieldId];
} else {
// compare arrays, will work for our representation of select values
if (currentValue.length !== defaultValues[fieldId].length) {
isDefault = false;
} else {
for (var i = 0; i < currentValue.length; i++) {
if (currentValue[i] !== defaultValues[fieldId][i]) {
isDefault = false;
break;
}
}
}
}
return isDefault;
}
/**
* Returns element's id prefix
* @param {Element} element
*
* @return {string}
*/
// eslint-disable-next-line no-unused-vars
function getIdPrefix(element) {
return $(element).attr('id').replace(/[^-]+$/, '');
}
// ------------------------------------------------------------------
// Form validation and field operations
//
// form validator assignments
var validate = {};
// form validator list
var validators = {
// regexp: numeric value
regExpNumeric: /^[0-9]+$/,
// regexp: extract parts from PCRE expression
regExpPcreExtract: /(.)(.*)\1(.*)?/,
/**
* Validates positive number
*
* @param {boolean} isKeyUp
*
* @return {boolean}
*/
validatePositiveNumber: function (isKeyUp) {
if (isKeyUp && this.value === '') {
return true;
}
var result = this.value !== '0' && validators.regExpNumeric.test(this.value);
return result ? true : Messages.error_nan_p;
},
/**
* Validates non-negative number
*
* @param {boolean} isKeyUp
*
* @return {boolean}
*/
validateNonNegativeNumber: function (isKeyUp) {
if (isKeyUp && this.value === '') {
return true;
}
var result = validators.regExpNumeric.test(this.value);
return result ? true : Messages.error_nan_nneg;
},
/**
* Validates port number
*
* @return {true|string}
*/
validatePortNumber: function () {
if (this.value === '') {
return true;
}
var result = validators.regExpNumeric.test(this.value) && this.value !== '0';
return result && this.value <= 65535 ? true : Messages.error_incorrect_port;
},
/**
* Validates value according to given regular expression
*
* @param {boolean} isKeyUp
* @param {string} regexp
*
* @return {true|string}
*/
validateByRegex: function (isKeyUp, regexp) {
if (isKeyUp && this.value === '') {
return true;
}
// convert PCRE regexp
var parts = regexp.match(validators.regExpPcreExtract);
var valid = this.value.match(new RegExp(parts[2], parts[3])) !== null;
return valid ? true : Messages.error_invalid_value;
},
/**
* Validates upper bound for numeric inputs
*
* @param {boolean} isKeyUp
* @param {number} maxValue
*
* @return {true|string}
*/
validateUpperBound: function (isKeyUp, maxValue) {
var val = parseInt(this.value, 10);
if (isNaN(val)) {
return true;
}
return val <= maxValue ? true : Functions.sprintf(Messages.error_value_lte, maxValue);
},
// field validators
field: {},
// fieldset validators
fieldset: {}
};
/**
* Registers validator for given field
*
* @param {string} id field id
* @param {string} type validator (key in validators object)
* @param {boolean} onKeyUp whether fire on key up
* @param {Array} params validation function parameters
*/
// eslint-disable-next-line no-unused-vars
function registerFieldValidator(id, type, onKeyUp, params) {
if (typeof validators[type] === 'undefined') {
return;
}
if (typeof validate[id] === 'undefined') {
validate[id] = [];
}
if (validate[id].length === 0) {
validate[id].push([type, params, onKeyUp]);
}
}
/**
* Returns validation functions associated with form field
*
* @param {String} fieldId form field id
* @param {boolean} onKeyUpOnly see registerFieldValidator
*
* @return {any[]} of [function, parameters to be passed to function]
*/
function getFieldValidators(fieldId, onKeyUpOnly) {
// look for field bound validator
var name = fieldId && fieldId.match(/[^-]+$/)[0];
if (typeof validators.field[name] !== 'undefined') {
return [[validators.field[name], null]];
}
// look for registered validators
var functions = [];
if (typeof validate[fieldId] !== 'undefined') {
// validate[field_id]: array of [type, params, onKeyUp]
for (var i = 0, imax = validate[fieldId].length; i < imax; i++) {
if (onKeyUpOnly && !validate[fieldId][i][2]) {
continue;
}
functions.push([validators[validate[fieldId][i][0]], validate[fieldId][i][1]]);
}
}
return functions;
}
/**
* Displays errors for given form fields
*
* WARNING: created DOM elements must be identical with the ones made by
* PhpMyAdmin\Config\FormDisplayTemplate::displayInput()!
*
* @param {object} errorList list of errors in the form {field id: error array}
*/
function displayErrors(errorList) {
var tempIsEmpty = function (item) {
return item !== '';
};
for (var fieldId in errorList) {
var errors = errorList[fieldId];
var $field = $('#' + fieldId);
var isFieldset = $field.attr('tagName') === 'FIELDSET';
var $errorCnt;
if (isFieldset) {
$errorCnt = $field.find('dl.errors');
} else {
$errorCnt = $field.siblings('.inline_errors');
}
// remove empty errors (used to clear error list)
errors = $.grep(errors, tempIsEmpty);
// CSS error class
if (!isFieldset) {
// checkboxes uses parent <span> for marking
var $fieldMarker = $field.attr('type') === 'checkbox' ? $field.parent() : $field;
$fieldMarker[errors.length ? 'addClass' : 'removeClass']('field-error');
}
if (errors.length) {
// if error container doesn't exist, create it
if ($errorCnt.length === 0) {
if (isFieldset) {
$errorCnt = $('<dl class="errors"></dl>');
$field.find('table').before($errorCnt);
} else {
$errorCnt = $('<dl class="inline_errors"></dl>');
$field.closest('td').append($errorCnt);
}
}
var html = '';
for (var i = 0, imax = errors.length; i < imax; i++) {
html += '<dd>' + errors[i] + '</dd>';
}
$errorCnt.html(html);
} else if ($errorCnt !== null) {
// remove useless error container
$errorCnt.remove();
}
}
}
/**
* Validates fields and fieldsets and call displayError function as required
*/
function setDisplayError() {
var elements = $('.optbox input[id], .optbox select[id], .optbox textarea[id]');
// run all field validators
var errors = {};
for (var i = 0; i < elements.length; i++) {
validateField(elements[i], false, errors);
}
// run all fieldset validators
$('fieldset.optbox').each(function () {
validateFieldset(this, false, errors);
});
displayErrors(errors);
}
/**
* Validates fieldset and puts errors in 'errors' object
*
* @param {Element} fieldset
* @param {boolean} isKeyUp
* @param {object} errors
*/
function validateFieldset(fieldset, isKeyUp, errors) {
var $fieldset = $(fieldset);
if ($fieldset.length && typeof validators.fieldset[$fieldset.attr('id')] !== 'undefined') {
var fieldsetErrors = validators.fieldset[$fieldset.attr('id')].apply($fieldset[0], [isKeyUp]);
for (var fieldId in fieldsetErrors) {
if (typeof errors[fieldId] === 'undefined') {
errors[fieldId] = [];
}
if (typeof fieldsetErrors[fieldId] === 'string') {
fieldsetErrors[fieldId] = [fieldsetErrors[fieldId]];
}
$.merge(errors[fieldId], fieldsetErrors[fieldId]);
}
}
}
/**
* Validates form field and puts errors in 'errors' object
*
* @param {Element} field
* @param {boolean} isKeyUp
* @param {object} errors
*/
function validateField(field, isKeyUp, errors) {
var args;
var result;
var $field = $(field);
var fieldId = $field.attr('id');
errors[fieldId] = [];
var functions = getFieldValidators(fieldId, isKeyUp);
for (var i = 0; i < functions.length; i++) {
if (typeof functions[i][1] !== 'undefined' && functions[i][1] !== null) {
args = functions[i][1].slice(0);
} else {
args = [];
}
args.unshift(isKeyUp);
result = functions[i][0].apply($field[0], args);
if (result !== true) {
if (typeof result === 'string') {
result = [result];
}
$.merge(errors[fieldId], result);
}
}
}
/**
* Validates form field and parent fieldset
*
* @param {Element} field
* @param {boolean} isKeyUp
*/
function validateFieldAndFieldset(field, isKeyUp) {
var $field = $(field);
var errors = {};
validateField($field, isKeyUp, errors);
validateFieldset($field.closest('fieldset.optbox'), isKeyUp, errors);
displayErrors(errors);
}
function loadInlineConfig() {
if (!Array.isArray(configInlineParams)) {
return;
}
for (var i = 0; i < configInlineParams.length; ++i) {
if (typeof configInlineParams[i] === 'function') {
configInlineParams[i]();
}
}
}
function setupValidation() {
validate = {};
configScriptLoaded = true;
if (configScriptLoaded && typeof configInlineParams !== 'undefined') {
loadInlineConfig();
}
// register validators and mark custom values
var $elements = $('.optbox input[id], .optbox select[id], .optbox textarea[id]');
$elements.each(function () {
markField(this);
var $el = $(this);
$el.on('change', function () {
validateFieldAndFieldset(this, false);
markField(this);
});
var tagName = $el.attr('tagName');
// text fields can be validated after each change
if (tagName === 'INPUT' && $el.attr('type') === 'text') {
$el.on('keyup', function () {
validateFieldAndFieldset($el, true);
markField($el);
});
}
// disable textarea spellcheck
if (tagName === 'TEXTAREA') {
$el.attr('spellcheck', false);
}
});
// check whether we've refreshed a page and browser remembered modified
// form values
var $checkPageRefresh = $('#check_page_refresh');
if ($checkPageRefresh.length === 0 || $checkPageRefresh.val() === '1') {
// run all field validators
var errors = {};
for (var i = 0; i < $elements.length; i++) {
validateField($elements[i], false, errors);
}
// run all fieldset validators
$('fieldset.optbox').each(function () {
validateFieldset(this, false, errors);
});
displayErrors(errors);
} else if ($checkPageRefresh) {
$checkPageRefresh.val('1');
}
}
AJAX.registerOnload('config.js', function () {
setupValidation();
});
//
// END: Form validation and field operations
// ------------------------------------------------------------------
function adjustPrefsNotification() {
var $prefsAutoLoad = $('#prefs_autoload');
var $tableNameControl = $('#table_name_col_no');
var $prefsAutoShowing = $prefsAutoLoad.css('display') !== 'none';
if ($prefsAutoShowing && $tableNameControl.length) {
$tableNameControl.css('top', '55px');
}
}
AJAX.registerOnload('config.js', function () {
adjustPrefsNotification();
});
// ------------------------------------------------------------------
// Form reset buttons
//
AJAX.registerOnload('config.js', function () {
$('.optbox input[type=button][name=submit_reset]').on('click', function () {
var fields = $(this).closest('fieldset').find('input, select, textarea');
for (var i = 0, imax = fields.length; i < imax; i++) {
setFieldValue(fields[i], getFieldType(fields[i]), defaultValues[fields[i].id]);
}
setDisplayError();
});
});
//
// END: Form reset buttons
// ------------------------------------------------------------------
// ------------------------------------------------------------------
// "Restore default" and "set value" buttons
//
/**
* Restores field's default value
*
* @param {string} fieldId
*
* @return {void}
*/
function restoreField(fieldId) {
var $field = $('#' + fieldId);
if ($field.length === 0 || defaultValues[fieldId] === undefined) {
return;
}
setFieldValue($field, getFieldType($field), defaultValues[fieldId]);
}
function setupRestoreField() {
$('div.tab-content').on('mouseenter', '.restore-default, .set-value', function () {
$(this).css('opacity', 1);
}).on('mouseleave', '.restore-default, .set-value', function () {
$(this).css('opacity', 0.25);
}).on('click', '.restore-default, .set-value', function (e) {
e.preventDefault();
var href = $(this).attr('href');
var fieldSel;
if ($(this).hasClass('restore-default')) {
fieldSel = href;
restoreField(fieldSel.substr(1));
} else {
fieldSel = href.match(/^[^=]+/)[0];
var value = href.match(/=(.+)$/)[1];
setFieldValue($(fieldSel), 'text', value);
}
$(fieldSel).trigger('change');
}).find('.restore-default, .set-value')
// inline-block for IE so opacity inheritance works
.css({
display: 'inline-block',
opacity: 0.25
});
}
AJAX.registerOnload('config.js', function () {
setupRestoreField();
});
//
// END: "Restore default" and "set value" buttons
// ------------------------------------------------------------------
// ------------------------------------------------------------------
// User preferences import/export
//
AJAX.registerOnload('config.js', function () {
offerPrefsAutoimport();
var $radios = $('#import_local_storage, #export_local_storage');
if (!$radios.length) {
return;
}
// enable JavaScript dependent fields
$radios.prop('disabled', false).add('#export_text_file, #import_text_file').on('click', function () {
var enableId = $(this).attr('id');
var disableId;
if (enableId.match(/local_storage$/)) {
disableId = enableId.replace(/local_storage$/, 'text_file');
} else {
disableId = enableId.replace(/text_file$/, 'local_storage');
}
$('#opts_' + disableId).addClass('disabled').find('input').prop('disabled', true);
$('#opts_' + enableId).removeClass('disabled').find('input').prop('disabled', false);
});
// detect localStorage state
var lsSupported = isStorageSupported('localStorage', true);
var lsExists = lsSupported ? window.localStorage.config || false : false;
$('div.localStorage-' + (lsSupported ? 'un' : '') + 'supported').hide();
$('div.localStorage-' + (lsExists ? 'empty' : 'exists')).hide();
if (lsExists) {
updatePrefsDate();
}
$('form.prefs-form').on('change', function () {
var $form = $(this);
var disabled = false;
if (!lsSupported) {
disabled = $form.find('input[type=radio][value$=local_storage]').prop('checked');
} else if (!lsExists && $form.attr('name') === 'prefs_import' && $('#import_local_storage')[0].checked) {
disabled = true;
}
$form.find('input[type=submit]').prop('disabled', disabled);
}).on('submit', function (e) {
var $form = $(this);
if ($form.attr('name') === 'prefs_export' && $('#export_local_storage')[0].checked) {
e.preventDefault();
// use AJAX to read JSON settings and save them
savePrefsToLocalStorage($form);
} else if ($form.attr('name') === 'prefs_import' && $('#import_local_storage')[0].checked) {
// set 'json' input and submit form
$form.find('input[name=json]').val(window.localStorage.config);
}
});
$(document).on('click', 'div.click-hide-message', function () {
$(this).hide();
$(this).parent('.card-body').css('height', '');
$(this).parent('.card-body').find('.prefs-form').show();
});
});
/**
* Saves user preferences to localStorage
*
* @param {Element} form
*/
function savePrefsToLocalStorage(form) {
var $form = $(form);
var submit = $form.find('input[type=submit]');
submit.prop('disabled', true);
$.ajax({
url: 'index.php?route=/preferences/manage',
cache: false,
type: 'POST',
data: {
'ajax_request': true,
'server': CommonParams.get('server'),
'submit_get_json': true
},
success: function (data) {
if (typeof data !== 'undefined' && data.success === true) {
window.localStorage.config = data.prefs;
window.localStorage.configMtime = data.mtime;
window.localStorage.configMtimeLocal = new Date().toUTCString();
updatePrefsDate();
$('div.localStorage-empty').hide();
$('div.localStorage-exists').show();
var group = $form.parent('.card-body');
group.css('height', group.height() + 'px');
$form.hide('fast');
$form.prev('.click-hide-message').show('fast');
} else {
Functions.ajaxShowMessage(data.error);
}
},
complete: function () {
submit.prop('disabled', false);
}
});
}
/**
* Updates preferences timestamp in Import form
*/
function updatePrefsDate() {
var d = new Date(window.localStorage.configMtimeLocal);
var msg = Messages.strSavedOn.replace('@DATE@', Functions.formatDateTime(d));
$('#opts_import_local_storage').find('div.localStorage-exists').html(msg);
}
/**
* Prepares message which informs that localStorage preferences are available and can be imported or deleted
*/
function offerPrefsAutoimport() {
var hasConfig = isStorageSupported('localStorage') && (window.localStorage.config || false);
var $cnt = $('#prefs_autoload');
if (!$cnt.length || !hasConfig) {
return;
}
$cnt.find('a').on('click', function (e) {
e.preventDefault();
var $a = $(this);
if ($a.attr('href') === '#no') {
$cnt.remove();
$.post('index.php', {
'server': CommonParams.get('server'),
'prefs_autoload': 'hide'
}, null, 'html');
return;
} else if ($a.attr('href') === '#delete') {
$cnt.remove();
localStorage.clear();
$.post('index.php', {
'server': CommonParams.get('server'),
'prefs_autoload': 'hide'
}, null, 'html');
return;
}
$cnt.find('input[name=json]').val(window.localStorage.config);
$cnt.find('form').trigger('submit');
});
$cnt.show();
}
/**
* @type {boolean} Support for passive event listener option
*/
var PASSIVE_EVENT_LISTENERS = function () {
var passive = false;
try {
var options = Object.defineProperty({}, 'passive', {
get: function () {
return passive = true;
}
});
window.addEventListener('_', null, options);
window.removeEventListener('_', null, options);
} catch (error) {
// passive not supported
}
return passive;
}();

Some files were not shown because too many files have changed in this diff Show More