php 共享主机和 mod_security

发布于 2024-09-28 13:17:10 字数 503 浏览 0 评论 0原文

我在共享远程主机上使用 copy() 的 php 脚本时遇到困难。我已阅读此处 主机可能根本不允许使用 copy() 函数。我开始了一个故障单,问题已经解决了一半,并归咎于 mod_security。我坚持了下来,现在我的脚本正在运行。修复后的最后一个奇怪的响应是:

“不幸的是,由于这些是共享服务器,我们无法对服务器配置进行任何自定义修改。您可以执行的最多自定义是 PHP 设置。任何与服务器相关的设置都无法修改”。

当这个人说“PHP 设置”时,他指的是什么?请注意,该站点使用 cPanel。

另一个奇怪的事情是我的 php CMS 应用程序。现在正在数据库中加倍编辑(就好像我是插入而不是更新)。我的测试服务器上并非如此。 mod_security 中的修复如何导致 mysql 更新行为不同?

I'm having difficulty with a php script using copy() on a shared remote host. I've read here the host may simply not allow the use of the copy() function. I started a trouble ticket and the trouble was half fixed and blamed on mod_security. I persisted and now my script is working. A strange last response, after the fix was this:

"Unfortunately as these are shared servers we are unable to make any custom modifications to the server configurations. The most customization you can perform are PHP settings. Any server related settings are unable to be modified."

What could this person be referring to when they say "PHP settings"? Note the site uses cPanel.

And another strange thing is my php CMS app. is now doubling edits (as if I was inserting rather than updating) in the database. This is not the case on my test server. How can a fix in mod_security cause mysql updates to behave differently?

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

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

发布评论

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

评论(1

从此见与不见 2024-10-05 13:17:10

当他提到 PHP 设置时,他的意思是用您自己的 php.ini 覆盖服务器 php.ini 文件的某些指令。

When he refers to PHP settings, he means overriding some directives of the server's php.ini file with your own php.ini.

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