如何使用PHP在OS X 10.5.8中启用Sqlite3? [英] How do I enable Sqlite3 in OS X 10.5.8 with PHP?

查看:87
本文介绍了如何使用PHP在OS X 10.5.8中启用Sqlite3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的MAMP堆栈上安装Symfony框架.但是,当我尝试运行它时,Symfony抱怨我需要安装并启用SQLite3或PDO_SQLite扩展".我不知道该怎么做.我已经安装了sqlite3

I want to install the Symfony framework on my MAMP stack. However, when I try to run it, Symfony complains that I need to "Install and enable the SQLite3 or PDO_SQLite extension." I don't know how to do this. I have sqlite3 installed

$ sqlite3 --version
3.4.0

我也有php 5.3.6.我看到有一个名为php5-sqlite3的MacPorts软件包,但它被标记为过时的端口".

Also I have php 5.3.6. I see that there is a MacPorts package called php5-sqlite3, but it is marked "obsolete port."

在MAMP上启用sqlite3扩展的正确方法是什么?我有豹10.5.8.

What is the correct way to enable the sqlite3 extension on MAMP? I have Leopard 10.5.8.

编辑:我最终通过安装MacPorts软件包php5-sqlite(不带3)解决了该问题.然后它仍然不起作用.然后,我使用+ sqlite重新安装了MacPorts php5软件包.然后一切正常.所以,就是这样:

I ended up solving the problem by installing the MacPorts package php5-sqlite (without the 3). Then it still didn't work. Then I reinstalled the MacPorts php5 package using +sqlite. Then everything worked. So, that's:

$ sudo port install php5-sqlite
$ sudo port uninstall php5
$ sudo port install php5 +apache2 +sqlite

我希望能对偶然发现此问题的任何人有所帮助...

I hope that'll help anyone who stumbles onto this...

推荐答案

我最终通过安装MacPorts软件包php5-sqlite(不含3)解决了该问题.然后它仍然不起作用.然后,我使用+ sqlite重新安装了MacPorts php5软件包.然后一切正常.所以,就是这样:

I ended up solving the problem by installing the MacPorts package php5-sqlite (without the 3). Then it still didn't work. Then I reinstalled the MacPorts php5 package using +sqlite. Then everything worked. So, that's:

$ sudo port install php5-sqlite
$ sudo port uninstall php5
$ sudo port install php5 +apache2 +sqlite

我希望能对偶然发现此问题的任何人有所帮助...

I hope that'll help anyone who stumbles onto this...

这篇关于如何使用PHP在OS X 10.5.8中启用Sqlite3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