Jump to:

4873 Posts in 7171 Topics by 1471 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Magic quotes warning at install

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 3123 Views
  • theoldlr
    Avatar
    Community Member
    103 Posts

    Magic quotes warning at install Link to this post

    I have seen this before and always ignored it without any problems, but today I got curious... The warning:

    Titled: magic_quotes_gpc option turned off
    Description:
    magic_quotes_gpc is set to '1' in php.ini. This should be turned off, as it can cause issues with cookies. More specifically, unserializing data stored in cookies.

    In my .htaccess file I tried each of the following:

    php_value magic_quotes_gpc 1
    php_value magic_quotes_gpc 0
    php_value magic_quotes_gpc off

    Each time the Description of the warning changed to reflect what value I had set, but it never went away. Is this cause I edited .htaccess and not php.ini? This is a pretty silly error message :

    magic_quotes_gpc is set to 'off' in php.ini. This should be turned off, as it can cause issues with cookies. More specifically, unserializing data stored in cookies.

    Thanks!

  • Velocy
    Avatar
    Community Member
    3 Posts

    Re: Magic quotes warning at install Link to this post

    Actually... are you allowing to override the configuration in the httpd.conf via AllowOverride?

  • tchintchie
    Avatar
    Community Member
    63 Posts

    Re: Magic quotes warning at install Link to this post

    I get the same warning even if i set the magic_quotes_gpc to Off! It just won´t disappear. Is there a solution or can I just proceed with the install ignoring that warning?

  • tchintchie
    Avatar
    Community Member
    63 Posts

    Re: Magic quotes warning at install Link to this post

    aaah so simple it´s almost embarassing.... since I´m using MAMP PRO I found the solution here http://forum.mamp.info/viewtopic.php?f=2&t=6770 that fixed the final warning and I could install SS with "green lights" for the first time

    so if anyone using MAMP discovered the same warning at install check out the above link!

  • JMagnusson
    Avatar
    Community Member
    29 Posts

    Re: Magic quotes warning at install Link to this post

    I have the same problem, but not on MAMP but on a hosted server. It says: magic_quotes_gpc is set to 'off' in php.ini. This should be turned off...

    Hove someone solved this?
    How can i check if magic_quotes_gpc really is checked off? I dont know so much about these things...

    Thanks,
    Johan Magnusson

  • martimiz
    Avatar
    Forum Moderator
    1037 Posts

    Re: Magic quotes warning at install Link to this post

    I think it might have something to do with the way ini_get() interpretes php settings. If set to 'Off' within php.ini, ini_get() will return an emty string, and that's what the SS install script is checking on (Install.php, around line 386).

    It seems that if you set magic_quotes_gpc to 'Off' (or false or 0) anywhere else, ini_get() might retrieve the 'real' value. And as 'Off' is not an empty string, the install check will fail. So if it says 'Off' in the warning, just go ahead and install, I guess...

  • JMagnusson
    Avatar
    Community Member
    29 Posts

    Re: Magic quotes warning at install Link to this post

    Wow, thanks!

    Is there a way to check if it really is set to Off? Not the way that install is doing, but the right way?
    As said, I don't know so much about these things.

    /Johan Magnusson

  • martimiz
    Avatar
    Forum Moderator
    1037 Posts

    Re: Magic quotes warning at install Link to this post

    I think you can always phpinfo() would tell you. You likely know this, but just in case: create a php file in the site root like this:

    <?php
    phpinfo();

    I suppose it'll pick up .htaccess settings as well. Not the ones you make in SilverStripe configs though...

    3123 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.