php-doc-en/reference/sqlite/setup.xml
Torben Wilson af4410a7e1 Normalized the sgml-default-dtd-file local-variable line for those
still using this, after discussion on the phpdoc list.
From now on, manual.ced will need to be found at ~/.phpdoc/manual.ced.



git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288721 c90b9560-bf6c-de11-be94-00142212c4b1
2009-09-25 07:04:39 +00:00

138 lines
4.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="sqlite.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="sqlite.requirements">
&reftitle.required;
<para>
The SQLite extension is enabled by default as of PHP 5. Before that
time the SQLite library is needed.
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation -->
<section xml:id="sqlite.installation">
&reftitle.install;
<para>
As of PHP 5 this extension is enabled by default, so simply do not
disable it and it'll be available.
</para>
<caution>
<para>
Do not use the PECL version of this extension, as it is
unmaintained. Always use the SQLite extension that comes with
the PHP sources even while compiling as shared. In this case
the sources are in <literal>php-src-dir/ext/sqlite</literal>
and the <link linkend="install.pecl.phpize">phpize</link>
method of building applies.
</para>
</caution>
<para>
Windows users must enable <filename>php_sqlite.dll</filename> inside
of &php.ini; in order to use these functions.
&pecl.windows.download;
</para>
<para>
Windows builds must also enable PDO because as of PHP 5.1.0 it depends
on it. So, &php.ini; will end up with something like this:
<informalexample>
<programlisting role="ini">
<![CDATA[
extension=php_pdo.dll
extension=php_sqlite.dll
]]>
</programlisting>
</informalexample>
On Linux or Unix operating systems, if you build PDO as a shared
extension, you must build SQLite as a shared extension using the
<command>--with-sqlite=shared</command> configure option.
</para>
<para>
The PHP 5.0.x series of Windows builds enabled this extension by
default, where no <acronym>DLL</acronym> file is necessary.
</para>
<para>
SQLite 3 is supported through <link
linkend="ref.pdo-sqlite">PDO SQLite</link>.
</para>
<note>
<title>Windows installation for unprivileged accounts</title>
<para>
On Windows operating systems, unprivileged accounts don't have the
<varname>TMP</varname> environment variable set by default. This will
make sqlite create temporary files in the windows directory, which is
not desirable. So, you should set the <varname>TMP</varname> environment
variable for the web server or the user account the web server is
running under. If Apache is your web server, you can accomplish this via
a <command>SetEnv</command> directive in your &httpd.conf; file. For
example:
<informalexample>
<programlisting role="apache-conf">
<![CDATA[
SetEnv TMP c:/temp
]]>
</programlisting>
</informalexample>
If you are unable to establish this setting at the server
level, you can implement the setting in your script:
<informalexample>
<programlisting role="php">
<![CDATA[
putenv('TMP=C:/temp');
]]>
</programlisting>
</informalexample>
The setting must refer to a directory that the web server
has permission to create files in and subsequently write
to and delete the files it created.
Otherwise, you may receive the following error message:
<computeroutput>
malformed database schema -
unable to open a temporary database file for storing temporary tables
</computeroutput>
</para>
</note>
</section>
<!-- }}} -->
<!-- {{{ Configuration -->
&reference.sqlite.ini;
<!-- }}} -->
<!-- {{{ Resources -->
<section xml:id="sqlite.resources">
&reftitle.resources;
<para>
There are two resources used in the SQLite Interface. The first one is the
database connection, the second one the result set.
</para>
</section>
<!-- }}} -->
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->