正如这里讨论的:
mysqli works when run directly but not when via js-ajax
原文链接:https://www.f2er.com/php/134369.htmlmysqli works when run directly but not when via js-ajax
我可能需要在我的webserver PHP副本中启用MysqLi.
它已在命令行中启用.
我怎么弄清楚是否在特定的PHP拷贝中启用了MysqLi,
如果不是,我该如何安装呢?
我的网络服务器正在运行Ubuntu 14.04.2 LTS.
extension=MysqLi.so extension=pdo_MysqL.so extension=PHP_MysqLi.so
我已经尝试单独运行它们,重新启动MysqL和apache,运行sudo PHP5enmod MysqLi然后我再次运行该页面,但同样的错误一直在/var/log/apache/error.log中弹出:
PHP Fatal error: Class 'MysqLi' not found in /var/www/html/..
除非我从服务器端运行insert.PHP,否则不会将任何内容添加到sql表中.
当我在PHP.ini文件中有所有三个扩展名时,我得到以下错误:
Failed loading /usr/lib64/PHP/modules/ioncube_loader_lin.so: /usr/lib64/PHP/modules/ioncube_loader_lin.so: cannot open shared object file: No such file or directory Failed loading /usr/lib64/PHP/modules/ixed.lin: /usr/lib64/PHP/modules/ixed.lin: cannot open shared object file: No such file or directory Failed loading /usr/lib64/PHP/modules/ZendOptimizer.so: /usr/lib64/PHP/modules/ZendOptimizer.so: cannot open shared object file: No such file or directory Failed loading /usr/lib64/PHP/modules/opcache.so: /usr/lib64/PHP/modules/opcache.so: cannot open shared object file: No such file or directory