Question

I am trying to use the http_get function. But I get a undefined reference error. I understands that this means the function can not be found. However I do no know how to fix this? Could somebody help?

Cheers

Was it helpful?

Solution

O.k so I sorted it out.

I used pecl:

user@user:~$ sudo pecl install pecl_http

Unfortunately this gave me an error which wanted me to install libcurl. Thus I installed it with:

user@user:~$ sudo aptitude install libcurl4-openssl-dev

After that I tried pecl again:

user@user:~$ sudo pecl install pecl_http

It work, but I had to add:

extension=http.so

in my php.ini file.

After all those steps it worked. To me it seems that everybody knows that this is what you should do to fix it. It stumps me that nobody has actually documented it.

OTHER TIPS

You can use the curl_ methods to do the same thing

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top