|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <!-- $Revision$ --> |
3 | 3 |
|
4 | | - <reference xml:id="ref.pdo-sqlite" xmlns="http://docbook.org/ns/docbook"> |
| 4 | + <reference xml:id="ref.pdo-sqlite" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
5 | 5 | <?phpdoc extension-membership="bundledexternal" ?> |
6 | 6 | <title>SQLite PDO Driver (PDO_SQLITE)</title> |
7 | 7 | <titleabbrev>SQLite PDO Driver</titleabbrev> |
|
54 | 54 | to the DSN prefix. |
55 | 55 | </para> |
56 | 56 | </listitem> |
| 57 | + <listitem> |
| 58 | + <simpara> |
| 59 | + A DSN starting with <literal>file:</literal> after the DSN prefix |
| 60 | + is passed to SQLite unchanged as a |
| 61 | + <link xlink:href="&url.sqlite;uri.html">URI filename</link>. |
| 62 | + Its query parameters set options, e.g. <literal>mode=ro</literal> |
| 63 | + opens the database read-only, and unknown parameters are ignored. |
| 64 | + URI filenames are not available if |
| 65 | + <link linkend="ini.open-basedir">open_basedir</link> is set. |
| 66 | + </simpara> |
| 67 | + <caution> |
| 68 | + <simpara> |
| 69 | + A URI filename can name any file regardless of the end of the DSN, |
| 70 | + e.g. <literal>sqlite:file:/var/www/data.php?x=.db</literal> opens |
| 71 | + <filename>/var/www/data.php</filename>. |
| 72 | + A DSN built from user input should therefore not be allowed to |
| 73 | + start with <literal>file:</literal>. |
| 74 | + </simpara> |
| 75 | + </caution> |
| 76 | + </listitem> |
57 | 77 | <listitem> |
58 | 78 | <para> |
59 | 79 | If the DSN consists of the DSN prefix only, a temporary database is used, |
|
67 | 87 | </variablelist> |
68 | 88 | </para> |
69 | 89 | </refsect1> |
| 90 | + <refsect1 role="changelog"> |
| 91 | + &reftitle.changelog; |
| 92 | + <informaltable> |
| 93 | + <tgroup cols="2"> |
| 94 | + <thead> |
| 95 | + <row> |
| 96 | + <entry>&Version;</entry> |
| 97 | + <entry>&Description;</entry> |
| 98 | + </row> |
| 99 | + </thead> |
| 100 | + <tbody> |
| 101 | + <row> |
| 102 | + <entry>8.1.0</entry> |
| 103 | + <entry> |
| 104 | + Added support for <literal>file:</literal> URI filenames. |
| 105 | + </entry> |
| 106 | + </row> |
| 107 | + </tbody> |
| 108 | + </tgroup> |
| 109 | + </informaltable> |
| 110 | + </refsect1> |
70 | 111 | <refsect1 role="examples"> |
71 | 112 | &reftitle.examples; |
72 | 113 | <para> |
|
78 | 119 | <programlisting> |
79 | 120 | <![CDATA[ |
80 | 121 | sqlite:/opt/databases/mydb.sq3 |
| 122 | +sqlite:file:/opt/databases/mydb.sq3?mode=ro |
81 | 123 | sqlite::memory: |
82 | 124 | sqlite: |
83 | 125 | ]]> |
|
0 commit comments