Tutorials and Talks Google App Engine for PHP with PhpStorm

On the Google Cloud Platform blog there's a recent post showing you how to directly integrate the Google App Engine PHP support with the popular PHP IDE PhpStorm for seamless development. His example shows how to integrate the IDE with the Google Cloud SQL service. He shows how to create a new user (via the API console) and how to connect that user in PhpStorm. He includes a CREATE statement for a sample table and the PHP code to connect.



Symfony2 Components Overview EventDispatcher

The ServerGrove blog continues their spotlight on the various components that make up the Symfony2 framework in their latest post about the EventDispatcher. The post includes a brief introduction to the Mediator design pattern and how the EventDispatcher implements it. Sample code is included showing how to make a dispatcher, add events and dispatch an event to a waiting listener. There's also a comparison between "event listeners" and "event subscribers", pointing out that the latter has more flexibility when it comes to event priority.



Running Symfony 2 Applications in OpenShift

Hasin Hayder has posted a guide to getting a Symfony2 application up and running in an OpenShift instance. OpenShift is a cloud hosting service that makes deploying and scaling applications simpler. He shows you how to set up a Zend Server (5.6) instance and grab the repository through a git checkout. The commands to create a new Symfony2 application (via Composer) are also included. With a small change to the .gitignore, the needed configuration files and directories will no longer be ignored and will be pushed. There's also a bit of information about setting up and using the provided database instance.



Install and Run Symfony 2.3.6 projects in OpenShift instances in just one minute with this boilerplate repository

Hasin Hayder has a new post today sharing a boilerplate configuration and setup he's created to get Symfony2 running on OpenShift in "just one minute". OpenShift is RedHat's platform as a service that makes it easier to set up and deploy web apps. This repository helps you set up the Symfony instance that's ready to go. He walks you through the steps you'll need to create the OpenShift "gear" and configure it to work with Symfony and MySQL.



Data Providers and Arrays

Chris Hartjes, testing guru, has a post talking about using arrays in data providers for your unit tests. More specifically about some odd behavior one developer was seeing in their tests. The issue (example code included) was in how the data providers are expecting the data to be returned. His test was expecting an array but the data provider was returning things incorrectly. As Chris points out, the provider should return an array of arrays. The fix is easy, but could be confusing to someone not used to this slightly unusual return format.



Auto Generate Properties Dynamically For All Your Classes Using Magic Methods & Reflection

