PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
PhpRiot Latest Blog Posts
Displaying blog posts 101 to 120 of 224

Warren Tang's Blog: PHP Unit Testing & Mock Objects with SimpleTest plugin for Eclipse

Warren Tang's Blog: PHP Unit Testing & Mock Objects with SimpleTest plugin for Eclipse
Warren Tang has put together this new post to his blog showing how you can use the SimpleTest extension for Eclipse to execute your tests without leaving the IDE.He breaks it down into a few simple steps (some including screeshots): Download the plugin Install and configure Create a basic test with an assertion Run the test via "Run As SimpleTest" He also includes the option for running the test as a web page, but that requires a little bit more code. There's also a quick look at how to run a suite of...

Announcing June's Zend Framework Bug Hunt Days

Announcing June's Zend Framework Bug Hunt Days
For those who haven't put the reoccurring event in their calendar, this announcement is for you: the Zend Framework Monthly Bug-hunt is here again! Next Thursday, Friday and Saturday (the 23rd, 24th and 25th of June), we'll be hosting our monthly bug hunt. For those of you unfamiliar with the event, each month, we organize the community to help reduce the number of open issues reported against the framework.

9Lessons: Import GMail Contacts Google OAuth Connect with PHP

9Lessons: Import GMail Contacts Google OAuth Connect with PHP
In a recent post to the 9Lessons.info site, Srinivas Tamada shows you how to connect Gmail with your system to import contacts via the magic of OAuth (pulled from Gmail to you).Inviting friends is the most important part of the web project success. This post explains you how to import Gmail contacts from address book via Google open authorization protocol connect with PHP. It's simple just few configurations follow below four steps, use this script and give option to invite more friends.Following a few...

Josh Adell's Blog: Neo4j for PHP

Josh Adell's Blog: Neo4j for PHP
Josh Adell has written up a new post for his blog showing some of his experience connecting PHP to Neo4j, a graph database (and open source project). It helps to solve a problem of related datasets and the difficulties that traditional RDBMS have with them.Lately, I've been playing around with the graph database Neo4j and its application to certain classes of problems. Graph databases are meant to solve problems in domains where data relationships can be multiple levels deep. [...] As you continue to add...

Nicolas Grekas (on Github): Improved handling of HTTP requests in PHP

Nicolas Grekas (on Github): Improved handling of HTTP requests in PHP
As Nicolas Grekas shows in this tutorial (posted as a gist), the functionality that PHP gives users to work with the raw HTTP requests is pretty limited. There's a few solutions he offers, but none of them allow for the full use of the HTTP options provided by the server.HP offers comprehensive autoglobals to access external data sent with each request. These variables do not expose all the possibilities allowed by the HTTP protocol, but a controlled use can in practice minimize the impact of this...

DevShed: Implementing the ArrayAccess Interface - PHP

DevShed: Implementing the ArrayAccess Interface - PHP
In the first part of a new series over on DevShed.com, they introduce the concept of "segregated interfaces" and show how to use them to work with collections of arrays (using interfaces that are a part of the SPL).To start illustrating why segregated interfaces are really useful, in the lines to come I'm going to build an example that will recreate the scenario described in the introduction. Basically, what I want to achieve here is to construct a custom countable array collection.He shows the basic...

Site News: Popular Posts for the Week of 06.17.2011

Site News: Popular Posts for the Week of 06.17.2011
Popular posts from PHPDeveloper.org for the past week:PHPBuilder.com: PHP Multithreading with cURL Adminxweb.com: PHP Frameworks Benchmarked: Here Are the Results DZone.com: Hardening PHP: How to securely include remote code (part 1) Robert Eisele's Blog: PHP Hacking Richard Miller's Blog: Symfony2: Moving Away From the Base Controller Stefan Koopmanschap's Blog: What PHP needs (well, what I think it needs) Slawek Lukasiewicz's Blog: Working with date and time in object oriented way Jason Stiles' Blog:...

PHP email admin script

PHP email admin script
Copyright A 2011 http://www.prodevtips.com. Visit the original article at http://www.prodevtips.com/2011/06/17/php-email-admin-script/.If you've read the article about my email server setup you quickly realize that adding a new email account is quite onerous, a combination of adding records to tables in a MySQL database and creating folders on the harddrive. This can easily be automated with for instance PHP and I'll show you how below.... Read More

Till Klampaeckel's Blog: RFC: Mocking protected methods

Till Klampaeckel's Blog: RFC: Mocking protected methods
Till Klampaeckel has a new post to his blog today looking at the method he's found (through some help from others) to be able to mock out protected methods in his unit tests.I wrote a couple tests for a small CouchDB access wrapper today. But when I wrote the implementation itself, I realized that my class setup depends on an actual CouchDB server being available and here my journey began.It was his first experience trying to mock out parts of a class, and he found it a bit difficult to use even after...

Chris Jones' Blog: Oracle Resources for PHP

Chris Jones' Blog: Oracle Resources for PHP
On his blog today Chris Jones has posted a long list of resources that the PHP developers using Oracle as a backend could find useful in their development.He's broken them up into categories to help split things out a bit:Some overall links The OCI8 extension Databases like Oracle Express Edition, MySQL, Oracle Berkley DB the NetBeans IDE Oracle Linux and Tuxedo Oracle Instant Client Several of the descriptions also come with their own "Install Now" links to help you get started using them quickly....

Sameer Borate's Blog: Taking screenshots of websites in PHP

