[Rack] PHP PEAR classes for Twitter support on pony.noise

Benny Baumann BenBE1987 at gmx.net
Wed Nov 24 07:19:51 UTC 2010


Hi everyone,

since there were no objections on this topic I went for it and ran the
following installation commands on pony to install the Services_Twitter
and HTTP_OAuth classes:

# pear upgrade
# pear install -a -s -f Services_Twitter HTTP_OAuth

The output was the following:

---
WARNING: failed to download pear.php.net/Services_Twitter within
preferred state "stable", will instead download version 0.6.3, stability
"beta"
WARNING: failed to download pear.php.net/HTTP_OAuth within preferred
state "stable", will instead download version 0.1.18, stability "alpha"
WARNING: failed to download pear.php.net/HTTP_Request2 within preferred
state "stable", will instead download version 0.5.2, stability "alpha"
WARNING: failed to download pear.php.net/HTTP_Request2 within preferred
state "stable", will instead download version 0.5.2, stability "alpha"
WARNING: failed to download pear.php.net/Net_URL2 within preferred state
"stable", will instead download version 0.3.1, stability "beta"
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
downloading Services_Twitter-0.6.3.tgz ...
Starting to download Services_Twitter-0.6.3.tgz (60,495 bytes)
...............done: 60,495 bytes
downloading HTTP_OAuth-0.1.18.tgz ...
Starting to download HTTP_OAuth-0.1.18.tgz (51,237 bytes)
...done: 51,237 bytes
downloading HTTP_Request2-0.5.2.tgz ...
Starting to download HTTP_Request2-0.5.2.tgz (58,159 bytes)
...done: 58,159 bytes
downloading Log-1.12.3.tgz ...
Starting to download Log-1.12.3.tgz (46,020 bytes)
...done: 46,020 bytes
downloading pecl_http-1.7.0.tgz ...
Starting to download pecl_http-1.7.0.tgz (173,979 bytes)
...done: 173,979 bytes
downloading Net_URL2-0.3.1.tgz ...
Starting to download Net_URL2-0.3.1.tgz (8,488 bytes)
...done: 8,488 bytes
downloading DB-1.7.13.tgz ...
Starting to download DB-1.7.13.tgz (132,246 bytes)
...done: 132,246 bytes
downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
...done: 119,790 bytes
downloading Mail-1.2.0.tgz ...
Starting to download Mail-1.2.0.tgz (23,214 bytes)
...done: 23,214 bytes
downloading Net_SMTP-1.4.4.tgz ...
Starting to download Net_SMTP-1.4.4.tgz (12,264 bytes)
...done: 12,264 bytes
downloading Net_Socket-1.0.10.tgz ...
Starting to download Net_Socket-1.0.10.tgz (5,429 bytes)
...done: 5,429 bytes
downloading Auth_SASL-1.0.4.tgz ...
Starting to download Auth_SASL-1.0.4.tgz (5,795 bytes)
...done: 5,795 bytes
install ok: channel://pear.php.net/Log-1.12.3
71 source files, building
running: phpize
sh: phpize: not found
ERROR: `phpize' failed
install ok: channel://pear.php.net/Net_URL2-0.3.1
install ok: channel://pear.php.net/DB-1.7.13
install ok: channel://pear.php.net/MDB2-2.4.1
install ok: channel://pear.php.net/Mail-1.2.0
install ok: channel://pear.php.net/Net_Socket-1.0.10
install ok: channel://pear.php.net/Auth_SASL-1.0.4
install ok: channel://pear.php.net/HTTP_Request2-0.5.2
install ok: channel://pear.php.net/Net_SMTP-1.4.4
install ok: channel://pear.php.net/Services_Twitter-0.6.3
install ok: channel://pear.php.net/HTTP_OAuth-0.1.18
MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
MDB2: Optional feature ibase available (Interbase/Firebird driver for
MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)
MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
MDB2: Optional feature oci8 available (Oracle driver for MDB2)
MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)
MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install
pear/MDB2#featurename"
---

I'll be working on reworking the REBar scripts in the next couple days.
I'll also drop a further note on my second project I mentioned as soon
as I get to it.

Regards,
BenBE.

P.S.: Who's generating such crazy passwords like ~100 chars in size?

Am Dienstag, den 23.11.2010, 02:28 -0800 schrieb Benny Baumann:
> Hi everyone,
> 
> I was asked by rubin to write in on the list for two projects I'm
> working on ATM, one being the REBar, the other a small hack for the Door
> Opening, both involving Twitter and the Twitter API (accessed from PHP
> code).
> 
> But as the latter currently is limited to personal use (source
> published, but set up to only work for me currently, I'll skip this one
> for now (I'll discuss this one in another thread as the subject for the
> Door project has some other implications).
> 
> For now I'd like to announce a bit of work I'd like to do on the REBar,
> that involves improving the caching of Twitter API responses (done
> today, caches results for 5 minutes) and cleaning up the code that is
> making external HTTP downloads using CURL (file_get_contents does a
> quite nice job in most cases and looks cleaner, not done yet).
> 
> What I'm now coming at is: Since both projects involve Twitter it would
> be nice to avoid recoding all the Twitter API bindings for every
> plugin/widget but instead use the Services_Twitter binding provided by
> PEAR, a well-known class library for PHP, which provides a binding for
> Twitter including OAuth authentication which is required to take
> advantage of higher rate limits on API access.
> 
> I use both the Twitter and OAuth classes in projects of my own and a
> check of the source revealed quite good coding and (as far as I saw when
> skimming over it) _no obvious_ flaws or security breaches.
> 
> I'm looking forward to your input on the issue of installing the PEAR
> classes Services_Twitter and HTTP_OAuth on pony or not.
> 
> Advantages:
> - Cleans up existing code if used
> - Easy OOP usage
> - Avoids parsing in user code (responses are preparsed and filtered)
> - Widely used repository of code with good coverage regarding quality
> checks
> - Solid codebase
> - Rapid developement (few LOC with big effect)
> 
> Disadvantages:
> - Introduces more code to check in security audits
> - Documentation on how to use those classes derives from the Twitter API
> docs, not the source docs of those classes ("runtime typed"). Though
> there's an XML file describing all the allowed functions/properties.
> 
> Any constructive input welcome.
> 
> Best regards,
> BenBE
> _______________________________________________
> Rack mailing list
> Rack at lists.noisebridge.net
> https://www.noisebridge.net/mailman/listinfo/rack

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://www.noisebridge.net/pipermail/rack/attachments/20101123/d2f994cf/attachment-0001.sig>


More information about the Rack mailing list