PHP Velho Oeste 2024

実行時設定

php.ini の設定により動作が変化します。

SQLite設定オプション
名前 デフォルト 変更の可否 変更履歴
sqlite.assoc_case 0 PHP_INI_ALL PHP 5.0.0 から利用可能です
PHP_INI_* モードの詳細および定義については どこで設定を行うのか を参照してください。

以下に設定ディレクティブに関する 簡単な説明を示します。

sqlite.assoc_case int

ハッシュのインデックスに大文字小文字混用(0)、 大文字(1)、小文字 (2)のど れを使用するかを指定します。

このオプションは、データベーススキーマ中での実際のフィールド名の ケースによらず、カラム名が常に大文字または小文字で返されるような 他のデータベースシステムとの互換性が必要な場合に特に有用です。

SQLiteライブラリは、カラム名をそのままのケース(これは、 スキーマで使用したケースに一致します)で返します。 sqlite.assoc_case0 を指定した場合、そのままのケースは保持されます。このオプションを 1 または 2 に設定した場合、 PHPはハッシュキーのケースをそれぞれ大文字または小文字のキーに変 換します。

このオプションを使用することで若干の性能劣化がありますが、 PHPスクリプトで自分で大文字/小文字変換を行うよりはかなり高速です。

add a note add a note

User Contributed Notes 1 note

up
-1
S dot Kien at online dot de
14 years ago
Note, that it is not enought to grant write access to the SQLite database file. Because SQLite creates a journal file in the directory, the database is located. For that reason write acces to this directory is needed as well.

If no write access to the directory is allowed, it is already posible to open database and read data, but first write operation (INSERT,UPDATE, DELETE, CREATE xxx,..) results in error "unable to open database file" (even though the database file already opened for reading...)
To Top