简体   繁体   English

如何在 joomla 的 .htaccess 文件中关闭魔术引号?

[英]how to turn off magic quotes in .htaccess file for joomla?

I started using Joomla 3 and now have problems and on searching i found that magic quotes need to be off for it to function correctly.我开始使用 Joomla 3,现在遇到了问题,在搜索时我发现需要关闭魔术引号才能正常运行。

I put these lines in the .htaccess file我把这些行放在 .htaccess 文件中

php_value magic_quotes 0
php_flag magic_quotes off
php_value magic_quotes_gpc 0
php_flag magic_quotes_gpc off

and Now I am getting Internal Server Error..现在我收到内部服务器错误..

how to disable magic quotes in .htaccess file如何在 .htaccess 文件中禁用魔术引号

in setup.php, change the code:在 setup.php 中,更改代码:

// Check for magic quotes gpc.
$option = new stdClass;
$option->label  = JText::_('INSTL_MAGIC_QUOTES_GPC');
$option->state  = (ini_get('magic_quotes_gpc') == true);
$option->notice = null;
$options[] = $option;

you see, force set to true.... then jol can be install done你看,强制设置为 true .... 然后可以安装 jol

Create a php.ini or php5.ini file with the following:使用以下内容创建 php.ini 或 php5.ini 文件:

magic_quotes_gpc = Off

Put it in your Joomla 3 root.把它放在你的 Joomla 3 根目录中。 Then change the htaccess.txt in your Joomla 3 root to .htaccess.然后将 Joomla 3 根目录中的 htaccess.txt 更改为 .htaccess。 Add the following lines to the .htaccess file (at the top), don't forget to change php.ini to php5.ini when applicable :将以下行添加到 .htaccess 文件(在顶部),不要忘记在适用时将 php.ini 更改为 php5.ini :

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/myusername/public_html/yourJ3folder
  <Files php.ini>
    order allow,deny
    deny from all
  </Files>
</IfModule>

note: dont forget to change suPHP_ConfigPath with your path注意:不要忘记使用您的路径更改 suPHP_ConfigPath

reference from https://docs.joomla.org/How_to_turn_off_magic_quotes_gpc_for_Joomla_3来自https://docs.joomla.org/How_to_turn_off_magic_quotes_gpc_for_Joomla_3 的参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM