Error php, Call to undefined function http_get ()

0

I looked for ways to solve this problem to use the http_get() function, everyone had to install lib php-http and pecl link

I did this and set it to% of libraries like this:

extension=/usr/lib/php5/20121212/http.so
extension=/usr/lib/php5/20121212/raphf.so
extension=/usr/lib/php5/20121212/propro.so

I gave the command apache2/php.ini and the problem still continues, does anyone know if anything is missing? Remembering it's in Linux Mint / Ubuntu.

    
asked by anonymous 25.08.2015 / 21:35

2 answers

-1

I could not solve the problem with http_get (I could not configure), so I ended up working with curl.

Thank you all for the help!

    
20.07.2016 / 14:34
1

As this response from SOen and the link you have to include in the correct order , this is the order:

extension=/usr/lib/php5/20121212/raphf.so
extension=/usr/lib/php5/20121212/propro.so

;Este só deve vir depois
extension=/usr/lib/php5/20121212/http.so

If configured, --with-http-shared-deps (default) may depend on the following extensions and in this order:

extension = raphf.so
extension = propro.so

extension = hash.so
extension = iconv.so
extension = json.so

;Este só deve vir depois
extension = http.so

An example usage:

<?php
$response = http_get("http://www.example.com/", array("timeout"=>1), $info);
print_r($info);
  

Note that the documentation no longer has data about this extension (which is PECL), even though it still has a missing link link - Now only available on link and documentation

    
12.05.2016 / 23:15