Sameer Borate's Blog: Taking screenshots of websites in PHP
In a new post Sameer Borate shows you how to take screenshots of websites with PHP (and a little help from the wkhtmltoimage tool).aking screenshos of websites is not a frequent requirement for developers but can come handy on many occasions. Although there are some nice solutions on the web, a particular one I found very good is wkhtmltoimage. wkhtmltoimage is a simple shell utility which can be used to convert html to images using the webkit rendering engine, and qt.He includes some brief instructions...

DZone.com: Automated code reviews for PHP

DZone.com: Automated code reviews for PHP
On the Web Builder Zone (a part of DZone.com) Giorgio Sironi take a high-level look at some of the tools you can use for automated code reviews in your projects without you ever having to lift a finger (well, once it's set up, of course).I'm exploring an approach to automated code review: it's not as precise as the human-based one, but it scales better. [...] All in all, automated code reviews, performed with tools instead of with human intellect, can be a starting point to search for the problematic...

Community News: PHP Conference Brazil Call for Papers Opened!

Community News: PHP Conference Brazil Call for Papers Opened!
The PHP Conference Brazil for 2011 has officially opened their Call for Papers for this year's event.All sessions should be about one hour in length (50 minutes for the presentation itself and 10 for question and answer time) and the deadline of for submission is August 5th, 2011. They'll take the submitted sessions and evaluate them in a committee based on their relevance, originality and how they relate to the current state of the web to make their choices. The list of sessions will be released...

Freek Lijten's Blog: Currently on PHP's internals...

Freek Lijten's Blog: Currently on PHP's internals...
Freek Lijten has a recent post looking at some of the types of discussions that happen on the php-internals mailing list.The internals list is the place to be to hear about the current state of PHP. It is one of PHP's many mailing lists, but this is the one where (core) developers discuss new features, current bugs and wild ideas. If you want to keep up with things it is a good idea to sign up, it is not an extremely high volume list and if you ignore the noise it is quite informative. In this article I...

Site News: Blast from the Past - One Year Ago in PHP

Site News: Blast from the Past - One Year Ago in PHP
Here's what was popular in the PHP community one year ago today:Otto on WordPress: WordPress 3.0: Multisite Domain Mapping Tutorial PHPBuilder.com: Three Advanced Object-Oriented PHP Features You Need to Know phpRiot.com: Combining PHP, JSON and jQuery Screencast Chris Hartjes' Blog: Book Review - CodeIgniter 1.7: Professional Development Listmania: 10 Books To Help You Master PHP Development Smashing Magaine: Drupal Cheat Sheet Desktop Wallpaper Simon Jones' Blog: Admin sub-modules in Zend Framework...

RFC: Mocking protected methods

RFC: Mocking protected methods
Update, 2011-06-16, 12:15 AM Thanks for the comments. (I swear I had something like that before and it didn't work!) Here's the solution: $userId = 61382; $docId = 'CLD2_62e029fc-1dae-4f20-873e-69facb64a21a'; $body = '{"error":"missing","reason":"problem?"}'; $client = new Zend_Http_Client; $client-setAdapter(new Zend_Http_Client_Adapter_Test); $couchdb = $this-getMock('CouchDB', array('makeRequest',), array($userId, $this-config,)); $couchdb-expects($this-once()) -method('makeRequest')...

Oracle Resources for PHP

Oracle Resources for PHP
Here are some key resources for working with PHP and Oracle technologies. Overall LinksOracle : Oracle Technology Network (OTN) Homepage : The PHP Developer Center -- downloads, how-tos, sample code and discussion forums brought to you by OTN.Read : PHP Articles -- a collection of informative articles on OTN. Technology : Download the newest versions of other software in Oracle's Technology Stack. Read about other Oracle application development tools. PHP Oracle Database Extension : OCI8 is the...

Henry Hayes' Blog: Firebug Console.Log for PHP using Zend Framework

Henry Hayes' Blog: Firebug Console.Log for PHP using Zend Framework
Henry Hayes has written up a handy post to his blog looking at using FirePHP and Zend_Log_Writer_Firebug to log messages directly to your Firefox's Firebug console.Due to sloppy programming in the past many PHP error logs can become very clogged up and, unless you use some fancy grep technique, unusable. [...] A project has been around for some time now called FirePHP. This enables us to log messages of various levels of severity to the Firebug console! - Awesome. Just imagine if you are developing an...

Games and Trips: The Maggie Test for Video Games

Games and Trips: The Maggie Test for Video Games
Games and Trips: The Maggie Test for Video Games: The tech industry isn't the only one that's male-dominated. Videogames suffer from this as well. In some musings with a friend of mine at the Games and Trips blog, we've come up with a test to determine whether a videogame at least tries to include women at all. Behold: gamesandtrips: To pass the Maggie test a video game must have: a playable female character which is available to play right away, and not as a special bonus feature In a previous post, I...

Wojciech Sznapka's Blog: Fully isolated tests in Symfony2

Wojciech Sznapka's Blog: Fully isolated tests in Symfony2
Wojciech Sznapka has a new post to his blog today looking at his creation of fully isolated tests as a part of a Symfony2 application. He talks about two issues he recently solved with testing services in this popular framework.The most important thing you should provide with your re-usable bundles is unit tests set. Lately I solved two major cases which Symfony2 hasn't got out of the box: testing services, defined in Dependency Injection Container and running model tests with fixtures in fully isolated...