An open API service indexing awesome lists of open source software.

https://github.com/tursodatabase/turso-client-php

Turso + PHP - libSQL Extension for PHP (Community SDK)
https://github.com/tursodatabase/turso-client-php

driver extension libsql php sqlite turso

Last synced: about 1 month ago
JSON representation

Turso + PHP - libSQL Extension for PHP (Community SDK)

Awesome Lists containing this project

README

        






Shows a black logo in light color mode and a white one in dark color mode.



Turso + PHP

Turso + PHP (Community SDK)



SQLite for Production. Powered by libSQL.




MIT License




Discord




Contributors




Total downloads




Release


## PHP Versions

| PHP Versions | Build Versions |
| ------------- | ----------------|
| 8.1 | TS / NTS |
| 8.2 | TS / NTS |
| 8.3 | TS / NTS |
| 8.4 | TS / NTS |

**Note**: TS (Thread Safe), NTS (Non Thread-Safe). **Support for:** Linux/ Mac/Darwin / Windows/WSL

---

## Installation

Installing the extension should be not complecated, it's easy and like using **Composer Package Installer**. Or, if you belive with this quotes:

> If there is a hard way, why choose the easy way?
>
> — Me

So you need to go with the **Manual Installation**.

Auto Installer
turso-php-installer is a Composer package capable of executing various commands related to libSQL, simplifying the development process, and making it easier to simulate in a local environment.

```bash
composer global require darkterminal/turso-php-installer
```
Add to `PATH` variable:
```bash
export COMPOSER_BIN_DIR=$(composer config --global home)/vendor/bin
```

We have two options to install the extension using the installer:

**Interactive Mode**
```bash
turso-php-installer install
```

---

**Non-interactive Mode**
```bash
turso-php-installer install -y --php-version=8.3
```

Manual Installation

Download the latest build extension/driver binary you can see at release page.

- 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

Check on your console/terminal

```bash
php --m | grep libsql
```

## Contributors

![Contributors](https://contrib.nn.ci/api?no_bot=true&repo=tursodatabase/turso-client-php)

## License

The MIT License (MIT). Please see [License File](LICENSE) for more information.