In this new post from Mike Purcell shares a solution to an error he came across in his unit testing - a "Constant already defined" message - and how he fixed it.When upgrading the unit tests I had no problem, it was only when I was trying to integrate into CruiseControl that this was happening. Well after some time, I finally figured out the issue was the "ant" command to execute the unit tests was passing the -process-isolation flag to phpunit.He found that when he called it with that flag, it was...
Very often when we look at a class diagram for a new application, it's quite overwhelming. There are tons of classes, all interacting with each other. These interactions are everywhere. It actually resembles a spider web of interaction. Trying to decode this web to figure out what the application is doing can be a lesson in futility for some applications.A How then, can we design an application such that it's easy to follow? How can we build an application that's easy to understand on all levels? The...
Here's what was popular in the PHP community one year ago today:Sasa Stamenkovic's Blog: Eclipse vs NetBeans for PHP Development
Zend Developer Zone: Book Review: Producing Open Source Software
DZone.com: Hardening PHP: How to securely include remote code (part 1)
PHPBuilder.com: PHP Multithreading with cURL
Michael Nitschinger's Blog: Securing Lithium Forms
RandomBugs.com: Apache Dynamic Virtual Hosting and PHP security
Zend Developer Zone: SOLID OO Principles
Robert Eisele's Blog: PHP Hacking
Chris...
This is a liveblog from the Symfony Live 2012 event, and will be updated as the conference progresses. You can also follow the #Symfony_live Twitter hashtag
The Symfony Live event is held in the old Cite Universitaire building in Paris. While tomorrow the RER strike will make things slightly more complicated, more than 600 developers have made it here.First session of the day was Fabian Potenciers's keynote on the community. The numbers there are simply staggering, as the PHP community seems to converge...
When I read that LinkedIn leaked 6.5 million passwords, I thought it was newsworthy, so I shared it. Bummer for them, I thought, especially given a few particularly bad practices:
The hashes were unsalted SHA-1 hashes. SHA-1 was proven weak back in 2005, and unsalted hashes are especially weak.
Those who visited the LinkedIn home page were shown a fake log in form that attempts to trick users into giving away their email password. Shame, shame.
I shamed LinkedIn on Twitter and thought that was the...
In this recent post to his blog Linesh Jose shows you how to create a simple PHP-based compressor for your CSS (using some string replacement methods and a regex or two).CSS or Cascading Style Sheets is a language used to describe the presentation of a document written in a markup language. If you're developing a very complex design for your site, CSS scripts become very long, and takes too much time to load. But a compressed CSS script can help your website load faster and easily maintain its...
The slides from my presentation at PHP-GTA about the Hidden Features of PHP is now available online and can be downloaded here: http://ilia.ws/files/php-toronto_hidden_features.pdf. Hopefully everyone in attendance learned something new about PHP and many thanks to all the people who had asked questions helped make the discussion that much more interesting.
Unicache
Image Validation
Ternary Search Tree
Better PDO Pagination
Convert CSV to Excel
JavaScript and CSS minifier
A·IOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOIOI...
A few weeks ago I was sparked into a twitter conversation with Larry Garfield (@Crell) about the value of comments in code. Really, twitter is not the best place for that conversation, so I decided to write this post toA illustrateA my beliefs on commenting. Let's start this story with the tweet from Larry that set off the conversation:Nothing drives home the need for good code comments like working on code that doesn't have them.A prettyA innocuousA comment that is quite insightful. But that led me to...
On PHPMaster.com today they've posted the second part of their series looking at combining a PHP backend and an Android application (by Matt Turland). In the previous article, he helped you set up some of the Android side to be able to reach out to a PHP web service. In this second part he gets into the sending and receiving of messages between the client and server.Part 1 of this series focused on getting the Android application set up to make an HTTP request. In part 2, we'll focus on implementing the...
The Voices of the ElePHPant podcast has posted their latest interview with a member of the PHP community - Patrick Schiwsow, a leader of the Lake/Kenosia PHP User Group.Cal's three questions are about his involvement in the group:
Tell us how you got into organizing the group and give a little background on it
Share with us a couple of the things that were recommended to you for the group that worked
What's the most surprising thing you're found out about the PHP communty?
You can listen to this latest...
On the MaltBlue blog Matt has posted the latest part of the "Zend_Form with Zend_Config" series, part four looking at using and configuring some form validators.Welcome to the fourth and final part in the Zend Form Mastery with Zend Config series. Previously we looked at the basic form options, element and form wide prefixes, filters and element options. In this installment, we're going to look at configuring Zend Validators via our XML config. [...] To go in to all of them will take more time than is...
Fulltext Search with MongoDB and Solr
Berlin, Germany
Tuesday, June 5th 2012, 18:03 CEST
In this article I am explaining how you can tie MongoDB and Solr together. With the help of a little helper script in PHP that uses MongoDB's replication features we automatically generate updates in Solr. We will first look at the MongoDB side and then the Solr side.
Replication
MongoDB's replication works by recording all operations done on a database in a log file, called the oplog. The local database...
Sean Coates has a new post today sharing an example push process for the times when you either just need to push code (without the build process) or you're just deploying something simple - a "deploy on push" hook built into your github repository.Sometimes, you just need to deploy code when it's ready. You don't need a build; you don't need to run tests - you just need to push code to a server. If you use git and GitHub (and I think you should be using GitHub), you can easily deploy on push. [...] There...
Clustering databases is a mainstream technology. MySQL PHP users can take many approaches to load balancing, pooling and redirection. PECL/mysqlnd_ms is one solution. How does it handle transactions? Transactions are a challenge for every MySQL load balancer.
MySQL? Load? Clustering! Balancing! PECL/mysqlnd_ms 1.4
View more presentations from Ulf ...
As Paul Jones mentions in his latest post to his site, the much talked-about PSR standards that were proposed by the PHP-FIG group, PSR-1 and PSR-2, have been accepted.Earlier today, the PHP Framework Interoperability Group accepted two standards recommendations. [...] There's been a lot of commentary about these proposals over the past two weeks, some of it positive and some of it negative.He includes links to some of the commentary that's been made about the standards recently, and spends some time...
In this new post to his blog Henri Bergius shows you how to run the Symfony CMF with Midgard2 content repository.I've written about Decoupled Content Management before. As the Symfony Live event in Paris is nearing, I thought to give Symfony CMF a spin. Symfony CMF is a new approach at building PHP content management systems, and adheres quite well to the principles of decoupled CMS.He helps you set up the needed dependencies and content schemas as well as the YML configuration you'll need to set up to...
Development, testing, staging and production - this is how most people devide up different environments for application development.
Maintenance and setup of these environments is often not a trivial goal to achieve. Having worked with a couple different code bases and setups over the last decade, I often noticed things like environment specific hacks (if ($env == 'testing') { ... }) in application code and service configurations and a lot of manual labour all around. It's still very common that code...
Latest PECL Releases:
rrd 1.1.0
trader 0.2.1
varnish 0.9.3
sundown 0.3.6
gmagick 1.1.0RC3
Judy 0.1.3
imagick 3.1.0RC2
|
Latest PHP Tweets
|