 | 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
|
Community Events
Don't see your event here? Let us know!
|