title: Cakephp Ajax call works in localhost but not in server, request-data changing to null after 1 seconds but works fine on localhost
body: <p>I have a very strange problem here:</p>
  
  <p><strong>In my index.ctp, I have the following code that makes ajax request to the server</strong></p>
  
  <pre><code>$.ajax({
      url: "&lt;?php echo Router::url(array('controller' =&gt; 'brands', 'action'  =&gt;'filters'), true); ?&gt;",
      cache: false,
      data    : "Mod=weaves",
      type: 'POST',
      dataType: 'Html',
      success: function (data) {
         $('#resultsall').html(data);
      }           
  })
  </code></pre>
  
  <p><strong>in my Brand controller's filters action, I have this</strong> </p>
  
  <pre><code>public function filters(){
      if ($this-&gt;request-&gt;is('ajax')) {
         $this-&gt;Brand-&gt;recursive = 0;
         echo debug($this-&gt;request-&gt;data);
         if($this-&gt;Session-&gt;read('conditions.brand')){
             $brandconditions = $this-&gt;Session-&gt;read('conditions.brand');
             $this-&gt;Paginator-&gt;settings = array('fields' =&gt; array('name', 'id'), 
                                                'conditions' =&gt; array('Brand.id' =&gt; $brandconditions)) + 
             $this-&gt;Paginator-&gt;settings;
             $this-&gt;set('brands', $this-&gt;Paginator-&gt;paginate());
         }
         $this-&gt;set('mode', $this-&gt;request-&gt;data['Mod']);
         $this-&gt;render('results','ajax');
      }
  }
  </code></pre>
  
  <p>I kept on getting undefined index Mod. when run on server but works well on my localhost.
  If I run echo debug on localhost, I get expected result but on server, the request-data shows up correctly for 1 seconds, then the array becomes null after one seconds. </p>