I get error 413 every time i try to post data with php script using curl. I can "get" web pages,but when i use "post" the script dies with
does not allow request data with POST requests, or the amount of data provided
in the request exceeds the capacity limit.
I have a py script,which works. Here is an example code that doesn't work:
$q=curl_init(POSTURL);
curl_setopt($q,CURLOPT_POST,true);
curl_setopt($q,CURLOPT_RETURNTRANSFER,true);
$post=array("q"=>2);
$ss=curl_setopt($q,CURLOPT_URL,"http://localhost");
curl_setopt($q,CURL_POSTFIELDS,$post);
$f=curl_exec($q);
curl_close($q);
echo $f." is error";
Sorun apache ile eğer benim komut dosyası veya başka bir şey ile, bilmiyorum.