dream07769 2013-12-02 07:20
浏览 106
已采纳

如何在Ubuntu 13.10上安装PHP PECL扩展“SQLite”

I tried installing using the PECL command from documentation:

$ sudo pecl install SQLite [sudo] password for bogdanbiv: downloading SQLite-1.0.3.tgz ... Starting to download SQLite-1.0.3.tgz (371,189 bytes) .......done: 371,189 bytes 50 source files, building running: phpize Cannot find config.m4. Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

So I tried to download the package manually:

$ sudo pecl download SQLite File /home/$USER/Downloads/SQLite-1.0.3.tgz downloaded

These were the first files listed in the archive:

$ tar -tzf SQLite-1.0.3.tgz

package.xml
SQLite-1.0.3/config.m4 ### config.m4 is in the archive, why isn't it found?
SQLite-1.0.3/sqlite.c
SQLite-1.0.3/sqlite.dsp
SQLite-.0.3/php_sqlite.h ...

So I unpacked the archive to folder /usr/share/php/SQLite-1.0.3.

/usr/share/php/SQLite-1.0.3$ sudo phpize Configuring for: PHP Api Version: 20121113 Zend Module Api No: 20121212 Zend Extension Api No: 220121212

After running phpize I would expect PHP to load the SQLite extention, but the only place it appears in the phpinfo page is in the Module Authors (credits). Tried restarting Ubuntu, but even after a restart PHP does not find SQLite.

I am using PECL version only because I saw it as the recomended way to install the PHP SQLite extension. I also tried earlier to install SQLite from Ubuntu packages, also unsuccessful, I will ask that in a separate question.

Disclaimer: I read that using SQLite with sqlite_open is supposed to be deprecated, I just need it to get past an example without which I am blocked.

  • 写回答

1条回答 默认 最新

  • douluan4644 2013-12-02 07:31
    关注

    I am using PECL version only because I saw it as the recomended way to install the PHP SQLite extension.

    You should not be using the PECL version of this extension, as sqlite support is now part of PHP.

    For saucy, install the php5-sqlite package.

    Installing the sqlite package directly will only install the client and not any integrations or libraries.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么