magic-quotes

print_r() and mail() in PHP outputs something different, why?

I have a html form where visitors can fill and send me some information, as an e-mail. It sends like this: $body = print_r($_POST, true); mail ($to, $subject, $body, $headers); When they write abc'def I get abc\'def What is this additional \? How I can prevent it? ...

Seeking quoted string generator

Does anyone know of a free website or program which will take a string and render it quoted with the appropriate escape characters? Let's say, for instance, that I want to quote It's often said that "devs don't know how to quote nested "quoted strings"". And I would like to specify whether that gets enclosed in single or double quo...

Using single 'smart quote' in my JSON data is breaking PHP script

Hi folks, I've got a PHP script that is reading in some JSON data provided by a client. The JSON data provided had a single 'smart quote' in it. Example: { "title" : "Lorem Ipsum’s Dolar" } In my script I'm using a small function to get the json data: public function getJson($url) { $filePath = $url; $fh = fopen...

Although magic_quotes are turned off still escaped strings?

I disabled magic_quotes in my php.ini. But I still get escaped strings in my form. Note: I'm running this in a theme in Wordpress. ...

disabling php magic_quotes_gpc

Hi there, I have a site, locally setup. It's application development framework is Kohana. I have an error displaying the following: Unknown Error An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator. system/core/Kohana.php [98]: Function set_magic_quotes...

PHP file() adding slashes to single quotes

I have a PHP installation running 5.3.3 and when I use the code below: $sql = file('sql.txt'); var_dump($sql); All my single quotes are escaped. Why would this be happening. Magic quotes is enabled on the server (for some reason, it is out of my control) however I thought that magic quotes was only applied to GET POST COOKIE...