Welcome to WebmasterWorld Guest from 54.197.94.141

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Fatal error: Class 'HttpRequest' not found

   
2:58 pm on Mar 5, 2010 (gmt 0)

5+ Year Member



hello,

i keep getting this error
Fatal error: Class 'HttpRequest' not found
when i try to do a HTTP request.

I have browsed the internet for solutions to this problme and none of them work.

I enabled the following line in the php.ini
extension=php_http.dll

I made sure the dll exists in the correct extension folder then i restarted apache.

I am still getting the same error, the code i am executing is

<?php
$r = new HttpRequest('www.myurl.com', HttpRequest::METH_POST);

$r->addPostFields (
array (
'name' => 'Johny The Stinking Donkey'
)
) ;
$r->send ();
?>


any suggestions would be great thanks for reading this.

Dave
;
3:08 pm on Mar 5, 2010 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I found an old entry saying they also needed
ssleay32.dll
libeay32.dll

and
hash, iconv, SPL and bz2

so maybe take a look at any dependencies. I had similar problems with this package about a year ago and I ended up ditching it and using cURL, it was much faster in my case.
3:39 pm on Mar 5, 2010 (gmt 0)

5+ Year Member



Bad News, I tried adding those 2 dll files and it still did not work.

Good news, I enabled Curl and tried a http post that way instead. RESULT!

Thanks for your help, much appreciated.