PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Fatal error: Class 'HTTP_Request2' not found

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTTP
View previous topic :: View next topic  
Author Message
Maddy12345



Joined: 03 Aug 2010
Posts: 3

PostPosted: Tue Aug 03, 2010 5:10 am    Post subject: Fatal error: Class 'HTTP_Request2' not found Reply with quote

Hi,

I am calling a php file containing the following code:

<?php
$request = new HTTP_Request2('http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&street=701+First+Street&city=Sunnyvale&state=CA');
$request->setMethod(HTTP_Request2::METHOD_POST);
echo $request->send()->getBody();
?>

And I get the error:

Fatal error: Class 'HTTP_Request2' not found in C:\Documents and Settings\Madeleine\Desktop etc etc etc

What am I missing?

Thank you very much in advance.

Maddy
Back to top
View user's profile Send private message
Maddy12345



Joined: 03 Aug 2010
Posts: 3

PostPosted: Sun Aug 15, 2010 3:15 am    Post subject: Fatal error: Class 'HTTP_Request2' not found Reply with quote

Hello again,

My error was solved by adding the following line at the beginning of the code:

require_once 'HTTP/Request2.php';

Madeleine
Back to top
View user's profile Send private message
sailormooney



Joined: 04 Sep 2011
Posts: 5

PostPosted: Sun Sep 04, 2011 8:08 am    Post subject: Reply with quote

It's so frustrating that when only a small segment of coding an cause so many issues. I mentioned earlier that I'm new to PHP and PEAR. So I really don't feel like having issues with the HTTP request.
_________________
SEO Chicago
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTTP All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement