title: php shell_exec character allowed and limit - JSON encoded string as parameter
body: <p>I'm trying to pass a JSON encoded string in php <code>shell_exec</code> function but it seems like it doesn't accept whole string.</p>
  
  <p>My code:</p>
  
  <pre><code>$exec_string = json_encode( $data );
  $command     = "php index.php exec_function " . $exec_string;
  $output      = shell_exec( $command );`
  
  echo "&lt;pre&gt;$output&lt;/pre&gt;;
  </code></pre>
  
  <p>My index.php</p>
  
  <pre><code>public function exec_function ( $data ) {
    echo $data;
  }
  </code></pre>
  
  <p>The function only echoes some part of the string like ~300 characters. The output string ends at the '\' character and the rest of the string starts with '/' character.</p>
  
  <p>For this reason I can not further decode the JSON string.</p>
  
  <p>Someone please help me out.</p>
  
  <p>Thanks</p>
  
  <p>UPDATE:</p>
  
  <p>I just removed the variables with the '/\' characters and now it returns full string. And the returned string is without the double-quotes '"' so there's no way I can decode it. Any idea?</p>