如何在我的托管提供商中启用 pdo 扩展

发布于 2024-09-19 08:16:44 字数 147 浏览 4 评论 0原文

1)我的整个应用程序是使用 sqlite 基于 PDO 构建的

我的问题: 托管提供商已禁用 PDO

  • 我想知道如何让 PDO 扩展在我的托管提供商上工作。托管提供商似乎没有回应我的询问。那么有什么方法可以远程完成此操作吗?

1) My whole application is built on PDO with sqlite

My Problem:
The hosting provider has PDO --disabled

  • I want to know how I can get PDO extensions to work on my hosting provider. The hosting provider just doesn't seem to respond to my queries. So is there any way i can do this remotely.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦幻之岛 2024-09-26 08:16:44

这取决于您的托管提供商支持哪些功能以及您切换的意愿。

理想情况下,您需要切换,因为任何不提供 PDO 的网络主机也可能在其他地方犯下严重的错误。 (PDO 是在 PHP 中使用参数化 SQL 来防止 SQL 注入攻击的推荐方法)

如果您不想切换,最简单的解决方案可能是遵循 PEAR 的指南 设置本地 PEAR 安装,然后运行 ​​pear install pdo

如果您的主机允许自定义 HTTP 守护进程 (Apache) 设置,那么技术上更正确但更复杂的解决方案是在启用 PDO 的情况下在您的 homedir 中构建您自己的 mod_php 并使用它。 (据我所知,使用 PHP 中包含的 PDO 是捆绑它的版本的推荐解决方案)

如果您无法设置自定义 Apache 实例,您可以尝试的另一个选择是构建自定义 PHP,然后使用 .htaccess 通过 FastCGI 运行它

除此之外我想不出任何选择。

It depends on what functionality your hosting provider supports and how willing you are to switch.

Ideally, you'll want to switch since any webhost that doesn't offer PDO is also probably making nasty mistakes elsewhere too. (PDO is the recommended way to use parameterized SQL with PHP to prevent SQL injection attacks)

If you don't want to switch, the simplest solution is probably to follow PEAR's guide to setting up a local PEAR install and then to run pear install pdo.

A more technically correct but more involved solution, if your host allows custom HTTP daemon (Apache) setups is to build your own mod_php in your homedir with PDO enabled and use that. (Using the PDO included with PHP is, as far as I know, the recommended solution for versions that bundle it)

Another option you could try if you can't set up a custom Apache instance is to build a custom PHP but then use .htaccess to run it via FastCGI.

I can't think of any options other than that.

铁憨憨 2024-09-26 08:16:44

如果这是共享主机,那么您的网络主机必须允许此类功能。联系他们并解释您的需求。如果他们找不到与他们见面的方式,或者您的疑问仍然得不到答复,请更换主持人。它们的数量不计其数。

If this is shared hosting, then your web host must allow such functionality. Contact them and explain your needs. If they can't find a way to meet them or your queries continue to go unanswered, switch hosts. There's a gazillion of them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文