-
Compiling PHP Extensions
29 August 2014
Read moreThere are lots of reasons why you might like to compile your own PHP extensions. For me those reasons are usually:
The extension isn't available on pecl (e.g. uprofiler)
The extension is on pecl, but you need the newest version or a branch with a particular feature or fix in it, perhaps for testing
You are fixing an extension yourself (yay, we need more people like you!)
Related: If you followed my previous post on compiling PHP, be aware that in the ``php/bin/`` folder there is a pecl binary that will install extensions correctly for whichever version of PHP it belongs to, so you may not need to read the rest of this post. However if you do, the paths follow on from the examples in that post.
I haven't seen a really approachable guide anywhere, we tend to speak of extensions in hushed tones, and actually it isn't particularly tricky so here is my quick how-to guide.
-
PHP and Gearman: Unable to connect after upgrade
28 February 2013
Read moreI upgraded PHP and related pecl modules on my development machine today, and ran into a problem with Gearman. Actually I ran into more than one! Firstly the challenge of getting the newest pecl version working with a gearman version. Then an error where my existing PHP application couldn't connect to gearman after upgrade.
-
Invalid Protected Resource URL in Pecl_Oauth
12 April 2011
Read moreI had a funny (funny weird, not funny haha) problem the other day when working with pecl_oauth in PHP to talk to a service. I'd gone through all the handshaking steps, got the acces token and was ready to start talking to the service itself. However when I tried to …
-
Downgrading a PECL Module
07 April 2011
Read moreRecently I saw some weirdness in an existing application when I upgraded a PECL module that the application depended on. To figure out if that really was the problem, I wanted to downgrade the module to its previous version. There is no opposite command to "upgrade" but you can instruct …
-
Deprecated Methods in Pecl_Http
28 October 2010
Read moreI'm a big fan of pecl_http, which I use quite often as I work so regularly with APIs and on systems where I can get it installed, it's much nicer than PHP's curl extension. Recently though I've been often seeing output which reads:
Function HttpRequest::addRawPostData() is deprecated
It isn't …
-
Authenticating with OAuth from PHP
28 September 2010
Read moreI've been looking into OAuth recently and really like what I see, so I started looking at actually starting to play with something that uses it (and isn't twitter). In the pursuit of this, I spent some time walking through the process of how to actually authenticate using OAuth, as a client. I chose Yahoo!'s service, because they have some fabulous developer documentation and have a standard OAuth implementation. Although you don't strictly need any special libraries to handle OAuth, that would be a bit like decoding XML with a regex, so I used the OAuth Package from PECL. For others (including me after I've slept), here's an outline of the process.
-
Missing pcre.h when installing pecl_oauth
27 September 2010
Read moreI was playing with pecl_oauth last week (more about that in a later post) and when I tried to install from PECL, it grabbed the files, ran the configure step but stopped with an error status during make. This is bad news for those of us who are ubuntu users …
-
Three Ways to Make a POST Request from PHP
18 January 2010
Read moreEDIT: A more modern take on this topic is here http://www.lornajane.net/posts/2018/make-a-post-request-from-php-with-guzzle
I've been doing a lot of work with services and working with them in various ways from PHP. There are a few different ways to do this, PHP has a curl extension which …