SQLite 的纯 PHP 实现?
是否有可以在 PHP 5.1.6 上运行的 SQLite 的纯 PHP 实现?我正在开发一个应用程序,该应用程序将受益于能够在关系数据库中存储数据,但它必须运行的服务器被 PHP 5.1.6 困住,并且已配置为“'--without-sqlite”
我有无法控制该服务器;除了使用 .htaccess 文件之外,无法重新编译、升级或以其他方式修改 PHP。不幸的是,外部托管也不是一种选择。 MySQL 或许可行,但试图让他们的 IT 部门为我创建数据库将是一场噩梦。 (由于繁文缛节和其他原因,他们花了 6 周的时间才启用 .htaccess 文件)
我运气不好吗?我的退路是将所有内容写入平面文件,但我真的不想这样做。
编辑:修正了拼写错误。 PHP 没有 SQLite 扩展,根据 phpinfo() 的输出配置为“'--without-sqlite”
Is there a pure PHP implementation of SQLite that will run on PHP 5.1.6? I am working on an application that would benefit from being able to store data in a relational database, but the server that it has to run on is stuck with PHP 5.1.6 and has been configured "'--without-sqlite"
I have no control over this server; cannot recompile, upgrade or otherwise modify PHP aside from using .htaccess files. Hosting externally is also not an option, unfortunately. MySQL may be possible but would be a nightmare trying to get their IT to create a database for me. (It took them 6 weeks to get .htaccess files enabled because of red tape and other things)
Am I out of luck? My fall back is to write everything to flat files but I really would rather not do that.
EDIT: Fixed typo. PHP does not have the SQLite extension and was configured "'--without-sqlite" according to the output of phpinfo()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,您可以轻松地下载并安装 sqlite 在您的用户空间中,无论是在 Windows 上还是在 Linux 远程上shell 通常并不重要,除非您的主机受到异常限制,如果是这种情况,您应该更换服务提供商。
安装 sqlite 后,您可以使用可用的 pear 扩展 或 pecl 扩展 允许通过 php 轻松访问。
Actually, you could easily download and install sqlite in your userspace, whether on windows or on a linux remote shell doesn t usually matter unless your host is unusually restrictive, if that is the case you should change service provider.
Once sqlite is installed, you can one of the available pear extensions or pecl extension to allow easy access through php.