php - 银条 MAMP Pro : get_magic_quotes_gpc

标签 php silverstripe php-ini

我正在尝试在运行 MAMP Pro 的本地计算机上安装 Silverstripe 3.1.1。我收到错误:

Warning: get_magic_quotes_gpc support is being removed from Silverstripe. Please set this to off in your php.ini and see http://php.net/manual/en/security.magicquotes.php in xxxxxxxxxx/framework/core/Constants.php on line 142

我正在运行 PHP 5.3.6 我已经检查了我的 php ini 文件,但没有对此的引用。有一个设置为关闭的 magic_quotes_sybase。

如果我运行 PHP 5.2.17,我会得到一个错误:

Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in xxxxxxxxxxxx/framework/main.php on line 117

在 5.2.17 php.ini 文件中,我有一个 magic_quotes_gpc 设置(不是 get_magic_quotes_gpc)。无论将其设置为打开还是关闭,我都会收到上述错误。

我没有得到忽略错误继续安装的选项。只是错误。

有什么想法吗?

最佳答案

您需要 2 个文件(.htaccess 和 php.ini)来关闭 magic_quotes_gpc,

  1. 在.htaccess 文件的顶部添加条目

SetEnv PHPRC/home/limecoke/public_html/php.ini

  1. 创建 php.ini 并添加以下代码

magic_quotes_gpc = 关闭


同时将你的 php 版本设为 5.3,2

如果 php 版本低于 5.3.2 则生成

解析错误:语法错误,意外的 T_FUNCTION,在第 117 行的 xxxxxxxxxxxx/framework/main.php 中期待 ')'

关于php - 银条 MAMP Pro : get_magic_quotes_gpc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19305421/

相关文章:

php - 在哪里可以找到 php.ini?

PHP ini_set ("max_execution_time") 从 exec() 运行脚本时失败

php - 无法更新 Docker 容器中的 php.ini 文件

php - mysql对查询的限制

php - WordPress 包含 ("../../../wp-blog-header");失败

php - 在 laravel 中过滤数据并处理 View

permissions - silverstripe - Assets 文件夹的文件权限

php - SilverStripe CropperField 选项

php - Woocommerce - 从商店页面中删除可用的产品库存编号

php - SilverStripe 硬编码权限设置 EDIT_SITECONFIG