1
0
Fork 0

Update for PHP 8.4 and my needs (packaging happens elsewhere)

This commit is contained in:
Miguel Jacq 2025-10-13 10:45:01 +11:00
parent 96df2f4362
commit 89fe566573
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
11 changed files with 27 additions and 787 deletions

View file

@ -1,19 +1,17 @@
# PDO SQLCipher
[English version](https://github.com/abbat/pdo_sqlcipher/blob/master/README.en.md)
A driver for implementing [PDO](http://php.net/manual/en/book.pdo.php) (PHP Data Objects) interface for [SQLCipher](http://sqlcipher.net) without replacing genuine PDO SQLite or the system version of [SQLite](http://www.sqlite.org/). It's based on PDO SQLite source code and created by simply replacing names and inserting SQLCipher code (instead of dynamic linking with SQLite libraries).
Драйвер, реализующий интерфейс [PDO](http://php.net/manual/en/book.pdo.php) (PHP Data Objects) для [SQLCipher](http://sqlcipher.net) без замещения оригинальной версии PDO SQLite или системной версии [SQLite](http://www.sqlite.org/). Основан на оригинальном коде PDO SQLite путем простого замещения имен и встраиванием кода SQLCipher (вместо динамической линковки с библиотеками SQLite).
A detachment of this kind allows granting access to encrypted databases only to applications that obviously need it, without fear of data loss or slowing down other applications.
Подобное разделение позволяет работать с шифрованными базами только тем приложениям, которые в этом явно нуждаются не опасаясь потери данных или замедления работы остальных приложений.
## Assembling
## Сборка
To assemble this extension, run `build.sh` script. After successful assembly, all the necessary files will be placed in the directory named `release`:
Для сборки расширения запустите скрипт `build.sh`. После успешной сборки необходимые файлы будут помещены в директорию `release`:
* `sqlcipher` - console client (equivalent of `sqlite3` client)
* `pdo_sqlcipher.so` - php extension (equivalent of `pdo_sqlite.so` extension)
* `sqlcipher` - консольный клиент (аналогичный клиенту `sqlite3`)
* `pdo_sqlcipher.so` - расширение php (аналогичное расширению `pdo_sqlite.so`)
Для сборки под Debain могут потребоваться (помимо стандартных) следующие dev пакеты:
If assembling is performed under Debain, the following dev packages may be required (in addition to standard):
* `libicu-dev`
* `libreadline-dev`
@ -21,7 +19,7 @@
* `php5-dev`
* `tcl-dev`
Для сборки под RHEL могут потребоваться (помимо стандартных) следующие dev пакеты:
If assembling is performed under RHEL, the following dev packages may be required (in addition to standard):
* `libicu-devel`
* `readline-devel`
@ -29,21 +27,21 @@
* `php-devel`
* `tcl-devel`
Для сборки под FreeBSD может потребоваться установка порта `lang/tcl-wrapper` (для поддержки `tclsh`).
If assembling is performed under FreeBSD, `lang/tcl-wrapper` port installation may be required (to support `tclsh`).
Скрипт сборки протестирован на Debian Wheezy (PHP 5.4.4-14) и FreeBSD 9.1 (PHP 5.4.13)
Assembling script was tested under Debian Wheezy (PHP 5.4.4-14) and FreeBSD 9.1 (PHP 5.4.13)
## Установка
## Installation
Для установки расширения скопируйте файлы из директории `release`:
Install this extension by copying files from the `release` directory:
* `sqlcipher` в директорию `/usr/local/bin/`
* `pdo_sqlcipher.so` в директорию модулей php (зависит от дистрибутива):
* `sqlcipher` to the `/usr/local/bin/` directory
* `pdo_sqlcipher.so` to the directory of php modules (depends on specific distro):
* Debian: `/usr/lib/php5/20100525/`
* RHEL: `/usr/lib64/php/modules/`
* FreeBSD: `/usr/local/lib/php/20100525/`
И подключите расширение php:
And enable the php extension:
```
extension=pdo_sqlcipher.so
@ -53,4 +51,4 @@ extension=pdo_sqlcipher.so
* RHEL: `/etc/php.d/pdo_sqlcipher.ini`
* FreeBSD: `/usr/local/etc/php/extensions.ini`
Пример использования расширения можно найти в файле `example.php` репозитория.
You can find an example of extension usage in `example.php` file within the repository.