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条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!