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 
HTTP_Request2 and the SPL library

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



Joined: 05 Mar 2009
Posts: 7

PostPosted: Thu Sep 17, 2009 9:40 pm    Post subject: HTTP_Request2 and the SPL library Reply with quote

I want to use HTTP_Request2 and I installed it correctly. When I try to use the class, I get the following error:

Code:
# php
<?
require_once("HTTP/Request2.php");
?>
^D
Fatal error: Interface 'SplSubject' not found in /usr/share/php/HTTP/Request2.php on line 63


My question: How do I install the SPL library? The man page, http://us2.php.net/manual/en/spl.installation.php, is of no help except to say that I should already have it, since I am using PHP 5.2.6, but there is no copy of spl.php on my machine.

Thanks.

Notes

Here is my pear information:

Code:
# pear -V
PEAR Version: 1.9.0
PHP Version: 5.2.6RC4-pl0-gentoo
Zend Engine Version: 2.2.0


Here is the evidence I installed HTTP_Request2 correctly:

Code:
# pear install HTTP_Request2-0.4.1
pear/HTTP_Request2 can optionally use PHP extension "curl"
pear/HTTP_Request2 can optionally use PHP extension "fileinfo"
downloading HTTP_Request2-0.4.1.tgz ...
Starting to download HTTP_Request2-0.4.1.tgz (55,747 bytes)
.............done: 55,747 bytes
install ok: channel://pear.php.net/HTTP_Request2-0.4.1
Back to top
View user's profile Send private message
griffmcc



Joined: 05 Mar 2009
Posts: 7

PostPosted: Fri Sep 18, 2009 2:26 am    Post subject: Problem solved Reply with quote

My problem is that PHP on gentoo has SPL turned off by default.

My source: http://schlitt.info/opensource/blog/0432_a_pitty_in_gentoos_php_distribution.html
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1235

PostPosted: Fri Sep 18, 2009 10:55 pm    Post subject: Reply with quote

You won't find a spl.php anywhere. SPL is an extension that needs to be compiied into PHP.
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