-1

I am using PHP Version 7.0.30-1+ubuntu18.04.1+deb.sury.org+1. Below are the my loaded extensions

Array ( [0] => Core [1] => date [2] => libxml [3] => openssl [4] =>
pcre [5] => zlib [6] => filter [7] => hash [8] => Reflection [9] =>
SPL [10] => session [11] => standard [12] => apache2handler [13] =>
propro [14] => raphf [15] => PDO [16] => xml [17] => calendar [18] =>
ctype [19] => curl [20] => dom [21] => exif [22] => fileinfo [23] =>
ftp [24] => gettext [25] => iconv [26] => json [27] => mcrypt [28] =>
Phar [29] => posix [30] => readline [31] => shmop [32] => SimpleXML
[33] => sockets [34] => sysvmsg [35] => sysvsem [36] => sysvshm [37]
=> tokenizer [38] => wddx [39] => xmlreader [40] => xmlwriter [41] =>
xsl [42] => http [43] => Zend OPcache )

But I always get below error

Fatal error: Uncaught Error: Call to undefined function http_post_data()

And when I try to install pecl_http I get below error enter image description here

Please help me.

Manav
  • 553
  • 7
  • 18
Milind
  • 1,855
  • 5
  • 30
  • 71
  • 1
    Why not just `$_POST`? – Philipp Jun 22 '18 at 17:40
  • I want to post to another website in body post. Sorry if I am doing wrong as I am very new to PHP. Please help me – Milind Jun 22 '18 at 17:45
  • Possible duplicate of [How do I send a POST request with PHP?](https://stackoverflow.com/questions/5647461/how-do-i-send-a-post-request-with-php) – Philipp Jun 22 '18 at 17:49
  • 1) What you have on a screenshot is not an error, but a prompt to enter directory with zlib. 2) You can use PHP's CURL extension (which you have already loaded) for the same thing. Or better yet - library like [Guzzle](http://docs.guzzlephp.org/en/stable/). – Jirka Hrazdil Jun 22 '18 at 17:51
  • Kindly help what should i type there !! – Milind Jun 22 '18 at 17:53
  • CURL extension is detected as bot by other website – Milind Jun 22 '18 at 17:56

1 Answers1

0

You need to add these extensions to your php.ini file in this order

extension=raphf.so
extension=propro.so
extension=http.so

To address the "zlib" issue read the solution to this post

Mr Glass
  • 1,186
  • 1
  • 6
  • 14