postfixadmin添加任何域都提示已经存在的解决办…

2009-05-13 15:15:11来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

用postfixadmin来管理
[url=javascript:;]postfix[/url]
,可是不论我输入什么名字来添加域,都会提示“该域已经存在”,查了N遍配置,都没有问题,最后还是在postfixadmin官网上找到了答案,需要把
[url=javascript:;]php[/url]
.ini里面的magic_quotes_gpc选项打开,照做以后可以添加域、用户等了。
关于magic_quotes_gpc选项,查阅了很多资料,总结一下:
先看下
[url=javascript:;]手册[/url]
上怎么说的吧!
对一般人来说看下前两段就可以了
Magic Quotes
PHP代码
Magic Quotes is a process that automagically escapes incoming data to the PHP script. It’s preferred to code with magic quotes off and to instead escape the data at runtime, as needed.


    • What are Magic Quotes
      PHP代码
      When on, all‘ (single-quote),” (double quote),\ (backslash)and NULL characters are escaped with a backslash automatically. This is identical to what addslashes() does.
      There are three magic quote directives:
      magic_quotes_gpc
      Affects HTTP Request data (GET, POST, and COOKIE). Cannot be set at runtime, and defaults to on in PHP.
      magic_quotes_runtime
      If enabled,most functionsthat returndatafrom an external source, including databases and text files, will have quotes escaped with a backslash. Can be set at runtime, and defaults to off in PHP.
      magic_quotes_sybase
    • If enabled, a single-quote is escaped with a single-quote instead of a backslash. If on, it completely overrides magic_quotes_gpc. Having both directives enabled means only single quotes are escaped as ‘‘. Double quotes, backslashes and NULL’s will remain untouched and unescaped.

        [url=mk:@MSITStore:E:\php\php5英文.chm::/fancy/security.magicquotes.why.html]Why use Magic Quotes[/url]
        PHP代码
        Useful forbeginners
        Magic quotes are implemented in PHP to help code written by beginners from being dangerous. AlthoughSQL Injectionis still possible with magic quotes on, the risk is reduced.
        Convenience
        For inserting data into a database, magic quotes essentially runs addslashes() on all Get, Post, and Cookie data, and does so automagically.


        • [url=mk:@MSITStore:E:\php\php5英文.chm::/fancy/security.magicquotes.whynot.html]Why not to use Magic Quotes[/url]
          PHP代码
          Portability
          Assuming it to be on, or off, affects portability. Use get_magic_quotes_gpc() to check for this, and code accordingly.
          Performance
          Because not every piece of escaped data is inserted into a database, there is a performance loss for escaping all this data. Simply calling on the escaping functions (like addslashes()) at runtime is more efficient.

          标签:

          版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
          特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

        • 上一篇:qemu基础介绍

          下一篇:FreeBSD下authlib出现Input/output error的分析及解决一例