Accessing private class properties via getters and setters is a pretty standard way to write your applications. Unfortunately it can be time consuming to write them for every property your class may have. On 7PHP.com Khayrattee Wasseem has a few ideas (including using PHP's own Reflection functionality) to dynamically create them. He shows two different methods to accomplish this kind of dynamic access, one using traits and the other using normal class inheritance. Also included is the code illustration for each solution and he talks a bit at the end of each section about why that method might be better than the other.



Introducing Laravel Part 2

The Developer Drive blog has posted the second part of their series introducing the Laravel PHP framework. In this new tutorial they build on the basics from part one to briefly discuss controllers and the Eloquent ORM. They explain some of the basics of controllers first including a bit of sample code showing how to output a basic view and add a new route. Following that is a brief look at using the ORM and making a model - a Post - and defining the table it relates to.



Encryption Methods Using PHP

Posted on the YourHowTo tutorial website this week - Encryption is the basic of them all when it comes to security. In basic scripting md5 is the easiest basic method of encryption. A lot of developers use this for basic protection, including wordpress developers for their passwords. I confirmed this today when a client of mine was having issues with his access in his wordpress blog. Well anyway, in this article I’m going to show you some easy encryption methods using php.



Install Lighttpd Web Server on Linux

Lighttpd was designed for security, speed, compliance and flexibility, all in one little package. It has been used in the past to serve several big websites like wikipedia, youtube and meebo. This article shows you how you can install this web server on linux Ubuntu / Debian operating systems. There is no repository needed for Lighttpd so you just need to proceed and run the command.



Debugging PHP Applications with HHVM

On the Qandidate.com blog there's a new post showing you an easy way to debug HHVM applications via the built-in debugging tool and it's command line interface. The HHVM is the virtual machine version of the HipHop compiler Facebook created to speed up PHP execution. To illustrate, they create a super simple PHP script and show how to start up the HHVM in debug mode. They introduce you to the commands you'll need to step through the script execution and locate the breakpoints where errors are happening. You can do things like print out the current values of variables, set conditional breakpoints and get a stack trace for the execution so far.



Using Scrypt in PHP-based Websites

Scott Arciszewski has posted a new tutorial to his site helping you get scrypt installed as an alternative to some of the other cryptographic functionality that's already supported by PHP. He walks you through the exact steps you'll need to get scrypt installed and working happily with PHP (provided you have root on the machine). Thankfully, it's pretty easy thanks to the scrypt extension updated version of a scrypt wrapper you can use in your applications.



Symfony2: Some Things I Don't Like About Bundles

Matthias Noback has shared a few things he doesn't like about Symfony bundles, the drop-in components that easy extend Symfony-based applications. For each section there's an explanation and sample code where needed to illustrate the point. On the Google Cloud Platform blog there's a recent post showing you how to directly integrate the Google App Engine PHP support with the popular PHP IDE PhpStorm for seamless development. His example shows how to integrate the IDE with the Google Cloud SQL service. He shows how to create a new user (via the API console) and how to connect that user in PhpStorm. He includes a CREATE statement for a sample table and the PHP code to connect.The ServerGrove blog continues their spotlight on the various components that make up the Symfony2 framework in their latest post about the EventDispatcher. The post includes a brief introduction to the Mediator design pattern and how the EventDispatcher implements it. Sample code is included showing how to make a dispatcher, add events and dispatch an event to a waiting listener. There's also a comparison between "event listeners" and "event subscribers", pointing out that the latter has more flexibility when it comes to event priority.Hasin Hayder has posted a guide to getting a Symfony2 application up and running in an OpenShift instance. OpenShift is a cloud hosting service that makes deploying and scaling applications simpler. He shows you how to set up a Zend Server (5.6) instance and grab the repository through a git checkout. The commands to create a new Symfony2 application (via Composer) are also included. With a small change to the .gitignore, the needed configuration files and directories will no longer be ignored and will be pushed. There's also a bit of information about setting up and using the provided database instance.Hasin Hayder has a new post today sharing a boilerplate configuration and setup he's created to get Symfony2 running on OpenShift in "just one minute". OpenShift is RedHat's platform as a service that makes it easier to set up and deploy web apps. This repository helps you set up the Symfony instance that's ready to go. He walks you through the steps you'll need to create the OpenShift "gear" and configure it to work with Symfony and MySQL.Chris Hartjes, testing guru, has a post talking about using arrays in data providers for your unit tests. More specifically about some odd behavior one developer was seeing in their tests. The issue (example code included) was in how the data providers are expecting the data to be returned. His test was expecting an array but the data provider was returning things incorrectly. As Chris points out, the provider should return an array of arrays. The fix is easy, but could be confusing to someone not used to this slightly unusual return format.Accessing private class properties via getters and setters is a pretty standard way to write your applications. Unfortunately it can be time consuming to write them for every property your class may have. On 7PHP.com Khayrattee Wasseem has a few ideas (including using PHP's own Reflection functionality) to dynamically create them. He shows two different methods to accomplish this kind of dynamic access, one using traits and the other using normal class inheritance. Also included is the code illustration for each solution and he talks a bit at the end of each section about why that method might be better than the other.The Developer Drive blog has posted the second part of their series introducing the Laravel PHP framework. In this new tutorial they build on the basics from part one to briefly discuss controllers and the Eloquent ORM. They explain some of the basics of controllers first including a bit of sample code showing how to output a basic view and add a new route. Following that is a brief look at using the ORM and making a model - a Post - and defining the table it relates to.Posted on the YourHowTo tutorial website this week - Encryption is the basic of them all when it comes to security. In basic scripting md5 is the easiest basic method of encryption. A lot of developers use this for basic protection, including wordpress developers for their passwords. I confirmed this today when a client of mine was having issues with his access in his wordpress blog. Well anyway, in this article I’m going to show you some easy encryption methods using php.Lighttpd was designed for security, speed, compliance and flexibility, all in one little package. It has been used in the past to serve several big websites like wikipedia, youtube and meebo. This article shows you how you can install this web server on linux Ubuntu / Debian operating systems. There is no repository needed for Lighttpd so you just need to proceed and run the command.On the Qandidate.com blog there's a new post showing you an easy way to debug HHVM applications via the built-in debugging tool and it's command line interface. The HHVM is the virtual machine version of the HipHop compiler Facebook created to speed up PHP execution. To illustrate, they create a super simple PHP script and show how to start up the HHVM in debug mode. They introduce you to the commands you'll need to step through the script execution and locate the breakpoints where errors are happening. You can do things like print out the current values of variables, set conditional breakpoints and get a stack trace for the execution so far.Scott Arciszewski has posted a new tutorial to his site helping you get scrypt installed as an alternative to some of the other cryptographic functionality that's already supported by PHP. He walks you through the exact steps you'll need to get scrypt installed and working happily with PHP (provided you have root on the machine). Thankfully, it's pretty easy thanks to the scrypt extension updated version of a scrypt wrapper you can use in your applications.Matthias Noback has shared a few things he doesn't like about Symfony bundles, the drop-in components that easy extend Symfony-based applications. For each section there's an explanation and sample code where needed to illustrate the point.