PHP Fatal error: Class 'HttpRequest' not found

限于喜欢 提交于 2019-12-06 03:43:01

问题


I was wondering how I can't get rid of this error. I have a PHP 5.3 running on a Windows Server.

In one of my file, I need to do a HttpRequest. The problem is that I need a specific *.dll (pecl_http.dll) that I can't find. Is there another way to do this, or has someone this *.dll for PHP 5.3 ?

Thanks for your help

Alexandre


回答1:


If you look down the list here: http://downloads.php.net/pierre/ you'll see 4 versions of php_http. The 4 versions are all options of 'non-thread-safe' and 'thread-safe' (filename shows 'nts' or nothing), and VC6 or VC9.

To see if you need vc6 or vc9, load up phpinfo, and look at 'Compiler' near the top. A bit further down, you'll see 'Thread Safety' if this is enabled, go for the one that doesn't say 'nts'.




回答2:


install (or reinstall) the package

$ pecl install -f pecl_http-1.7.6

or use curl - this is a working snippet



来源:https://stackoverflow.com/questions/6980505/php-fatal-error-class-httprequest-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!