php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68321 Input variables issues, incorrect errors report
Submitted: 2014-10-29 08:56 UTC Modified: 2016-08-25 17:40 UTC
From: blurkings at hotmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.4.34 OS: CentOS 6.5
Private report: No CVE-ID: None
 [2014-10-29 08:56 UTC] blurkings at hotmail dot com
Description:
------------
I am running with PHP 5.4.33

Input variables is less than the limit, but always prompt me input variables exceed.

I extended to 10000, but still the same.

Array
(
    [type] => 2
    [message] => Unknown: Input variables exceeded 10000. To increase the limit change max_input_vars in php.ini.
    [file] => Unknown
    [line] => 0
)


RAW data to submit:
-------------------

POST:
Array
(
    [username] => user
    [password] => password
    [additional] => {"appName":"app","cicd":"","clientIP":"10.1.1.170","clientMac":"10:16:9e:8d:aa:12","clientName":"Asus K012","clientPlatform":"Jelly Bean,4.3","clientTyp":"MA"}
    [api_Key] => 4ruOFVi94rFKYjEeeDeWAq/kYAZinqbi90KeoJYh2SNVL95GbYO8rDaP7g4N1w6L
    [token] => {ieZivx5HZII=}{070YNK2R4bM=}{L1bXW5MgaM}{MzQ2c3BtbTltdTV1M2NsMTdybGtmbWU3ZTc=}{}
    [from_datetime] => 
)


Why?

Test script:
---------------
$fields = array(
                "username"=>$_POST['userid'],
                "password"=>$_POST['passwd'],
                "api_Key"=>"4ruOFVi94rFKYjEeeDeWAq/kYAZinqbi90KeoJYh2SNVL95GbYO8rDaP7g4N1w6L",
                "additional"=>Array("appName"=>"app","cicd"=>"","clientIP"=>"10.1.1.170","clientMac"=>"10:16:9e:8d:aa:12","clientName"=>"Asus K012", "clientPlatform"=>"Jelly Bean,4.3", "clientTyp"=>"MA"),
                "token"=>$_POST['token'],
                "from_datetime"=>$_POST['from_datetime']
            );


$fields_string = "";
  foreach($fields as $key=>$value) {
    if(is_array($value)){
      $fields_string .= urldecode(http_build_query(array($key => $value)));
    }else{
      $fields_string .= $key.'='.$value.'&';
    }

  }
  
  rtrim($fields_string,'&');
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, count($fields));
  curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
  curl_setopt($ch, CURLOPT_HEADER, 0); // DO NOT RETURN HTTP HEADERS
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // RETURN THE CONTENTS OF THE CALL
  curl_exec($ch);
  curl_close($ch);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-29 18:09 UTC] requinix@php.net
-Package: PHP Language Specification +Package: *General Issues
 [2014-10-29 18:09 UTC] stas@php.net
-Package: *General Issues +Package: Scripting Engine problem
 [2016-08-25 17:40 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2016-08-25 17:40 UTC] cmb@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

> Why?

You are passing a plain (i.e. not urlencoded) string as value
of CURLOPT_POSTFIELDS. This is not supposed to work.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 06:01:34 2024 UTC