dsdsdsdsd Posted January 27, 2012 Share Posted January 27, 2012 hello; my webhost made a change to my php.ini file yesterday. since then php is escaping single quotes that it receives from flash. //-- AS3 var myVariables:URLVariables = new URLVariables(); myVariables.pvs_params = "'h'e'l'l'o" ; var myURLRequest:URLRequest = new URLRequest("mysql_task_mgr.php"); myURLRequest.data = myVariables ; myURLRequest.method = "get" ; navigateToURL( myURLRequest, '_blank' ) ; //-- php print( $_GET[ "pvs_params" ] ) ; // --> \'h\'e\'l\'l\'o any thoughts? my webhost is stumped; Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/ Share on other sites More sharing options...
Pikachu2000 Posted January 27, 2012 Share Posted January 27, 2012 Check the output of phpinfo() and see if they may have turned on magic_quotes_gpc. Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/#findComment-1311811 Share on other sites More sharing options...
dsdsdsdsd Posted January 27, 2012 Author Share Posted January 27, 2012 ; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = On I wonder if it had been Off prior to their changes ... they were only supposed to be looking at session.save_path ... hmmm I will call them to tell them. - Shannon Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/#findComment-1311814 Share on other sites More sharing options...
dsdsdsdsd Posted January 27, 2012 Author Share Posted January 27, 2012 Pikachu2000, that was it ... thanks. -Shannon Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/#findComment-1311823 Share on other sites More sharing options...
Pikachu2000 Posted January 28, 2012 Share Posted January 28, 2012 Good. I don't know why a provider would do that without explicitly telling people, but it illustrates the point that code should be written so it checks for magic_quotes_gpc, and handles the data accordingly. Otherwise, you can end up with a database chock full of extra backslashes. Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/#findComment-1311839 Share on other sites More sharing options...
.josh Posted January 28, 2012 Share Posted January 28, 2012 fyi if your host provider won't change it back, you can check the state with get_magic_quotes_gpc and use stripslashes if it is on (see example #1 of first link)...which as Pikachu pointed out, is something you should be doing anyways. Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/#findComment-1311844 Share on other sites More sharing options...
dsdsdsdsd Posted January 28, 2012 Author Share Posted January 28, 2012 unfortunately I am still developing php as if it were 2004 ... I ordered a php5 book today ... I keep telling people that I am a php person Quote Link to comment https://forums.phpfreaks.com/topic/255900-strange-behavior-php-is-escaping-single-quotes-from-flash/#findComment-1311926 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.