Page 1 of 1

Not Acceptable, '%' breaks my site! solved

Posted: Sat Mar 06, 2010 2:21 pm
by scarface222
see last post

Re: Not Acceptable, need expert advice

Posted: Sat Mar 06, 2010 10:44 pm
by infolock
Are you checking that the cookie value doesn't exist yet before you try to set the cookie value?

As for ob_start (output buffering), it basically allows you to either a) control when/where output data (ie: echo out a string) happens during the processing of your php script. you can read more about it here: ob_start

Also, if you view the PHP manual page for SetCookie, there is a lot of good information in not only the manual's description of the function, but also user-contributed notes that you can find below the manual's description.

Re: Not Acceptable, need expert advice

Posted: Sun Mar 07, 2010 11:31 am
by scarface222
thanks man you were right about the cookie values being the same. I just have one more question. Every time there is a ?q=% in any of my urls, the site gives the error. I tried the same thing on other sites and the error did not happen does this mean they have modsecurity off? Is there a way around this issue?

Re: Not Acceptable, '%' breaks my site!

Posted: Sun Mar 07, 2010 9:24 pm
by infolock
I'm not sure about the "%" symbol, but it may be because it's trying to filter out url redirects from the URL. This is something a lot of sites (on the server side of things that is) do to prevent malicious scripts from trying to load off-site scripts.

Re: Not Acceptable, '%' breaks my site!

Posted: Sun Mar 07, 2010 10:46 pm
by scarface222
yeah thanks man, I found out later it was because of my mod security, and I guess larger sites have better security features so turn it off in confidence that their security measures are good, but I would rather leave it on in the beginning