PHP 5.4 on IIS is adding slashes after quote automatically -


my company switched php. have had no real issues until today. when assign string has quotes inside variable, string have slashes escaping single quotes.

this 1 week old fresh install of 5.4. read 5.4 not have magic quotes. searched php.ini , did not find magic in name, must not on.

example:

$sql = "select description value [group]='auto_email_test'"; echo dbstr($sql, "0"); 

when debug, $sql

"select description value [group]=\'auto_email_test\'"; 

tried no luck.

$sql = "select description value [group]='auto_email_test'"; echo dbstr(stripslashes($sql), "0"); 

why php escaping quotes right away? , why stripslashes() not work remove them?

edit: show dbstr();

/**  *  * executes $imcomingsql query , returns first cell in first row  *  * @param string $_incomingsql sql query want execute.  * @param string $_defaultvalue value return if null.  */ function dbstr($_incomingsql, $_defaultvalue) { $result = query(conn, $_incomingsql); if ($result !=0) {     $rows = sqlsrv_has_rows($result);     if ($rows)      {         $row = sqlsrv_fetch_array($result, sqlsrv_fetch_numeric);         $result = $row[0];         return $result;     } } return $_defaultvalue; } 


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -