0

The URL I am using is: http://example.org/codecabana/runCode.php?code=%23include%20%3Cstdio.h%3E%0Aint%20main(void)%20%7B%0Aprintf(%22Code%20Cabana!%22)%3B%0Areturn%200%3B%0A%7D&lang=C
The problem is, it seems to be replacing " with \. My PHP script is:

<?php
include "sl.php";
$code = $_GET['code'];
$lang = $_GET['lang'];

try {
$app = new slApp( $plaintext );
$result = $app -> run( $code , $lang ); //Pass the result of the request, as an array, to $result
echo $result['output'],"{BREAK}";
echo $result['compiler_errors'];
echo $code;
}catch( Exception $e ) {

    echo $e -> getMessage(), "{BREAK}", "An error has occurred! CODE: " , $code , "Lang: " , $lang;

}
?>
Allison
  • 2,213
  • 4
  • 32
  • 56
  • 1. google for it 2. it's turned off in php.ini or .htaccess – zerkms Sep 22 '12 at 21:56
  • answer is [here](http://php.net/manual/en/security.magicquotes.disabling.php) or [here](http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting). – Wh1T3h4Ck5 Sep 22 '12 at 22:01

1 Answers1

-1

You can turn off magic_quotes from the php.ini file on your server.

You can run phpinfo() from a PHP script to display your current php setup.

Ben D
  • 14,321
  • 3
  • 45
  • 59