MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

REST/PHP library won't install -- HTTP_Request missing?

Last post 07-29-2008 6:32 AM by Michael. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 06-14-2008 5:43 AM

    • Dylan
    • Not Ranked
    • Joined on 06-12-2008
    • Posts 1

    REST/PHP library won't install -- HTTP_Request missing?

     The page for the REST PHP library at:

     http://developer.myspace.com/community/libs/php.aspx

     ...states that it requires HTTP_Request. So I type (per the page's instructions):

     pear install HTTP_Request

     ...and I get:

    HTTP error, got response: HTTP/1.1 410 Gone
    Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)

    The pear package does indeed seem to be there:

     http://pear.php.net/package/HTTP_Request

     Am I simply using pear incorrectly? Or is the pear server having problems?

    Can somebody else try installing HTTP_Request via pear and duplicating the error?

    Thanks. 

  • 06-14-2008 11:24 AM In reply to

    • jason
    • Top 100 Contributor
    • Joined on 02-05-2008
    • Posts 27

    Re: REST/PHP library won't install -- HTTP_Request missing?

    i just installed it yesterday afternoon without a hitch, "pear install HTTP_Request" ....

    maybe there's just some server glitches today....

  • 06-19-2008 8:40 AM In reply to

    Re: REST/PHP library won't install -- HTTP_Request missing?

     Hi, yes you will need to install the Pear module and if you are like me working in a domain hosting enviroment, their default include path does not inlude /home/<user_id>/php, we have to do that explicitly in our code. 

    I added the following line at the top of the BaseAPI.php and it works now !

    ini_set("include_path", ini_get('include_path').':/home/shopping/php:'); 

    Let me know if that works     

    Filed under: ,
  • 07-29-2008 6:07 AM In reply to

    Re: REST/PHP library won't install -- HTTP_Request missing?

    I am getting this error:

    Warning: require_once(pear/HTTP/Request.php) [function.require-once]: failed to open stream: No such file or directory in /www/buggywars/myspace/myspace/BaseAPI.php on line 5

    Fatal error: require_once() [function.require]: Failed opening required 'pear/HTTP/Request.php' (include_path='.:/usr/share/pear:/usr/share/php:/root/usr/share/php:') in /www/buggywars/myspace/myspace/BaseAPI.php on line 5

     

    I installed pear successfully, and installed HTTP Request.

     Any idea whats wrong here? Heres the top lines of BaseAPI.php:


    ini_set("include_path", ini_get('include_path').':/root/usr/share/php:');
    require_once("Common.php");
    require_once("Util.php");
    require_once 'pear/HTTP/Request.php'; // FROM PEAR.php.net -- install by command $> pear install HTTP_Request

     

    On a side note.. I installed pear via command line, so by default it is located at: usr/share/PEAR (It installed capitalized?)

  • 07-29-2008 6:32 AM In reply to

    Re: REST/PHP library won't install -- HTTP_Request missing?

     Okay, got that fixed... Now I have this error..?

    Fatal error: Uncaught exception 'Exception' with message '401 <error xmlns="api-v1.myspace.com"><statuscode>401</statuscode><statusdescription>Digital signature has expired.</statusdescription></error>' in /www/buggywars/myspace/client/BaseAPI.php:63 Stack trace: #0 /www/buggywars/myspace/client/MySpaceAPI.php(171): BaseAPI->_do_get('http://api.mysp...', NULL) #1 /www/buggywars/myspace/client/MySpaceAPI.php(32): MySpaceAPI->do_get('users/264730435', NULL) #2 /www/buggywars/myspace/testGets2.php(22): MySpaceAPI->get_user(264730435) #3 /www/buggywars/myspace/index.php(17): include_once('/www/buggywars/...') #4 {main} thrown in /www/buggywars/myspace/client/BaseAPI.php on line 63

Page 1 of 1 (5 items)