dongmuyan5638 2010-03-24 16:17
浏览 12
已采纳

PHP:http_get未定义引用。 Ubuntu Karmic Koala

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

  • 写回答

2条回答 默认 最新

  • dqw70970 2010-03-25 13:11
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?