

LibSQL Extension
LibSQL Extension for PHP GitHub Repository
libSQL is an open source, open contribution fork of SQLite, created and maintained by Turso. We aim to evolve it to suit many more use cases than SQLite was originally designed for, and plan to use third-party OSS code wherever it makes sense. libSQL is licensed under an Open Source License, and we adhere to a clear Code of Conduct.
This extension build using Rust Programming Language and using ext-php-rs framework to create new PHP Extension.
Features
- Embedded replicas that allow you to have replicated database inside your app.
- libSQL server for remote SQLite access, similar to PostgreSQL or MySQL
- Supports Rust, JavaScript, Python, Go, PHP, and more.
Download
Download the latest build extension binary you can see at Release page. Itโs available for:- Linux
- Mac/Darwin
- Windows
Install using Composer
You can install the libSQL Extension just like using NVM (Node Version Manager). With the installer, you can:- Select the PHP version
- PHP Thread-Safe/Non Thread-Safe build version
- stable (
tursodatabase/turso-client-php
) or unstable (pandanotabear/turso-client-php
)
turso-php-installer
.
Read more details about turso-php-installer
Manual Installation
- ๐ฆ Extract the archive
- ๐ Locate somewhere in your machine
- ๐ฝ Copy a relative path that address that extension/driver
- ๐ Open
php.ini
search;extension
if you using nano (ctrl+w) then searching for it - ๐ add in the next-line
extension=liblibsql_php.so
(in Linux) without;
at the begining
LibSQL
class in your PHP code!