This website recently got a major rebuild; if you're missing something, let Lorna know.

    Tag: pecl


  1. Compiling PHP Extensions


    There 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.

    Read more

  2. PHP and Gearman: Unable to connect after upgrade


    I 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.

    Read more

  3. Invalid Protected Resource URL in Pecl_Oauth


    I 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 …

    Read more

  4. Downgrading a PECL Module


    Recently 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 …

    Read more

  5. Deprecated Methods in Pecl_Http


    I'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 …

    Read more

  6. Authenticating with OAuth from PHP


    I'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.

    Read more

  7. Missing pcre.h when installing pecl_oauth


    I 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 …

    Read more

  8. Three Ways to Make a POST Request from PHP


    EDIT: 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 …

    Read more