 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
System Architect: Integrate PHP application with Solr search engine
by Chris Cornutt March 12, 2013 @ 12:01:43
On the "System Architect" site there's a recent post showing you how to integrate PHP and Solr, the searching tool from the Apache project.
So why do you need a search engine, is database not enough? If you create a small website it might not matter. With medium or big size applications it's often wiser to go for a search engine. Saying that, even a small websites can benefit from Solr if you desire a high level of relevance in search results.
Their example involves an ecommerce website and a search for a term (iPhones) and how difficult it could be to match against the possible multiple variations on the models. Solr makes this kind of searching easier. He shows you how to get a Solr instance all set up and configured as well as the PHP PECL extension from here. A sample PHP script is also included showing connecting to Solr, inserting a new document and searching for a simple query of "hello".
voice your opinion now!
solr search engine tutorial integration pecl extension
Lorna Mitchell: Installing XHGui
by Chris Cornutt March 07, 2013 @ 12:15:01
Lorna Mitchell has a new post today showing you how to install XHGui to help with profiling your application for performance and processing issues.
If you're not familiar with XHGui it's a fabulously easy and friendly way to profile your application; to understand which method calls in a page take the time and how many times they are made, so you can improve the performance of your application. All these instructions are for my 32-bit Ubuntu 12.10 system, hopefully they will work for you or you'll be able to adapt them as appropriate.
She lists the dependencies you'll need to have installed before you can get XHGui working correctly including a MongoDB instance and the PECL xhprof extension. With those all set to go, you can go grab the latest XHGui from github and drop it into place.
voice your opinion now!
xhgui xhprof profile application installation pecl mongodb
Lukas Smith: On predictable PHP release cycles
by Chris Cornutt March 01, 2013 @ 09:37:52
Lukas Smith has a new post today about what he sees as an important part of PHP (or really most open source projects) - a predictable release cycle. It centers around the recent proposal to introduce the Zend Optimizer+ into the core and how it seems to be causing a delay with 5.5 (maybe up to 2 months).
What troubles me though is that its being proposed very late in the game for PHP 5.5, therefore causing a likely delay of 5.5 of at least about 2 months in the best case scenario if it were included. The other option of including it in 5.6 does not seem to be as popular at this point. This saddens me quite a bit since I believe that predictable release cycles would carry several advantages
He points out some things that come along with having predicability around the software releases like developers knowing when/if their changes will make it into the next release. It also makes it easier for end users to plan their releases of their own software, knowing when they'll be getting a feature. In this particular case, though, he doesn't quite understand the delay as the Zend Optimizer+ isn't a change to core, it's an addition:
What is even stranger for this case is that we are just talking about an extension here. Its not a language feature, there is no engine level integration. So even if its not added to core, people can easily get Optimizer+ via PECL. So in this case we are not talking about people having to wait another 10-11 months. Don't get me wrong I think getting an opcode cache into core is awesome, but the reality is that shared host users will probably still not have access to it [...] and the rest can still get it, albeit with a bit more effort.
voice your opinion now!
predictable release cycle zendoptimizer opcode pecl extension opinion
Lorna Mitchell: PHP and Gearman Unable to connect after upgrade
by Chris Cornutt February 28, 2013 @ 12:55:48
Lorna Mitchell has shared some advice about correcting an issue with PHP and Gearman after she did an upgrade via PECL.
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.
Running on Ubuntu, she found this tutorial helpful in getting Gearman back into a working state and installed (version 1.1.1). The "unable to connect" error turned out to be a change in how the Gearman connection needed to be made - the addition of a port to the connection string made things work again.
voice your opinion now!
gearman connection issue pecl ubuntu port
PHPMaster.com: Using SSH and SFTP with PHP
by Chris Cornutt January 10, 2013 @ 11:31:52
On PHPMaster.com today there's a quick tutorial showing you how to use SSH and SFTP from inside your PHP applications (requiring the ssh2 package).
In today's world with so many third-party integrations and content-sharing, it's important to understand and make use of protocols like SCP and SFTP. PHP's SSH2 extension, a wrapper for libssh2 which implements the SSH2 protocol, provides several functions you can use to securely transfer files.
Sample code is included showing how to make a SSH request to a remote server, define the key files to use and execute a remote command (like scp). They also mention the use of wrapper functions like mkdir that also work with SSH/SFTP connections. The post finishes up with an example class or two you can use to wrap your connection handling and make it a bit more OOP-friendly.
voice your opinion now!
ssh sftp extension pecl tutorial oop
Johannes Schlüter: MySQL, Memcache, PHP revised
by Chris Cornutt October 02, 2012 @ 09:27:54
Johannes Schlüter has a recent post highlighting an interesting PHP extension that can connect memcache with your MySQL server via PHP, the PECL mysqlnd_memcache extension.
Now this blog entry is tagged a s PHP. Hs is that coming into play? - Well, on the one side we have this fast memcache interface, which allows to access almost arbitrarry data from the database. On the other side we have our PHP mysqlnd plugin interface where we can add special features, like query caching or load balancing, transparently to any PHP application. Why not combine those two things? - Good question. That's what we have done in the PECL mysqlnd_memcache PHP extension.
He includes some sample PHP code showing it in action - two examples: one using the "mysqlnd_memcache_set" method to set a memcache server on the MySQL connection and another showing two queries and how they're handled behind the scenes by this driver plugin.
voice your opinion now!
mysql mysqlnd memcache driver pecl extension
Anthony Ferrara: Thoughts On PECL Frameworks
by Chris Cornutt August 27, 2012 @ 15:10:17
Anthony Ferrara has shared some thoughts in his latest post about some of the PHP frameworks that have come up lately - ones based in PECL extensions, not in userland code.
In recent months, a number of new frameworks have cropped up for PHP as PECL extensions (Including YAF and PhalconPHP). They promise to provide huge performance gains and lower resource usage for PHP applications. On the surface, they appear to be incredible tools for improving development. But they aren't all they are cracked up to be. In fact, I would argue that they are actually not necessary at all.
He breaks the arguments down into two sections - what you gain by having the framework based in an extension (like performance) and some of the things you give up (like readability, portability and maintainability).
My argument here would be that if you have a site where you can measure meaningful money savings by putting the framework into C (with taking the additional maintenance costs into account), you likely shouldn't be using a framework anyway.
voice your opinion now!
pecl framework yaf phalaconphp extension opinion
Lorna Mitchell's Blog: Using OAuth2 for Google APIs with PHP
by Chris Cornutt March 29, 2012 @ 12:02:21
Lorna Mitchell has a new post to her blog today showing how to use the functionality provided by the pecl_http extension to make an OAuth2 connection to Google.
I've written about Google and OAuth before, but that was OAuth v1.0, and they are introducing OAuth2 for their newer APIs; in this example I was identifying myself in order to use the Google Plus API. [...] OAuth 2 doesn't need an extension or any particular library as it doesn't have the signing component that OAuth 1 had, and OAuth 2 also has fewer round trips. It does require SSL however, because the requests are in the clear.
She includes some code snippets with an example of a connection - making a request to the remote HTTPS resource, adding some parameters to the URL (including the response type, your client ID and a redirect url). The response then contains the "code" value you'll need to make the second request to fetch the access token you'll need on future requests. You can find out more about the interface she's accessing in these docs about the Google Plus API.
voice your opinion now!
oauth2 tutorial googleplus token pecl http
Lorna Mitchell's Blog: Using JIRA's REST API to Create a Dashboard
by Chris Cornutt March 28, 2012 @ 10:57:56
In this recent post to her blog, Lorna Mitchell shows how to use the Jira REST API (provided as a part of some of the newer versions of the tool) to create a "dashboard" of the latest items added to the tracker.
Today what you get is an example of integrating with JIRA's REST API, because their recent "upgrade" locked me out of the issue listings pages completely and I really do need to be able to see a list of bugs! Their bug editing screen is quite usable, so it's just the list that I need here, but you could easily call their other API methods as you need to. These examples are PHP and use the Joind.in Jira tracker), parsing the JSON results and displaying the results as a simple list, looping with a foreach and outputting some HTML.
voice your opinion now!
jira rest api pecl http extension issues dashboard
Stefan Koopmanshcap's Blog: Installing the Geoip PECL package for Zend Server on OSX
by Chris Cornutt January 12, 2012 @ 11:09:56
In this recent post to his blog Stefan Koopmanschap shares some of the troubles (and a solution) when he was dealing with getting the Geoip PECL extension installed on his Zend Server setup in OSX.
Today I needed to get a client application up and running on my local system. This application uses the Geoip PECL package, so I needed to get this up and running. This turned out to be slightly more difficult than just a PECL install, as you're missing some libraries by default, so here is my log of things to do to get it up and running.
He gives the complete list of steps his followed including downloading the source and his way around this "System could not load this extension" issue. The trick was to recompile the source with the correct architecture. By default his extension was built with i386 instead of 64-bit but updating some of the CFLAGS settings (and a few other environment variables) got things compiling correctly.
voice your opinion now!
geoip osx install pecl extension tutorial compile architecture
Chance Garcia's Blog: MAMP PRO, PECL, SSH2, and OSX CLI (AKA acronym madness)
by Chris Cornutt November 09, 2011 @ 11:37:34
Chance Garcia has a recent post to his blog showing how he fixed an issue with his MAMP install involving development of a SSH wrapper he developed and some testing out of PHPStorm and PHPUnit.
One thing I can say is that, even though I use a convenient app like MAMP PRO to set up my local development environment, I'm glad my sysadmin-fu is up to snuff enough to fly without the conveniences because after this ordeal, I feel like I might as well have made my MAMP stack from scratch with all the hoops I jumped tonight.
He shares a few of the things he discovered along the way like: the location of MAMP's "pecl" command, an error caused by a bad pear.conf file, doing custom compiles of PHP and libssh as a fallback and getting the extension to work in the CLI PHP version too.
voice your opinion now!
osx cli mamp tutorial libssh pecl install configure compile
Ulf Wendel's Blog: PECL/mysqlnd_ms compared to a classic
by Chris Cornutt September 28, 2011 @ 08:43:57
Ulf Wendel has a new post that compares the performance of a classic method for using the mysqlnd plugin in MySQL replication to mysqlnd_ms, the replication and load balancing plugin for the mysqlnd driver (that works with the mysql and mysqli functionality and is, as of this beta of PHP, the default driver for MySQL connections).
Recently I was asked if PECL/mysqlnd_ms should be used to add MySQL replication support to a yet to be developed PHP application. The mysqlnd plugin, which supports all PHP MySQL extensions (PDO, mysqli, mysql), stood up against a classical, simple, proven and fast approach: one connection for reads, one connection for writes. Let's compare. This is a bit of an unfair challenge, because PECL/mysqlnd_ms was designed as a drop-in for existing applications, not optimized for those starting from scratch, *yell*... The plugin stands up quite well, anyway!
He starts with a look at the "classical pattern" of using a factory or singleton to make a database object instance that gives back different connections for reads versus writes (slave vs master). The mysqlnd_ms plugin allows you to define configuration settings to tell the queries to automatically go to certain places for different actions. For example, you could use "master_on_write" to tell it to use a master node if you're doing an INSERT or UPDATE versus a SELECT. He also shows a more complex example using a SQL hint and one issue that might come from the "human element" - not paying attention to database character sets.
voice your opinion now!
pecl mysqlnd mysqlndms mysql replication configuration automatic
C. Sadeesh Kumar's Blog: Smart File Type Detection Using PHP
by Chris Cornutt August 29, 2011 @ 12:07:53
In a new post today C. Sadeesh Kumar has a quick tip to help your script detect file types without having to rely on the extension to be correct.
In most web applications today, there is a need to allow users to upload images, audio and video files. Sometimes, we also need to restrict certain types of files from being uploaded - an executable file being an obvious example. Security aside, one might also want to prevent users from misusing the upload facility, e.g. uploading copyrighted music files illegally and using the service to promote piracy! In this article, we'll look into a few ways in which we can achieve this.
The trick to his example is in using the Fileinfo PECL extension. With the help of this extension you can look inside the file and pick out the "magic bytes" (the first few bytes of a file) and see what MIME type the file really is. He includes a simple example of using the extension on a file and a file upload script that checks the type and handles the file accordingly.
voice your opinion now!
file type detection fileinfo extension pecl tutorial
Till Klampaeckel's Blog: A roundhouse kick, or the state of PHP
by Chris Cornutt April 13, 2011 @ 08:23:03
Inspired by some of the recent discussions in the PHP community about the future of the language and the software that uses it, Till Klampaeckel has posted some of his own thoughts on the matter.
Last week the usual round of PEAR-bashing on Twitter took place, then this morning Marco Tabini asked if PHP (core) was running out of scratches to itch. He also suggests he got this idea from Cal Evan's blog post about Drupal forking PHP.
Till talks about a few different points others have made in their comments and tries to clear a few things up - the state of PECL, Drupal and PHP (and forking), PEAR and how some of this infighting might be doing more harm than good for the community.
voice your opinion now!
community opinion pear pecl drupal
Marco Tabini's Blog: Is PHP running out of itches to scratch?
by Chris Cornutt April 12, 2011 @ 12:02:31
In a new post to his blog Marco Tabini poses an interesting question - is PHP running out of itches to scratch in the evolution of the language?
think it's fair to say that the pace at which PHP core is being developed has slowed down considerably over the past couple of years, while the development of many projects based on it, like programming and application frameworks, has sped up and continues to grow at a fast pace. But this doesn't mean that we're running out of steam. The PHP ecosystem is simply refocusing outside of core, where it has a lot more freedom of action.
He suggests two reasons as to why this slowdown might be happening - first that there's not a sense of strong leadership in the core development group (a feature of the project done on purpose) and the change to move new library support out to PECL and PEAR instead of directly into the core of the language.
The risk facing us, as I see it, is not that Drupal, or WordPress, or whoever may decide to fork PHP or abandon it altogether. Rather, the problem is that there is no real way for these projects to provide upstream positive feedback to PHP core.
voice your opinion now!
opinion pecl pear core library development project leadership
Lorna Mitchell's Blog: Downgrading a PECL Module
by Chris Cornutt April 07, 2011 @ 11:03:12
Most of the time you spend using PECL modules, you'll either be upgrading or installing new ones. Occasionally, though, you might need to move the other direction and roll back to a previous version. This handy tip from Lorna Mitchell shows you the handy single-command method.
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 pecl to install a specific version of a module, using the -f switch to force pecl to overwrite newer modules.
In her case, she needed to downgrade the pecl_oauth package to 1.0.0 from 1.1.0. The trick lies in the "-f" switch for the "pecl install" allowing you to specify the version to install.
voice your opinion now!
downgrade pecl module install version
Lorna Mitchell's Blog: Using Gearman from PHP
by Chris Cornutt February 16, 2011 @ 09:51:07
Lorna Mitchell has a new post today about using a popular backend processing tool, Gearman, from inside of PHP. Her example gives a full overview of how to add a new job and write the worker for it to make things happen.
Basically, this application generates some PDFs from a variety of data sources, makes images, and emails it. Since the whole data processing, image handling, PDF generation process is fairly heavy, I'm putting the requests to generate these onto a gearman queue and having some workers process the jobs.
You'll need to have the Gearman server and extension installed (sample instructions here for Ubuntu) to use the sample code she gives using the Gearman_Client and GearmanWorker objects to create the pieces of the puzzle. You can find out more about the Gearman PECL extension here.
voice your opinion now!
gearman tutorial pecl extension worker jobs example
Lorna Mitchell's Blog: Installing Gearman for PHP and Ubuntu
by Chris Cornutt February 07, 2011 @ 09:39:11
Lorna Mitchell has a (very) quick post on getting Gearman installed for PHP on an Ubuntu linux system - as easy as a few package install calls, really.
I've been using Gearman lately in a project that I'm working on, and of course a month later when I came to deploy the code, I had to look up all over again what was required for a gearman server in order to put it on the new platform. Here is the short version for my future reference (and yours, if you like)
It's an easy two-step process - one to install the Gearman packages (binaries and development) via aptitude and the other using the pecl command to install the gearman-beta package and compile it. All goes well, you should be up and running with Gearman in just a few minutes.
voice your opinion now!
gearman ubuntu package pecl install tutorial
Label Media Blog: Installing Sphinx and PECL/Sphinx on Mac OS X
by Chris Cornutt January 13, 2011 @ 13:08:20
Sam Holman has written up a new post on the Label Media blog today about installing Sphinx and PECL/sphinx on a Mac OS X system. No sample code is provided, but this will definitely help with the setup.
I've got a fairly vanilla install of Snow Leopard (10.6) and use the default installations of PHP, MySQL, Apache, et al. Installing the Sphinx open source search engine and the PECL extension wasn't too much of a pain, but would have been easier had i had the following notes to hand.
His first try was with Macports, but dependency issues shot that down quickly. Instead he opted for the more conventional path of: download the binaries of Sphinx and using the "pecl" command line too to install the PECL module. All that's left is adding the line to load the share object (sphinx.so) into the php.ini's config. You can find out more about the PECL sphinx package here
voice your opinion now!
install sphinx pecl osx tutorial commandline
Chris Jones' Blog: PECL OCI8 1.4.4 is Available
by Chris Cornutt November 11, 2010 @ 10:12:55
As Chris Jones has mentioned in a new post to his blog, the latest release of the Oracle OCI8 drivers for PHP has been released on PECL (version 1.4.4).
PECL OCI8 1.4.4 has just been released. It fixes a potential memory corruption using oci_set_* functions seen on 64 bit machines. This release can be used to update OCI8 on earlier PHP versions.
He talks about an error he's come across many times - "Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed" - and how it can be fixed with an environment setting. He updated the error message in this new version to be a bit more descriptive and help lead others to the problem more quickly.
voice your opinion now!
pecl oracle oci8 driver release error message
Elijaa.org: Using cas() command from PECL Memcached
by Chris Cornutt October 06, 2010 @ 09:16:44
On Elijaa.org there's an interesting post (from back in May 2010) about using the "cas()" command in the memcached PECL extension to update the cached value of an object while preventing collisions with other scripts that might be updating the same value.
A series of commands is not atomic. If you issue a 'get' against an item, operate on the data, then wish to 'set' it back into memcached, you are not guaranteed to be the only process working on that value. In parallel, you could end up overwriting a value set by something else. [...] But PECL Memcached come with a useful function : cas().
The "cas()" function uses a checksum pulled out when the data is uplled using "get()". This token along with the updated data is passed into the "cas()" method that does the additional checking for you. A code snippet is included to show you its use.
voice your opinion now!
pecl memcached cas checksum tutorial
Lorna Mitchell's Blog: Missing pcre.h when installing pecl_oauth
by Chris Cornutt September 27, 2010 @ 12:58:50
If you've ever come up against an error when trying to compile the pecl_oauth package (from the PECL repository), you might take a look at this new post from Lorna Mitchell on how she solved the issue and got the compile running smoothly again.
When I tried to install from PECL, it grabbed the files, ran the configure step but stopped with an error status during make. [...] Closer inspection showed this line around the point things started to go wrong: Error [...] pcre.h: No such file or directory. I didn't have the header files for pcre installed - in ubuntu the headers are in the -dev packages.
A quick call to "aptitude" to grab and install those development libraries and she was back up and running. She's running Ubuntu, but this tip is cross-distribution - you'll just have to use the package manager (and package name) of your distribution's choice.
voice your opinion now!
pecloauth install compile pecl oauth pcre header
Chris Jones' Blog: Oracle Database and Instant Client 11.2.0.2 are available on Linux
by Chris Cornutt September 16, 2010 @ 09:55:08
On his OTN blog today Chris Jones announces the release of the latest Oracle database and Instant Client libraries (11.2.0.2) for the linux OS:
The Oracle 11.2.0.2 Instant Client libraries are now available on Linux x86 and x86_64 platforms from the Instant Client home page. And they'll soon be uploaded on ULN for customers with Oracle Linux support to install via the update server. If you are one of the (not so?) few users of command line PHP then you might want to grab the new client because it has Oracle bug 9891199 fixed. You'll also need OCI8 1.4.3 from PECL.
The bug this corrected caused a shutdown delay that caused issues with command-line users and their scripts. Unfortunately, the details of the bug are only available to those with an Oracle subscription. This update will not prevent you from connecting to older versions of the Oracle databases.
voice your opinion now!
oracle database instantclient update pecl shutdown bug
Chris Jones' Blog: PHP OCI8 1.4.3 is Available on PECL
by Chris Cornutt August 10, 2010 @ 11:40:38
Chris Jones has a new post to his Oracle blog about the latest release of the OCI8 for PHP drivers to connect Oracle and PHP - version 1.4.3 - now available on PECL.
Why the two releases so close in time? The OCI8 extension is one of the few extensions that has a dual identity, being in both the PHP bundle and in the PECL repository. OCI8 1.4.2 contains the same code as in the recent PHP 5.3.3 release. The PECL bundle was made for anyone who wants a PHP 5.5.3-identical version of OCI8 when installing via PECL.
He describes some of the bugfixes that comes with this release (and what specific circumstances if effects) as well as the requirements you'll need to be able to upgrade to this new version.
voice your opinion now!
pecl oci8 oracle upgrade
Brian Moon's Blog: PHP and Memcached The state of things
by Chris Cornutt June 24, 2010 @ 09:28:32
In a new post to his blog Brian Moon takes a look at two of the memcache PHP libraries (memcache/memcached) and looks at some of the issues that might trip you up in using them.
Memcached is the de facto standard for caching in dynamic web sites. PHP is the one of the most widely used languages on the web. So, naturally there is lots of interest in using the two together. There are two choices for using memcached with PHP: PECL/memcache and PECL/memcached. Great names huh? But as of this writing there are issues with the two most popular Memcached libraries for PHP.
On the "memcache" side of things, he talks about the age of the code (not much recent development), a timeout-related parameter to the delete method and the 3.0 beta release that, in his words, "just needs to die". For the "memcached" extension things look a little brighter but there still hasn't been a stable release in over a year, at least not on the PECL side. The github repo, however, has seen quite a bit of change. The most major bug he found with this extension has to do with persistent connection leakage.
So, what should you do as a PHP developer? If you are deploying memcached today, I would use the 2.2.x branch of PECL/memcache. It is the most stable. Just avoid the delete bug. It is not as fast and does not have the features. But, it is very reliable for set, get, add.... the basics of memcached.
voice your opinion now!
memcache cache pecl extension memcached compare
Rasmus Lerdorf's Blog: Writing an OAuth Provider Service
by Chris Cornutt May 24, 2010 @ 13:57:31
Rasmus Lerdorf has written up a guide that can help you create a simple OAuth service with the help of the PECL OAuth extension.
Last year I showed how to use pecl/oauth to write a Twitter OAuth Consumer. But what about writing the other end of that? What if you need to provide OAuth access to an API for your site? How do you do it? Luckily John Jawed and Tjerk have put quite a bit of work into pecl/oauth lately and we now have full provider support in the extension. It's not documented yet at php.net/oauth, but there are some examples in svn.
He walks you through creating the consumer key registration page (so others can signup for access to your provider), making the OAuth endpoints, how to authorize the request token and send back out the access token. He also includes an actual API call to show it working.
voice your opinion now!
oauth provider service tutorial pecl extension
Ralph Schindler's Blog: Compiling Gearman (or anything) for Zend Server CE on Snow Leopard
by Chris Cornutt May 17, 2010 @ 10:41:53
Ralph Schindler has put together a guide for compiling gearman on Zend Server CE (or really anything for that matter).
Zend Server CE for Mac (as of this writing), comes compiled as an i386 executable only. This includes the PHP binary, php library, and apache binaries that come shipped with ZSCE. While ZSCE works great out the box with all the provided extensions, you might find that you want some additional 3rd party PHP extensions compiled/linked into this stack. That's where things get a little confusing, and in this post, we'll look at how to install the gearman extension.
Ralph gives you all of the commands and changes you'll need to make to get gearman compiled and ready for use on your Zend Server instance. The end result is a PECL extension that can be used as you might need.
voice your opinion now!
compile gearman pecl extension zendserver tutorial
Gennady Feldman's Blog: My recent learnings with Oracle Instant Client and OCI8 API
by Chris Cornutt May 14, 2010 @ 09:53:45
Gennady Feldman recently spent some time doing some upgrades on his Oracle servers and, in doing so had a chance to work with the latest release of their Instant Client and how it interacts with the OCI8 extension's API.
I was recently involved in upgrading our Application servers to the latest Oracle Instant Client 11.g (11.2.0.1) including installing the latest PHP OCI8 module (1.4.1). Currently Oracle provides binaries for Linux in RPM and ZIP(?) format. (Side note: It still puzzles me as to why Oracle uses ZIP files for Linux binaries as ZIP is common to Windows and is not always available or generally used on Linux.)
He had everything prepared for the move and thought things would go smoothly during the upgrade but was surprised by a few things - the RPMs that Oracle gives are broken, an issue on the pecl update for the oci8 extension and a problem that came up with dependencies and packages for the Instant Client.
voice your opinion now!
oracle upgrade instant client pecl oci8 api issue
Alex Bilbie's Blog: MongoDB + CodeIgniter 101 (Part 1)
by Chris Cornutt April 15, 2010 @ 13:05:39
In a recent post to his site Alex Bilbie shows how to integrate CouchDB and CodeIgniter to make a simple NoSQL-based application. He helps you through each step of the way - from installation down to working code.
So I've decided that I want to properly document my MongoDB exploration and I may as well help others to learn with me. [...] What I'm going to do here in part 1 is install MongoDB, install the PECL PHP extension and just play around a bit.
He installs the latest version of MongoDB from packages and the latest version of the PECL extension to get PHP connected to it. He sets up a basic CodeIgniter install and creates the basic structure of the application. He creates the simple "blog" application (quickly becoming the "hello world" for framework examples) that can take in a title, content and author and add/view the information in the locally running database.
voice your opinion now!
mongodb nosql tutorial codeigniter pecl
Lorna Mitchell's Blog: Three Ways to Make a POST Request from PHP
by Chris Cornutt January 19, 2010 @ 08:45:33
Lorna Mitchell has a new post to her blog looking at three different ways you can make a POST request to a server - cURL, Pecl_Http non-OOP and Pecl_Http with the OOP interface.
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 is useful, and if you can add PECL extensions then pecl_http is a better bet but there are a couple of different ways of using it. This post shows all these side-by-side.
Code snippets are included for each showing a request to the Flickr API. Be sure to check out the post's comments for more great ideas (like streams, the PEAR HTTP_Client package, Zend_Http_Client and other request types without cURL).
voice your opinion now!
post request curl pecl tutorial
Hasin Hayder's Blog: Using new PECL Memcached extension for storing session data
by Chris Cornutt October 19, 2009 @ 09:51:21
Hasin Hayder has a new post talking about the new memcached extension for PHP (memcached from PECL) and how it can be used to store sessions data.
Many of you already know that managing session is a critical task for web applications, specially when you want to avoid I/O hop and also a significant load over your database by writing a custom session handler. [...] This is why a central session manager is very important for your application to scale.
He walks you through the whole process - installation, setting up memcached instances and getting the extension installed and working with your PHP installation. By adding two lines to your php.ini file, the sessions can quickly and easily be stored in memcache instead of on the local server.
voice your opinion now!
session data save memcached pecl extension
Alexey Zakhlestin's Blog: XSLCache in PECL
by Chris Cornutt August 27, 2009 @ 07:56:09
In a new post to his blog Alexey Zakhlestin talks about the "rebirth" of the XSLCache extension for PHP, this time as a PECL module.
XSLCache extension for PHP, originally developed by NYTimes started its second life in PECL's repository and I am proud to announce first PECL-release. The XSL Cache extension is a modification of PHP's standard XSL extension that caches the parsed XSL stylesheet representation between sessions for 2.5x boost in performance for sites that repeatedly apply the same transform.
It works with the normal XSL extension with some small differences around which classname to use and a change to the importStylesheet function.
voice your opinion now!
pecl extension xslcache xsl
Andrei Zmievski's Blog: pecl/memcached turns 1
by Chris Cornutt July 08, 2009 @ 09:14:17
Andrei Zmievski has announced the release of the first stable version (1.0.0) of the memcached extension for PHP.
It's been stable for a while actually, but some people were hesitant to use it in production while it still had the beta designation. Well, no more, go forth and use it.
Future plans include the addition of memcached_dump and auto-ejection support. The memcached extension is a PHP library that allows your application to interface directly with a memcached server. Memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
voice your opinion now!
stable extension memcached pecl
Zend Developer Zone: Using JavaScript in PHP with PECL and SpiderMonkey
by Chris Cornutt June 04, 2009 @ 12:06:38
On the Zend Developer Zone today there's a new tutorial from Vikram Vaswani about using the Spidermonkey Javascript engine together with the PECL extension for it to create a few simple examples.
Not too long ago, it seemed like there was a pretty clear distinction between client-side technologies and server-side technologies. [...] Things aren't that clear any longer. [...] And in this article, I'm going to show you how to add a JavaScript engine to your PHP build, with a little help from PECL's SpiderMonkey extension.
The PHP extension lets you use the libraries (with your PHP 5.3+ installation) to directly create new objects and work with the Javascript like it was PHP. The end result is then passed out to the browser via a "evaluateScript" call. He illustrates how you can use objects and generate XML quickly and easily.
voice your opinion now!
pecl tutorial spidermonkey javascript
Rob Peck's Blog: PECL memcache and PHP on Mac OS X Leopard
by Chris Cornutt June 01, 2009 @ 09:31:22
Rob Peck has figured out a way to get memcache (pecl) to compile on his Mac (OS X).
So tonight I ran into an interesting issue this evening in configuring PECL memcache to run on my Macintosh. To give you a bit of background, I use the built-in copy of Apache, but with PHP (current 5.2.8) compiled from source since the version in Leopard is old and I needed some things that it didn't provide.
After finding out the problem (from a log file), he tracked down a similar issue and its solution. Trying it out, he found it worked - adding in an environment variable to tell the compiler with environment to use.
voice your opinion now!
osx compile memcache pecl
Juozas Kaziukenas' Blog: How to use external libraries in PHP?
by Chris Cornutt May 23, 2009 @ 20:26:09
As a part of his work for the WinPHP Challenge Juozas Kaziukenas looks at some of the external library types that you can use with your (Windows) PHP applications.
External libraries are useful for performance demanding tasks where PHP is simply too slow. Also PHP can work as front-end system for various back-end systems (where server doesn't provide any PHP supported communication types). I have written some posts about using .Net libraries in PHP so far, but there are some other choices available too.
He looks at the three types of library choices - PHP extensions, exec call. For what he wants to do, though, the COM objects are the best fit for the job.
voice your opinion now!
external extension pecl com
Hasin Hayder's Blog: Using OAuth PECL Extension to Talk to Twitter
by Chris Cornutt May 04, 2009 @ 10:28:26
In a recent post Hasin Hayder has taken a look at using the OAuth PECL extension (this one I assume) to connect your application's login system with Twitter's authentication backend.
if you are interested in developing twitter applications, you must have read about twitter API and it's authentication protocol. your application can fetch user's private data but it has to authenticate itself as the user for that. so there are two ways to do it: asking user to provide his twitter username and password [...] or let twitter handle the authentication on behalf of you.
This second option is where OAuth comes in. Once you've registered your application on Twitter, you can create a token and send it over to their site for validation. The idea is that, since the user has already authenticated on the Twitter site, they can allow an external application to "share" that login information/process and let the remote application fetch information about the user from he Twitter API.
voice your opinion now!
twitter oauth extension pecl tutorial token authorize
Andrei Zmievski's Blog: Bloom Filters Quickie
by Chris Cornutt April 07, 2009 @ 11:13:01
Andrei Zmievski has written a new post about a new extension he's worked up (out of curiosity for the technology) - the pecl/bloomy extension.
A Bloom filter is a probabilistic data structure that can be used to answer a simple question, is the given element a member of a set? Now, this question can be answered via other means, such as hash table or binary search trees. But the thing about Bloom filters is that they are incredibly space-efficient when the number of potential elements in the set is large.
The filters allow false positives with a defined error rate - it gives the "yes" or "no" answer based on the content and you, the developer, decide if that answer falls within a rate that's okay for you and your app. The filters also take the same amount of time to look up items no matter how many are in the set.
He includes an example of the extension in use - defining the number of elements, the false positive allowance and adding/searching data and how the responses would come back from the checks.
voice your opinion now!
bloom filter pecl extension example false positive rate data structure
Johannes Schluter's Blog: Scream!
by Chris Cornutt February 27, 2009 @ 11:14:50
After being tasked with some code that was filled with the suppression character (@) all over, Johannes Schluter decided to take matters into his own hands and write an extension to disable it.
That's annoying. So I wrote a simple extension disabling this operator. That helped. I then proposed that extension to pecl, while doing that I found out that Gopal has written a similar extension before. After short discussions we added that extension, using the name scream to pecl and released the extension there.
Documentation for the extension has already been added to the PHP manual for the "Break the Silence" operator. By enabling the setting (either in your php.ini or via an ini_set) turning on "scream_enabled", any use of the suppression operator (@) will be nulled out and all according error messages will be displayed.
voice your opinion now!
screan suppression operator pecl extension remove phpini
Andrei Zmievski's Blog: New memcached extension
by Chris Cornutt January 29, 2009 @ 16:18:36
Andrei Zmievski has posted about updates that have been made to the memcached extension for PHP:
The first project the I've been working on since joining Digg has seen the light of day. It's a new PHP extension for interfacing with memcache servers and it is based on the libmemcached library, which is becoming the standard client library for this task. [...] There is another memcache PECL extension, but this one offloads the intricacies of communicating with memcache onto libmemcached and instead concentrates on exposing a sensible API and some cool features like asynchronous requests and read-through caching callbacks.
You can find out more about the extension on its PECL project page and more about the memcached library from the project's website.
voice your opinion now!
memcached extension digg development pecl download
Antony Dovgal's Blog: locating memory hungry code with memtrack
by Chris Cornutt January 28, 2009 @ 11:19:18
Sometimes finding that one spot in your code that's geting bloated and consuming at majority of your memory can be a bit difficult. Antony Dovgal has proposed one solution in a new post to his blog - the memtrack extension for from PECL.
We needed to locate where most of the memory is allocated in our scripts (as some of them became too memory hungry), so I've created memtrack extension. This extension helps us to see unusually big memory allocations in production code.
The extension logs memory usage information out to the standard error log file (however that'd defined on your system) and comes with a few configuration options. These let you control things like a "soft limit" at which to report the usage problems, the ability to ignore certain functions that you might know will cause a high load and and "vm_limit" setting that can help if your script is leaking memory at the end of its run.
voice your opinion now!
memory leak memtrack pecl extension bloat problem
Ant Phillips' Blog: Extending PHP in Project Zero
by Chris Cornutt January 22, 2009 @ 10:25:18
Ant Phillips has a brief comparison of PHP and the Project Zero methods for using PHP/PECL extensions (largely written in C) in each environment.
The Zend Engine provides an extension API. This allows anyone to write classes, functions, constants and much more that plug in to the php.net runtime. Taking a peek at the php.net source code in CVS reveals just how many extensions there are.
[...] Zero has a very similar architecture that separates engine and extension. The main difference is that the core PHP language engine is written in Java. Zero also has a comprehensive API called XAPI-J that allows Java extensions to be written for the Zero PHP runtime.
The main difference between the two is the obvious recompile that the Project Zero extensions will have to go through (via JNI) to work correctly with their version of the core. This allows it to be able to use just about any PHP extension out there and saves a lot of work on recoding the great functionality already there.
voice your opinion now!
extension projectzero api pecl interface jni runtime source
Christian Stocker's Blog: Upload Progress Meter extension 0.9.2 released
by Chris Cornutt January 22, 2009 @ 09:36:38
Christian Stocker has released the latest version of the uploadprogress extension to the PECL repository (0.9.2). The package allows the code to track the progress of an upload automatically.
The main new function since 0.9.1 is uploadprogress_get_contents($id), which allows you to analyse the content of an uploading file during the upload and do appropriate measure (for example warn the user, that he doesn't upload a supported video format). You have to enable this feature in php.ini to make it work. This feature was provided by Ben Ramsey, so you have to poke him, if something's wrong with it.
A simple example of it in action is also included (in the /examples subdirectory off of the PECL page) showing how to upload a file, get the progress and - most importantly - how to get useful error messages out of it.
voice your opinion now!
upload progress pecl extension example contents analyze
Zend Developer Zone: Reading Access Databases with PHP and PECL
by Chris Cornutt November 26, 2008 @ 13:26:12
The Zend Developer Zone has a new tutorial posted today from Vikram Vaswani about accessing a database with the help of the MDBTools PECL extension to read from a Microsoft Access datbase.
In this article, I'll introduce you to PHP's MDBTools extension, which provides an API to programmatically read data from Microsoft Access database files. If your project involves working with such files, extracting database records either for calculations or for conversion to other formats, you'll find this extension invaluable.
He steps through the installation of the extension (via the pecl command line tool) and some sample code that grabs the tables, all of their attributes and how to select the data out from them.
voice your opinion now!
read database tutorial msaccess microsoft access pecl extension mdbtools
Matthew Turland's Blog: Benchmarking PHP HTTP Clients
by Chris Cornutt November 24, 2008 @ 07:56:30
Matthew Turland has this new blog post looking at some benchmarks he's generated for a group of mainstream PHP HTTP clients:
One of the interesting bits of research that I've done is benchmarking various mainstream PHP HTTP clients. Of course, we all know that there are lies, damned lies, statistics, and benchmarks, so take these with a grain of salt.
He ran them on his Sony Viao on Ubuntu with a stock PHP5 package. The tested packages were the pecl_http extension, the streams http wrapper, curl integration into PHP 5, PEAR::HTTP Client class and the Zend_Http_Client component. He includes the code he used for both a basic request and for something slightly more complex (posting form data). He used the XDebug and KCachegrind combination to produce the results.
voice your opinion now!
benchmark http client pecl pear zendframework streams curl
Zend Developer Zone: Dynamically Generating PDF Files with PHP and Haru
by Chris Cornutt November 19, 2008 @ 17:47:40
New on the Zend Developer Zone there's a tutorial written up by Wil Sinclair looking at building dynamic PDF files in PHP with help from Haru.
This incredible versatility also applies to the topic of today's article: the PDF, or Portable Document Format. Not content with just one, PHP actually comes with two different extensions that allow developers to dynamically generate PDF documents: the PDFlib extension, and the libHaru extension. Over the next few pages, I'm going to take a quick look at the Haru extension, providing you with a brief overview of its functions and demonstrating how you can use it in your PHP development.
The tutorial walks you through the installation of the extension and several examples of it in use - everything from simple text input out to text transformations, drawing shapes and adding annotations.
voice your opinion now!
dynamic pdf generate haru extension pecl tutorial
Zend Developer Zone: Reading and Writing MP3 and Photo Metadata with PECL
by Chris Cornutt November 11, 2008 @ 08:44:45
The Zend Developer Zone has a new tutorial from Vikram Vaswani looking at the reading and writing of metadata for mp3s and images with two handy PECL extensions.
It's just that every time I sit down to have a go at [finding something in my photo or mp3 library], the sheer volume of data overwhelms me and I take the command decision to deal with something easier instead. Sounds familiar? If it does, help is at hand, in the form of PHP's ID3 and EXIF extensions. These extensions can help you organize and catalog your digital media collection so that it's easier to navigate and search. Keep reading, and I'll show you how.
He installs the ID3 package first (via the pecl command line tool) and gives a few sample scripts to pull the metadata information out of a mp3 file as well as update/remove the information that's already there. He even sets up a simple SQLite database to store the information he's retrieved.
The second part of the tutorial looks at grabbing the image metadata via the EXIF extension. This can yield all sorts of information including date/time the photo was taken, the resolution, the model of the camera and various camera settings at the time. He includes a sample script that automatically makes thumbnails for the images via the exif_thumbnail function.
voice your opinion now!
pecl package id3 exif mp3 photo metadata tutorial
Zend Developer Zone: Working with RAR, LZF and BZ2 Compression Formats in PHP
by Chris Cornutt November 03, 2008 @ 12:03:01
The Zend Developer Zone has posted this new tutorial from Vikram Vaswani covering the use of different archive formats (like RAR, LZF and BZ2 compression methods) from inside PHP.
When it comes to dealing with different file formats, it's hard to faze PHP. XML documents, PDF files, JPEG images, MP3 media...you name it and, chances are, there's a PHP extension to handle it. And so it is with compression formats like RAR, LZF and Bzip2 - although these archive formats are far less common today than the ubiquitous TAR and ZIP formats, they are still actively used by many applications and projects, and continue to be supported in PHP via PECL extensions.
He pulls in a few PECL extensions to give PHP the power it needs, both for unix-based systems and Windows DLL files. He includes some sample code showing how to open up a rar file and list the contents inside as well as extract the files themselves. And, of course, code examples for compressing files into a new archive is included too.
voice your opinion now!
rar lzf bz2 compression format pecl extension dll windows tutorial
Elizabeth Smith's Blog: New Cairo Symbols in 1.8 and 1.6
by Chris Cornutt October 14, 2008 @ 09:32:10
Elizabeth Smith has worked up a post with a full listing of the new symbols in the Cairo extension (a 2D graphics library for PHP).
Originally we were only going to support the latest (1.6), but then the new 1.8 version was released and I started adding support to that as well. Then we noticed that dreadfully slow/out of date RHEL and derivatives still have 1.4 versions of Cairo floating around (yuck). So the extension will support 1.4+ However the cairo docs are incorrect in a couple of places regarding new symbols. After some header diffing here is a complete list for 1.8 and 1.6 (to make life easier for anyone else writing language wrappers).
Her list includes forty new symbols for the 1.8 release of the extension and twenty-two for version 1.6.
voice your opinion now!
cairo graphic library 2d extension pecl
Zend Developer Zone: Dynamically Creating Graphs and Charts with PHP and GDChart
by Chris Cornutt August 14, 2008 @ 15:12:58
The Zend Developer Zone has a new tutorial posted today (from Vikram Vaswani) that focuses on making charts and graphs with the help of the GDChart extension for PHP.
This extension, which is freely available from PECL, can significantly reduce the amount of work involved in dynamically generating graphical representations of numerical data at run-time. Over the next few pages, I'll introduce you to this extension, illustrating its important features and showing you just how easy it is to get your Friday evening back.
The tutorial shows how to get and install the extension as well as including a few usage examples - a simple charting of values (with the different chart types defined), comparing more than one set of data, changing the aesthetics of the output and a detailed look at a few of the chart types' output.
voice your opinion now!
chart gdchart extension pecl graph tutorial
William Candillon's Blog: Running Zorba with PHP
by Chris Cornutt August 13, 2008 @ 11:14:49
William Candillon passed along a note about a new PECL extension that's been released that adds the power of XQuery to the PHP world.
PHP developers beware: Zorba now has a language binding for PHP 5!
Most PHP developments have to deal with XML and since PHP version 5, the support for XML has been greatly improved and developers can use various extensions that speak XML. We strongly believe that XQuery was the missing piece in this set of tools and therefore we are very excited by this release.
You can get the full details from this post to his blog including installation instructions and usage examples for everything from a simple query to a more complex XML insertion.
voice your opinion now!
zorba pecl extension xquery install tutorial example
Christopher Jones' Blog: It's feature freeze time for PHP 5.3
by Chris Cornutt July 25, 2008 @ 09:31:10
In a new blog post Christopher Jones mentions the feature freeze that's happened for the PHP 5.3 series including the Oracle support through the OCI8 extension.
The volume of commits has recently increased in anticipation of today's feature freeze deadline. I expect the Alpha release time frame will also see high activity. Eventually, increased tightening of criteria for patch acceptance will bring us to Beta and then Production releases.
Features included in this most recent extension version include an allowance for external authentication, a change to let Reflection correctly show function/method arguments, an increase on the oci8.default_prefetch setting and correctly defining the SQLT_BDOUBLE and SQLT_BFLOAT constants.
Keep an eye out for a release on PECL with these new updates soon.
voice your opinion now!
php5 feature freeze oci8 driver extension pecl update enhance
Michael Kimsal's Blog: Why do browsers still not have file upload progress meters?
by Chris Cornutt June 26, 2008 @ 08:41:52
On his blog today Michael Kimsal asks a question that hasn't come up much in recent months - with all of the advancements browsers are adding in, why aren't there better hooks for measuring file downloads?
This current tirade stems from implementing a file upload progress meter in PHP5. Yes, PHP5.2 has some hook, and there's a PECL extension. [...] I realize this is partially a PHP issue I'm ranting about, but it's ultimately a hacky workaround to a basic piece of functionality that browsers should support.
He mentions an example where he basically directly asked a member of the IE team about it. It wasn't greeted seriously and still hasn't managed to be included in most of the popular browsers of today.
voice your opinion now!
browser flie upload progress meter pecl extension apc
Christopher Jones' Blog: PHP OCI8 1.3.3 has gone "Production"
by Chris Cornutt June 24, 2008 @ 07:56:22
Christopher Jones has noted that the latest version of the OCI8 drivers for PHP (in the PECL extension) have been pushed to the current stable package.
HP's OCI8 1.3.3 has support for Oracle's DRCP connection pooling and Fast Application Notification technologies giving it improved scalability and high availability. Overall, the re-architecture of the connection code is more stable. It fixes some obscure edge case issues and lets it handle re-started DB's better. Basic functionality is unchanged.
You can find out more about the package and download this latest edition from its PECL page or check out the whitepaper they recent;y wrote up about PHP and Oracle scalability.
voice your opinion now!
oci8 driver oracle pecl release stable production version
C7Y: Optimizing with APC
by Chris Cornutt May 28, 2008 @ 12:58:07
Brian Shire has posted a new tutorial talking about some of the benefits of caching the functionality of your website (with things like APC, not file or database caching):
Opcode caches save energy, expenses, improve overall user experience on web sites, and it's often one of the simplest optimizations to implement. This article will explain the basics of installing, configuring, and tuning an opcode cache for PHP, the Alternative PHP Cache (APC).
The article focuses on how the APC works and how to get it up and working on your installation (as pulled from the pecl repositories). They look at some of the functions the extension's API includes (like ap_cache_info or ap_store for manual caching) as well as some more advanced topics like locking performance, working with TTL, cache priming and filtering.
voice your opinion now!
tutorial optimize apc alternative cache pecl extension
Christopher Jones' Blog: PECL OCI8 1.2.5 Available
by Chris Cornutt May 13, 2008 @ 08:47:56
Christopher Jones has a (very) quick post today about the release of the latest version of the PECL OCI drivers - 1.2.5.
Hang on, weren't we up to OCI8 version 1.3? Well, yes, but that's Beta bordering on Production. In the meantime, I wanted to make the OCI8 bug fixes from PHP 5.2.6 available in a "Production" release and keep PECL OCI8 1.2 in sync with PHP 5.2. The changelog is here.
Updates include bug fixes for cursor leaking, a LOB leak, a problem with collection creation and an update to the compile option for the Instant Client to look for RPMs.
voice your opinion now!
pecl oci8 available download bugfix php5 update
C7Y: Reflections on Designing an IRC Bot in PHP, Part 1
by Chris Cornutt April 08, 2008 @ 15:25:01
Matthew Turland set out a while back to develop a bot in PHP. The result of it is Phergie an "an IRC bot written in PHP 5 with an OO API" that can be extended with components for a wide variety of features. Another pleasant offshoot from his project is this first part of two articles on the C7Y community site detailing its creation.
The PHP Community channel on the Freenode IRC network, #phpc, had a longstanding bot called "Ai". Like many bots at the time of her creation, she was based on PHP 4. [...] With the coming end-of-life of PHP 4 and at the encouragement of channel users, I decided to start a project to develop a new bot based on PHP 5 that would fully utilize its new object model and offer users a chance to contribute to the bot they used in their channel.
Matthew talks about the initial stages of development (planning, research) and some of the development process of the bootstrap file, configuration file, and driver as well as the event handling.
voice your opinion now!
design irc bot tutorial c7y pecl extension libircclient
Greg Beaver's Blog: behold pecl/phar and mighty PHP 5.3, also php|arch and php|tek
by Chris Cornutt March 27, 2008 @ 13:49:44
In a new post, Greg Beaver talks about a few things, the main one being a new release of the phar extension he's made - phar version 2.0.0a1 - a reworking of the previous functionality with loads of new features including:
- Phar now supports tar and zip archives with the same API that is supports phar archives.
- Phar has a front controller for web applications that fully handles MIME types, supports mod_rewrite-like functionality with far more flexibility
- Phar supports phar:// stream wrappers in include_path for PHP 5.2+
- Phar supports creation and modification of data-only tar and zip archives (no executable phar stub) via the PharData class.
There've also been updates to the manual for the project to reflect this new version of its API. You can download this latest version here: source or Windows DLL.
voice your opinion now!
pecl phar extension php5 api manual upgrade
Elizabeth Smith's Blog: The Great Compile Project
by Chris Cornutt March 10, 2008 @ 10:29:00
Elizabeth Smith has set out on something she calls the Great Compile Project - her effort to get all dependencies for PHP and PECL compiled on (at the least) Visual Studio 2005 transparently and provided openly.
Anyone crazy enough to help out is more than welcome. I'm currently working on the GTK dependency stack, which will hit quite a few PHP dependencies and PECL extension dependencies in the process. And yes I'd love to submit my hacks/fixes upstream, if someone could find me some information (where do you send libiconv patches?)
Her post mentions some of the things she's already been working on to help further the cause - compiling various Open Source libraries, figuring out issues surrounding MiniGW and some examples of more complex dependency issues she's come across.
voice your opinion now!
compile project windows visualstudio pecl dependency
Hasin Hayder's Blog: Installing Imagick extension for PHP in Ubuntu 7.10
by Chris Cornutt February 07, 2008 @ 09:30:00
Hasin Hayder has provided some instructions he's created to install the Imagick extension for PHP on a Ubuntu linux system (7.10) in a new blog entry.
I already have ImageMagick installed in my machine and I tried to install the Imagick extension for PHP but I was stuck with strange errors. I have spent couple of hours today to figure out what I did wrong and Why I cant build that extension. Finally I've figured out that I must install ImageMagick from source first to build that extension. Heres how to.
He walks through the install, talking about where to get the package from, where to get the PECL extension for PHP and the compile process (with the result of a .so file PHP's extension can use).
voice your opinion now!
ubuntu imagick extension pecl compile shared module
Padraic Brady's Blog: Zend_Yaml; Gone the way of the Dodo...
by Chris Cornutt February 04, 2008 @ 13:43:00
In filtering through the mass of projects that he's collected around him, Padraic Brady has decided to cut one loose - the Zend Framework package he'd been developing to introduce YAML parsing and functionality to the framework.
I've been going through all those open source projects and cutting the dead weight. [...] One of the victims of this review has been Zend_Yaml. Earlier this morning I found an odd comment on the Zend_Translate_Yaml proposal by Thomas Weidner that he was erasing his proposal on the basis that there had been no progress on Zend_Yaml.
He's removed the proposal from the Zend Framework proposal pages after receiving an email noting that the package would not comply fully to the YAML 1.1 specification and couldn't be included. With the introduction of the Syck extension into PECL, it could support it but Padraic opted to just tell the ZF group about this functionality rather than working on the build himself.
voice your opinion now!
zendyaml yaml zendframework proposal syck pecl
Sebastian Bergmann's Blog: Speaking at Conference PHP Quebec 2008
by Chris Cornutt November 15, 2007 @ 11:13:00
Sebastian Bergmann points out that he will be speaking at the upcoming PHP Conference in Quebec (2008). He will be presenting three talks/tutorials:
- Test-Driven Object-Oriented Programming - Learning and Understanding (with Marcus Borger): This PHPLab is an in-depth introduction to object-oriented and pattern-based programming using PHP 5. You will learn everything necessary to write your own cutting-edge components and applications - and of course how to use and extend components from other people or companies.
- PECL: The PHP Language Workbench: A look into PECL shows how flexible the language core of PHP, the Zend Engine, is.
- Graph-Oriented Programming with PHP: This session presents the eZ Components' workflow engine, its possible applications and the underlying principles and techniques.
You can find out more about the conference from their main website (including other speakers that will be presenting) as well as registering to reserve your space for the March 12th-14th conference.
voice your opinion now!
phpquebec2008 speaker testdriven development pecl graph oriented phpquebec2008 speaker testdriven development pecl graph oriented
Zend Developer Zone: Using YAML With PHP and PECL
by Chris Cornutt October 02, 2007 @ 07:54:56
The Zend Developer Zone has a new article today by Vikrim Vaswani covering the use of YAML (Yet Another Markup Language) with PHP via the PECL packages that support it.
If you've ever encountered the same need, or if you're just curious about the YAML format and how it can be used with PHP, then today is your lucky day. Over the next few pages, I'm going to give you a crash course in YAML and in PHP's ext/syck extension, showing you how it can be used to efficiently translate data structures from PHP to YAML, and vice-versa. Come on in, and let's get started!
The tutorial starts with an example of a YAML file before getting into the application portion. He shows how to grab the Syck extension, install it, create a simple YAML file and create a configuration file (and parser) for a simple form application.
voice your opinion now!
yaml pecl tutorial syck markup language yaml pecl tutorial syck markup language
Matthew Turland's Blog: Log Analysis and PHP
by Chris Cornutt September 03, 2007 @ 21:41:28
In a new post, Matthew Turland looks at one thing that he feels is missing from a lot of the PHP functionality currently available in the community today - log analysis features.
Log analysis is a fairly common task in the field of web development, most often analysis of web server traffic logs or what Wikipedia refers to as web analytics. PHP has no officially supported extensions designed specifically for log analysis. There are no related extensions in PECL. The only remotely related extension in PEAR is PEAR_Log, which for generating logs rather than parsing or analyzing them. In short, there is no common solution here.
He looks at the options that developers do have - make their own solution or go with a third party option. He believes, though, that a PECL extension would be more the way to go, integrating with PHP more closely and allow for easier parsing and manipulating of the data in their own log files.
voice your opinion now!
log analyze pecl extension thirdparty log analyze pecl extension thirdparty
Christopher Jones' Blog: Time for testing the final PHP 5.2 release
by Chris Cornutt August 10, 2007 @ 07:57:00
On his blog today, Christopher Jones mentions some updates that are going to be included in upcoming PHP versions as pertains to the Oracle functionality that comes bundled in.
What is happening with PHP 5 is that some bigger enhancements will be merged into a planned PHP 5.3 release. [...] Even if you are still using PHP 4, or PHP 5.1, any testing you do on 5.2.4 right now will benefit you when you get around to upgrading. PHP 5.2.4 includes OCI8 (and PDO_OCI) of course, as the code base is picked up from PHP's CVS system.
There's also a list included of bugs that have been fixed in this latest version of the PECL OCI8 connectivity including a problem with a memory limit, a segfault issue when rebinding a re-executing a statement with LOB and an allowance for the statement cache size for non-persistent connections.
voice your opinion now!
oracle oci8 connectivity php5 update pecl oracle oci8 connectivity php5 update pecl
Elizabeth Smith's Blog: PECL on Windows - Yes I'm odd
by Chris Cornutt May 24, 2007 @ 07:54:00
In a new post on her blog today, Elizabeth Smith talks about her "PECL Windows nut project" of wanting to get every single PECL extension she can get her hands on to compile under Windows.
Now there will be some that are just frankly impossible (but there are some extensions that are impossible on *nix as well - you're not going to see me messing with xmms) What does this mean? Playing with lots of open source libraries, fixing simple errors, creating config.w32 files for extensions. Basically just looking at what is broken and fixing it.
She's already started on the project, fixing several of the base extensions and moving on to try to correct one to five extensions a day. These changes are getting committed into CVS so anyone can get at them and try them out for themselves. She's also trying to get them over into the PECL4WIN packages to make things more "official".
voice your opinion now!
pecl pecl4win extension windows compile pecl pecl4win extension windows compile
Mike Wallner's Blog: Phar vs World
by Chris Cornutt May 09, 2007 @ 08:32:00
Mike Wallner talks today about a much deliberated topic in the community currently - the inclusion of the phar extension into the core distribution of PHP and how, because of not having a good addition process, things will get a little nuts:
How many people are really reading through all mails of 100+ message threads? It's going to be a chaos. Always. Once a developer has got his new, shiny and soon-to-be-world-dominating extension into the core, he'll be a even stronger advocate of the "no-new-extensions" camp. Not to disrespect any work, but this is pure rivalism, masculine - really!
When asked it the phar extension will make it into the core, Mike usually responds with "Never" simply because of the issues surrounding the personal feelings of those that would be involved with the merge.
voice your opinion now!
phar pecl extension integrate core advocate phar pecl extension integrate core advocate
Edin Kadribasic's Blog: New Snapshot Capabilities
by Chris Cornutt April 30, 2007 @ 09:21:00
In an effort to provide as much information and code about the PHP builds as possible, Edin Kadribasic (with some help from John Mertic) has created some new abilities for the snapshot build process:
Up till now we provided only the debug pack for the latest snap but several people have asked if it was possible to make one available for each snap that was provided on the site. The PECL bundle and the installer were not provided at all (although pecl4win site provides a build of PECL extensions).
As a result, he's generated and posted these packages for the latest PHP releases:
He also makes a request to other PHP-ers out there for suggestions of how to include these builds on the Downloads page right alongside the normal PHP downloads.
voice your opinion now!
snapshot build pack debug pecl download snapshot build pack debug pecl download
Irakli Nadareishvili's Blog: Install PECL Memcache with XAMPP and PHP4
by Chris Cornutt April 25, 2007 @ 12:17:00
From Irakli Nadareishvili's blog today, there's a new post that shows exactly how to get the PECL memcache client up and working with a default XAMPP installation in PHP4.
XAMPP is an absolutely wonderful, packaged, self-contained distribution of apache, mysql, php and tons of hard-to-install php extensions. [...] However, even with a long list of packaged extensions, obviously there may be a need to install an additional one. PECL Memcache client of memcached distributed cache server, is a very probable candidate for high-load systems.
Unfortunately, he notes, the default installation of XAMPP has a broken version of PECL installed and doesn't quite work like it should when new packages are installed. Thankfully, though, he found a workaround for the problem in the form of fourteen (well, really thirteen) easy steps involving things as simple as copying files, running a "make", and changing configuration settings to get things up and working.
He also includes a common error he had to figure out when making his install too - an issue where the installation might not be able to find the right libraries.
voice your opinion now!
memcache pecl client install xampp php4 memcache pecl client install xampp php4
Pierre-Alain Joye's Blog: how to do not work around filter (don't be lazy )
by Chris Cornutt December 22, 2006 @ 07:14:01
On his blog, Pierre-Alain Joye talks about the ext/filter extension and how several developers just choose to "work around" it instead of using its features right out.
On the other hand, the same persons worked around ext/filter with ugly hacks. Edin pointed me to one of these horrible codes in Serendipity, as I saw this code in other applications like flyspray, I think it is time to raise your attention about what to do not do.
The code he's referencing is a snippet that manually filters each of the superglobals to get rid of any problems that might have been put in. He points out two security problems with the code too: only use PHP functions as a fallback when filter isn't available and never use the superglobals directly outside of the filtering.
Stefan Esser has his own comments on the topic too. He votes for the other way around (own functions over filter's methods) and expresses the opinion that the ext/filter extension is a bad idea similar to the impropper use of magic_quotes_gpc.
Pierre has also responded to these comments in an update to how own blog entry. Check it out for the full story...
voice your opinion now!
pecl filter extension workaround example serendipity pecl filter extension workaround example serendipity
Community News: Lead PEAR Developer Changes Focus
by Chris Cornutt September 27, 2006 @ 10:15:00
Today, Pierre-Alain Joye has fomally announced his "retirement" from working with the PEAR project as a lead developer. He's making a shift to work mainly towards other graphics/imaging work he's been developing and to continue work with his current extensions (and a few new ones on the way).
I spoke with him on some of the things that had lead up to making this decision and he mentioned it as a two-fold reason: one was some personal conflict between other PEAR developers and himself and the other an issue of time and interest in the project. He still wants to see it succeed, but just doesn't see the time in his life right now to do his part. Pierre will continue to work with the PECL extensions and on the PHP internals groups to help improve and develope them towards future versions. Some of the extensions he lists as the ones currently in his development are things like GD, xmlwriter, Zip (of course), and filter.
It is just a normal process, things and people change. I would have preferred a slower switch, as I was working on my leave (giving lead for many of my packages to other friends).
Pierre's PEAR work can be seen on this page of his blog and includes all of his PEAR and PECL work as well as PHP internals and Pimp/Cairo/GD development work.
You can also check out the decision in his own words over on his blog.
voice your opinion now!
pear pecl extensioon internal move pear pecl extensioon internal move
Pierre-Alain Joye's Blog: Filter 0.10.0 released
by Chris Cornutt September 01, 2006 @ 03:33:19
On Pierre's blog today, there's a release announcement about the "long awaited for" version of his Filter extension - version 0.1.0.0.
This release will be included in the upcoming PHP 5.2.0RC3, which is likely to be the last RC. Please report any trouble you find, and post your feedback (here, on the pecl-dev mailing list or in the issue tracker), it will help provide the best possible extension in the 5.2.0 release. A stable filter release should still hit the road this year.
Feature additons for this release include an input_get_args method, support for PHP's pcre expressions, JIT support, and support for custom decimal spacers. Several behaviors were changed as well, including when a value is FALSE or NULL, updates to the integer/float parser, and the default filter now being set to "raw".
You can get the complete listing of updates on the project from the Changelog and check out the project and all of its documentation on it's PECL homepage.
voice your opinion now!
pecl package filter release updates feature addition behavior change pecl package filter release updates feature addition behavior change
Bshensky's LiveJournal: Oracle Support without a Recompile
by Chris Cornutt June 07, 2006 @ 06:07:57
One struggle seems to come up over and over again for several PHP developers out there - Oracle issues. Newsgroups and message boards are filled with questions and, sometimes, a few answers. bshensky is one such user - but one that found a way to get the PEAR DB package to connect to Oracle simply and without the usual recompile it would take to get the Oracle drivers successfully installed.
I have spent a dog's age researching how to get my local PHP install to talk to Oracle using PEAR and the OCI8 client stack on my Fedora Core 4 server. I eventually came to the conclusion that it was just not possible to get OCI8 to work with a RPM(binary)-install of PHP, and I looked toward other means of getting "Web access" to Oracle using different means.
Today, I found an interesting document on the Oracle Web site that allegedly details how to get the new PECL PDO database drivers for Oracle running on PHP 5 (luckily, I run PHP 5 on my FC4 box).
The document claimed that you could use PDO to load a database driver on the fly without the need for a recompile. All bshensky saw left to do was getting PDO installed (via PEAR) and getting it to pick up on the Oracle libraryes to help make the connection. A few quick commands and environment variables later, he had a complete and working PHP install with Oracle functionality called on the fly.
voice your opinion now!
oracle support libraries pdo recompile pear pecl oracle support libraries pdo recompile pear pecl
Wez Furlong's Blog: More PDO PECL Releases
by Chris Cornutt May 02, 2006 @ 06:55:56
Wez Furlong has posted some information today on his blog hot on the heels of the PHP 5.1.3 release about the inclusion of the latest PDO/PDO drivers in the release.
PHP 5.1.3 was just released, including the latest PDO and PDO drivers. If you're still running older releases of PHP you should probably upgrade. If you don't want to upgrade the PHP core then you'll be pleased to know that I've also released the PHP 5.1.3 versions of PDO, PDO::MYSQL, PDO::PGSQL, PDO::SQLITE and PDO::ODBC to PECL--these are the versions that I've had time to personally test.
These are identical to the code in PHP 5.1.3, with the exception of PDO::ODBC, which includes two additional bug fixes that didn't make it in time.
He also shares a note for those out there trying to build PDO drivers off of the older PECL drivers to work in PHP 5.1.2. Unfortunately, they were also filing bug reports when things broke - a thing that "doesn't make sense" when the bundled PDO should work just fine.
voice your opinion now!
pdo pecl release latest version 5.1.3 bugfixes pdo pecl release latest version 5.1.3 bugfixes
Ilia Alshanetsky's Blog: GDChart & Fileinfo Releases
by Chris Cornutt January 04, 2006 @ 06:48:21
According to this new post from Ilia Alshanetsky's blog, he's wrapped up new versions of his PECL extensions, Fileinfo and GDChart.
Just finished packaging Fileinfo 1.0.3 that finally builds on both PHP 5.1 and 5.0 properly. You can download the new version by running "pecl install fileinfo" or download the tgz file from here.
I've also made the release of GDChart 0.2 that is nearly a complete rewrite of the extension, originally written by Rasmus that allows it to work with PHP 5.1. This extension wraps around the bundled gdchart library and allows you with just a few lines of code draw 20 different graphs types.
The GDChart package looks especially useful, making it a simple matter of feeding in the data you want to render and out popps a graph. Previously, there's been this functionality via other scripts, but it's nice to see something native...
voice your opinion now!
pecl fileinfo gdchart new releases pecl fileinfo gdchart new releases
Mike's Blog: PECL HTTP module - A nasty bug and a new example
by Chris Cornutt December 07, 2005 @ 07:58:43
From Mike's blog today, he has this post that looks at the PECL::HTTP extension and a "nasty bug" he's fixed.
I just fixed a nasty bug which caused GZIP encoded files (speak tgz etc.) to be decoded. While it'll just eat some memory on a 200 response (besides that the body is not what one would expect), it'll eat all memory on 206 (partial content) responses because the part is fed through zlib. I'll just need to revisit the HTTP RFC to check if checking for the "Vary" response header is the best bet before I drop the new release.
Also included in the post is an example script covering how one can download large files with the same, corrected extension...
voice your opinion now!
PECL HTTP nasty bug PECL HTTP nasty bug
Greg Beaver's Blog: New PECL Docblock Extension
by Chris Cornutt November 22, 2005 @ 05:51:18
On Greg Bewaver's blog today, there's this new post providing some information about a new PECL extension for DocBlock creation/parsing he's created.
I just released pecl at pecl.php.net, my first PHP extension. docblock is to phpDocumentor docblocks what the tokenizer extension is to PHP itself. It takes a docblock as an argument, and returns an array of tokens. Parsing docblocks in PHP has always been a major pain, and also very difficult to do correctly, because certain kinds of code simply won't parse correctly without a proper scanner (such as docblocks containing and @fopen - phpDocumentor 1.3.x will try to parse the "@fopen" tag).
He notes it's only really been tested with PHP 5.1, but has shown some promising results so far. And, for users of phpDocumentor, he also provides a quick update on the status of that project as well...
voice your opinion now!
pecl docblock extension phpdocumentor pecl docblock extension phpdocumentor
Ben Ramsey's Blog: PECL Input Filter
by Chris Cornutt November 18, 2005 @ 05:12:17
In Ben Ramsey's latest post today, he talks about filtering user input and some of the wealth of discussions that have come up about it on the php-general mailing list.
Richard Lynch even tossed out a few of his ideas concerning the use of a $_CLEAN superglobal variable that would merely serve as a reminder to programmers (through its constant use in the PHP manual) to filter input as a "best practice" (see here and here). Furthermore, on Chris Shiflett's blog, Richard comments that "[s]urely our base solution for minimal Security should be a fundamental part of the PHP language, not some add-on second thought."
I tend to agree with Richard, and that's why I've been paying attention to the PECL Input Filter extension.
Ben starts from the beginning, talking about the Input Filter's roots (from Derick and Rasmus), and Richard's point about security tools being a "fundamental part of the PHP language". He gives an example of a form and how an integrated PHP extension might look to handle the filtering, and his personal opinion on the matter:
It should be noted that it is just as easy to filter input without these built-in functions, but, perhaps, with the inclusion of these functions, it will encourage others to start properly filtering data.
voice your opinion now!
pecl input filter form extension pecl input filter form extension
|
Community Events
Don't see your event here? Let us know!
|