douzhajie7168 2012-12-26 02:30
浏览 63
已采纳

为什么PHP在运行脚本时不会看到sqlite库?

I'm trying to make something with PHP and sqlite. I've got both the sqlite3 and pdo_sqlite3 libraries loaded (according to php -m), the php.ini gets the libraries added, but I still get the fatal error that the function (whether it's sqlite_open() or sqlite_versioninfo()) isn't found. phpinfo() shows that both libraries are loaded. So why can't I use them?

Some info about my setup:

I'm running on debian, I'm running Apache2 and PHP 5.4.4-4. I can't remember how I installed PHP (apparently not through apt-get), but it's launched through Apache.

The output of php -m:

root@ns:~# php -m [PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gettext hash iconv imagick json libxml mbstring mhash mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session shmop SimpleXML soap sockets SPL sqlite3 ssh2 standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib

[Zend Modules]

The exact error text is PHP Fatal error: Call to undefined function sqlite_libversion() in [file] on line 14 and it occurs both through the command line and the webserver.

If I think of anything else to add, I'll add it here.

  • 写回答

2条回答 默认 最新

  • dtla92562 2012-12-26 02:57
    关注

    Your using functions from the sqlite extension, but you enabled the separate sqlite3 extension.

    and pdo_sqlite3 is only for pdo.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 fluent里模拟降膜反应的UDF编写
  • ¥15 MYSQL 多表拼接link
  • ¥15 关于某款2.13寸墨水屏的问题
  • ¥15 obsidian的中文层级自动编号
  • ¥15 同一个网口一个电脑连接有网,另一个电脑连接没网
  • ¥15 神经网络模型一直不能上GPU
  • ¥15 pyqt怎么把滑块和输入框相互绑定,求解决!
  • ¥20 wpf datagrid单元闪烁效果失灵
  • ¥15 券商软件上市公司信息获取问题
  • ¥100 ensp启动设备蓝屏,代码clock_watchdog_timeout