我正在尝试在运行 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,
- 在.htaccess 文件的顶部添加条目
SetEnv PHPRC/home/limecoke/public_html/php.ini
- 创建 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/