0

0

Turso libSQL 安装程序

WBOY

WBOY

发布时间:2024-07-15 16:40:43

|

520人浏览过

|

来源于dev.to

转载

你好朋克!是的,我是,在这篇日志中我想与您分享如何在您的 php 环境中安装 libsql,而不必担心在您当前的 php 版本中配置 php.ini 文件。

安装 php 的 libsql 扩展,就像安装 composer 包一样:

composer require vendor/package

安装 php 的 libsql 扩展

turso-php-installer install

turso php installer

无论如何...我想让你知道 punk'in 单文件安装程序脚本如何工作并为你设置它。

帮助命令

您已经在上图中看到了。这就是帮助命令的作用。

安装命令

安装命令在安装 php 的 libsql 扩展之前会做一些必要的检查,会问什么问题? (后台查看)

您使用的是 windows 吗?

尽管 turso client php 具有针对 windows msvc 2022 构建的扩展。但是,使用此安装程序脚本的安装过程不适用于 windows。 wsl 可以工作,或者您可以使用 turso docker php!

如果您使用的是 windows,那么您将收到此消息:

> turso-php-installer install # in windows
sorry, turso php installer is only support for linux and macos.

you are using windows, you can try our alternative using dev containers
visit: https://github.com/darkterminal/turso-docker-php

thank you!

你在使用 laravel herd 吗?

天哪...安装程序还不支持 laravel herd。但我很快就会支持,你可以在 herd 社区 github discussion 上关注这个讨论。

$ turso-php-installer install
you are using laravel herd
sorry, laravel herd is not supported yet.
you can try our alternative using dev containers
visit: https://github.com/darkterminal/turso-docker-php

thank you!

已经安装

有时我忘记什么时候已经安装了。

Cursor
Cursor

一个新的IDE,使用AI来帮助您重构、理解、调试和编写代码。

下载
$ turso-php-installer install
turso client php is already installed and configured!

哪个 php 版本?

适用于 php 的 turso 客户端 php / libsql 扩展至少需要 php 8.0 及更高版本。您可以在 turso client php - release 页面看到它

如果你的 php 低于最低要求,那么就会失败

$ turso-php-installer install
oops! your php version environment does not meet the requirements.
need a minimal php 8.0 installed on your environment.

检查php.ini

需要查找安装程序脚本

$ turso-php-installer install
you don't have php install globaly in your environment
turso client php lookup php.ini file and it's not found

检查所需功能

安装脚本还需要shell_exec和curl函数

$ turso-php-installer install
it looks like the 'shell_exec' and 'curl_version' functions are disabled in your php environment. these functions are essential for this script to work properly.
to enable them, follow these steps:
1. open your 'php.ini' file. you can find the location of your 'php.ini' file by running the command 'php --ini' in your terminal or command prompt.
2. search for 'disable_functions' directive. it might look something like this:
disable_functions = shell_exec, curl_version
3. remove 'shell_exec' and 'curl_version' from this list. it should look like:
disable_functions =
4. save the 'php.ini' file.
5. restart your web server for the changes to take effect. if you are using apache, you can restart it with:
sudo service apache2 restart
or for nginx:
sudo service nginx restart
if you are using a web hosting service, you might need to contact your hosting provider to enable these functions for you.
for more information on 'shell_exec', visit: https://www.php.net/manual/en/function.shell-exec.php
for more information on 'curl_version', visit: https://www.php.net/manual/en/function.curl-version.php
thank you!

请求许可

安装程序需要以sudo角色运行,因为安装程序需要在您的环境中编写php.ini文件。

$ turso-php-installer install
Turso need to install the client extension in your PHP environment.
This script will ask your sudo password to modify your php.ini file:
Are you ok? [y/N]: 

下载并解压

满足所有要求后,安装程序将根据您环境中使用的当前 php 版本下载并提取 php 的 libsql 扩展,并将其存储在 $home/.turso-client-php


使用 turso driver laravel 和 turso doctrine dbal 之前需要扩展

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

WorkBuddy
WorkBuddy

腾讯云推出的AI原生桌面智能体工作台

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
laravel组件介绍
laravel组件介绍

laravel 提供了丰富的组件,包括身份验证、模板引擎、缓存、命令行工具、数据库交互、对象关系映射器、事件处理、文件操作、电子邮件发送、队列管理和数据验证。想了解更多laravel的相关内容,可以阅读本专题下面的文章。

340

2024.04.09

laravel中间件介绍
laravel中间件介绍

laravel 中间件分为五种类型:全局、路由、组、终止和自定。想了解更多laravel中间件的相关内容,可以阅读本专题下面的文章。

293

2024.04.09

laravel使用的设计模式有哪些
laravel使用的设计模式有哪些

laravel使用的设计模式有:1、单例模式;2、工厂方法模式;3、建造者模式;4、适配器模式;5、装饰器模式;6、策略模式;7、观察者模式。想了解更多laravel的相关内容,可以阅读本专题下面的文章。

773

2024.04.09

thinkphp和laravel哪个简单
thinkphp和laravel哪个简单

对于初学者来说,laravel 的入门门槛较低,更易上手,原因包括:1. 更简单的安装和配置;2. 丰富的文档和社区支持;3. 简洁易懂的语法和 api;4. 平缓的学习曲线。本专题为大家提供相关的文章、下载、课程内容,供大家免费下载体验。

385

2024.04.10

laravel入门教程
laravel入门教程

本专题整合了laravel入门教程,想了解更多详细内容,请阅读专题下面的文章。

141

2025.08.05

laravel实战教程
laravel实战教程

本专题整合了laravel实战教程,阅读专题下面的文章了解更多详细内容。

85

2025.08.05

laravel面试题
laravel面试题

本专题整合了laravel面试题相关内容,阅读专题下面的文章了解更多详细内容。

80

2025.08.05

PHP高性能API设计与Laravel服务架构实践
PHP高性能API设计与Laravel服务架构实践

本专题围绕 PHP 在现代 Web 后端开发中的高性能实践展开,重点讲解基于 Laravel 框架构建可扩展 API 服务的核心方法。内容涵盖路由与中间件机制、服务容器与依赖注入、接口版本管理、缓存策略设计以及队列异步处理方案。同时结合高并发场景,深入分析性能瓶颈定位与优化思路,帮助开发者构建稳定、高效、易维护的 PHP 后端服务体系。

575

2026.03.04

TypeScript类型系统进阶与大型前端项目实践
TypeScript类型系统进阶与大型前端项目实践

本专题围绕 TypeScript 在大型前端项目中的应用展开,深入讲解类型系统设计与工程化开发方法。内容包括泛型与高级类型、类型推断机制、声明文件编写、模块化结构设计以及代码规范管理。通过真实项目案例分析,帮助开发者构建类型安全、结构清晰、易维护的前端工程体系,提高团队协作效率与代码质量。

26

2026.03.13

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
PostgreSQL 教程
PostgreSQL 教程

共48课时 | 10.6万人学习

Git 教程
Git 教程

共21课时 | 4.2万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号