Feeds

210446 items (123 unread) in 24 feeds

CNN CNN
MSNBC MSNBC
PHP PHP
Deals Deals
Tech Tech
Web Development Web Development
CNN Money CNN Money
Frugal Blogs Frugal Blogs

Planet PHP (16 unread)

 
  • Permalink for 'Resources for a PHP and Hudson CI Integration'

    Resources for a PHP and Hudson CI Integration

    Posted: February 7th, 2010, 4:25am MST by Benjamin Eberlei

    Yesterday I finally had the time to setup my first continuous integration environment. Possible solutions for CI are phpUnderControl, Hudson or Arbit. Although phpUnderControl is the most wide-spread, but from I heard complex to setup/maintain, solution supposedly a hack and Arbit just in an early Alpha I decided to give Hudson a shoot. Another reason for this decision, I heard it has a simple plugin architecture and is easy to install and use. Additionally Hudson is easily integrated into Netbeans and Redmine, and I use both tools regularly in development.

    My motivation to dive into CI is easily explained. I just never felt it was necessary to add a continuous integration enviroment to my projects, since I had one or two simple bash scripts that did the job. In general this is rather annoying, because they mostly only run PHPUnit and have to be done using a cronjob or manually, without any real process of notification. Additionally you have no way to navigate the test-results, code-coverage and no history of the last builds. For projects like Doctrine 2 we have the additional requirement to support 4 different database platforms, i.e. 4 different PHPUnit configurations. Currently that is solved by me using a Bash script that iterates over the configuration file names and invokes PHPUnit.

    There are already some awesome sources how to get Hudson and PHP working. I'll list them here:

    All those guides are already awesome and I would recommend choosing one of those to install Hudson, I think i can't add anything new to those. I have used Sebastians Howto, however i also like the third one. David Luhmans guide adds lots of details that are important to get the different parts of a build process to work.

    Now what these tutorials all do is that they use a bash command to execute the build process or specifiy an Ant Build file. However there is also a Phing Build process plugin for Hudson that allows to specify the build.xml targets to execute in the process. From the "Available Plugins" list you can choose the "Phing plugin".

    After installation you have to configure the Phing install. The Phing Plugin Wiki Page shows how to do this. You have to go to "Manage Hudson" => "Configure System" and look for Phing. There you find the dialog to configure your phing installations.

    In the context of choosing a build script for your project you can now choose "Phing" instead of Ant:

    You can enter the targets to build, for example on my local Hudson instance I only execute "test" for Doctrine 2, since I am not interested in the building and deployment onto the PEAR channel at this development stage.

    From inside Netbeans you can then start builds by pointing to the Hudson instance. See this tutorial by one of the Hudson + Netbeans Developers. You can then start all the builds from inside Netbeans and be notified of the success or failure.

  • Permalink for 'HipHop for PHP: First look'

    HipHop for PHP: First look

    Posted: February 6th, 2010, 7:50am MST by Rafael Dohms

    Just this tuesday Facebook announced a ambitious project called “HipHop for PHP”, if you missed it general opinion says you have been coding PHP in a cave. As I write this review no code has been posted yet, but Facebook has made a great move to open source the project so we can all get our hands on it, use it and contribute to it. So since the code is not out there yet, this is literally a first impression article based on the presentation made by Facebook and various posts from core PHP developers who got a first look at the technology before the release.

    What is it?

    To be blunt, its a PHP to C++ code transformer (compiler). But that does not make justice to it, so let’s look deeper. To those of you that know PHP intimately you understand the process behind running PHP, it is thus:

    PHP Code –interpreter–> OP CODE –Zend Engine–> Machine Language

    Generally caching solutions store OP Code and reuse it instead of running the interpreter for every request. What HipHop does is completely different and surprised quite a few people who decided to guess what they were doing. On a general view this is the process (simplified):

    PHP Code –parser–> C++ Code –g++–> Compiled binary

    Historically PHP has always been executed on the Zend Engine, heart of PHP that has been around since PHP3, but what this solution does is that the Zend Engine has been recoded into the HipHop Runtime Engine, which instead of OP Code takes in C++ code that has been generated based on the original PHP code.

    Why HipHop?

    Its a well known fact that running code in C is faster then running PHP code, for obvious reasons, its very common for large applications in PHP to port part of its codebase to C and package it into an extension, such as Yahoo and even PHP projects like Doctrine have done so, performance of simple operations can increase in as much as hundreds percent, depending on load and usage.

    This is the premise for Facebook’s project, they have long contributed to APC and PHP to get more performance out of their code, but with the increased load of billions of pages served it was not enough, they decided then to solve the problem. One of the options on the table was move on to another language all together, but this is where PHP shines, Facebook declared that PHP is simply a great solution because they can easily and rapidly get new programers up to status and developing in PHP due to its simplicity, that and the fact that their code base consists of million+ lines of code made them decide that this was not a solution, thus HipHop started.

    How does it work?

    The idea is that PHP code can be divided into “mundane” and “magic” code. Being mundane code basic operations that are directly mapped to C++ functions. This code if converted to C++ can be executed with much higher performance, while the magic code, which is the really complex code to be converted would run at equal or slightly lower speeds. This is the point that determines if you application can benefit from this, is it more mundane then magic?

    If your answer is yes, then you may want to look into it. The converter does a lot of processing identifying dependencies, doing static analysis and other operations to get the basic code, it then has to take care of the problematic issue, Typing. PHP is a weakly typed language, meaning variables can juggle their types to and from various types. In the backend of this Zend Engine implements the ZVAL type, which basically stores anything. For the C++ code the new variables are typed so the parser needs to do all this in its Type Interface. The project’s lead Engineer, Haiting Zhao, stated that one of the solutions was to map ZVALs to the C++ Variant type whenever its impossible to determine a specific type (failed type inference), or when typecasting occurs in the process of the script. After all this analysis code is finally generated.

    Thus this code is compiled against the HipHop Runtime, which as I said works like the Zend Engine and works now with specialized types instead of the abstract types in the Zend Engine. Binary in hand this can now be run straight from the command line, or interfacing with a web server as its compatible with the libevent library. Currently Facebook also wrote a very simple web server to interface with its compiled code replacing its Apache on calls to this code (as far as information goes, they proxy PHP traffic to this server and leave resources going through Apache).

    The good and th

    Truncated by Planet PHP, read more at the original (another 6982 bytes)

  • Permalink for 'Bottom K items from a stream'

    Bottom K items from a stream

    Posted: February 6th, 2010, 4:10am MST by Tobias Schlitt
    I recently had the problem that I wanted to retrieve the smallest items from a stream of data. When talking about a stream here, I refer to a data set that I do not want to load into memory completely, since it has quite a few elements. The best way to process such data is a stream approach, where you work always on a single item at a time, iteratively, without loading the full data set.In my special case, I had a database with 140,000 records. The processing of these records could not happen in the DB, since I needed to create vectors from text and perform calculation on these. Basically, I needed to check each vectors distance to a reference vector and keep only the k closest ones.So, what is a good approach to solve such a task? I decided to implement a custom data structure based on a max heap to solve the problem. In this article, I present the solution and compare it to two different other approaches in terms of a small benchmark.
  • Permalink for 'Heap, heap, hooray!'

    Heap, heap, hooray!

    Posted: February 6th, 2010, 4:10am MST by Tobias Schlitt
    I recently had the problem that I wanted to retrieve the smallest items from a stream of data. When talking about a stream here, I refer to a data set that I do not want to load into memory completely, since it has quite a few elements. The best way to process such data is a stream approach, where you work always on a single item at a time, iteratively, without loading the full data set.In my special case, I had a database with 140,000 records. The processing of these records could not happen in the DB, since I needed to create vectors from text and perform calculation on these. Basically, I needed to check each vectors distance to a reference vector and keep only the k closest ones.So, what is a good approach to solve such a task? I decided to implement a custom data structure based on a max heap to solve the problem. In this article, I present the solution and compare it to two different other approaches in terms of a small benchmark.
  • Permalink for 'Utilizing Twitter lists with Zend_Service_Twitter'

    Utilizing Twitter lists with Zend_Service_Twitter

    Posted: February 4th, 2010, 6:05pm MST by Raphael Stolt
    Twitter lists with the Zend FrameworkSeveral months ago Twitter added the list feature to it's public API. While debating some use cases for an event registration application I stumbled upon an interesting feature, which adds participants automatically to a Twitter list upon registration. This way registered and interested users can discover like-minded individuals and get in touch prior to any pre-social event activities. This post will show how this feature can be implemented by utilizing the Zend_Service_Twitter component, and how it then can be used in a Zend Framework based application.Implementing the common list featuresLooking at the three relevant parts of the Twitter list API some common features emerged and had to be supported to get the feature out of the door. These are namely the creation, deletion of new lists and the addition, removal of list members (i.e. event participants). Since the current Twitter component doesn't support these list operations out of the box it was time to put that develeoper hat on and get loose; which was actually a joy due to the elegance of the extended Zend_Service_Twitter component laying all the groundwork.

    A non-feature-complete implementation is shown in the next code listing and can alternatively be pulled from GitHub. Currently it only supports the above stated common operations plus the ability to get the lists of a Twitter account and it's associated members; but feel free to fork it or even turn it into an official proposal.
    <?php

    require_once 'Zend/Service/Twitter.php';
    require_once 'Zend/Service/Twitter/Exception.php';

    class Recordshelf_Service_Twitter_List extends Zend_Service_Twitter
    {
    const LIST_MEMBER_LIMIT = 500;
    const MAX_LIST_NAME_LENGTH = 25;
    const MAX_LIST_DESCRIPTION_LENGTH = 100;

    /**
    * Initializes the service and adds the list to the method types
    * of the parent service class.
    *
    * @param string $username The Twitter account name.
    * @param string $password The Twitter account password.
    * @see Zend_Service_Twitter::_methodTypes
    */
    public function __construct($username = null, $password = null)
    {
    parent::__construct($username, $password);
    $this->_methodTypes[] = 'list';
    }
    /**
    * Creates a list associated to the current user.
    *
    * @param string $listname The listname to create.
    * @param array $options The options to set whilst creating the list.
    * Allows to set the list creation mode (public|private)
    * and the list description.
    * @return Zend_Rest_Client_Result
    * @throws Zend_Service_Twitter_Exception
    */
    public function create($listname, array $options = array())
    {
    $this->_init();

    if ($this->_existsListAlready($listname)) {
    $exceptionMessage = 'List with name %s exists already';
    $exceptionMessage = sprintf($exceptionMessage, $listname);
    throw new Zend_Service_Twitter_Exception($exceptionMessage);
    }

    $_options = array('name' => $this->_validListname($listname));
    foreach ($options as $key => $value) {
    switch (strtolower($key)) {
    case 'mode':
    $_options['mode'] = $this->_validMode($value);
    break;
    case 'description':
    $_options['description'] = $this->_validDescription($value);
    break;
    default:
    break;
    }
    }
    $path = '/1/%s/lists.xml';
    $path = sprintf($path, $this->getUsername());

    $response = $this->_post($path, $_options);
    return new Zend_Rest_Client_Result($response->getBody());
    }
    /**
    * Deletes an owned list of the current user.
    *
    * @param string $listname The listname to delete.
    * @return Zend_Rest_Client_Result
    * @throws Zen

    Truncated by Planet PHP, read more at the original (another 14678 bytes)

  • Permalink for 'Creating Re-Usable Zend_Application Resource Plugins'

    Creating Re-Usable Zend_Application Resource Plugins

    Posted: February 4th, 2010, 12:55pm MST by Matthew Weier O'Phinney

    In my last article, I wrote about how to get started with Zend_Application, including some information about how to write resource methods, as well as listing available resource plugins. What happens when you need a re-usable resource for which there is no existing plugin shipped? Why, write your own, of course!

    All plugins in Zend Framework follow a common pattern. Basically, you group plugins under a common directory, with a common class prefix, and then notify the pluggable class of their location.

    For this post, let's consider that you may want a resource plugin to do the following:

    • Set the view doctype
    • Set the default page title and title separator

    Continue reading "Creating Re-Usable Zend_Application Resource Plugins"
  • Permalink for 'zf book review'

    zf book review

    Posted: February 4th, 2010, 12:48pm MST by PHP 10.0 Blog

    As I mentioned before, I got the book Zend Framework 1.8 Web Application Development for review. It took me a bit more time than I though to do this (one of the reasons will become clear soon) but here it finally comes.

    I think it is a great book for somebody who is somewhat acquainted with Zend Framework and wants to get really good at working with it. It covers a lot of ground, so if you never worked with ZF before you might be a bit overwhelmed by the amount of stuff going on (then again, maybe I am underestimating you ) ), so you may want either skip some detail to return to it later when the need arises or have a run through a very basic tutorial for getting to know how the framework works before. The book itself has the basic startup section but I feel for a complete newbie it still might be a bit tough to keep up with the amount of the material in the book. That of course will come handy later when you got the basics figured out.

    I personally am a big fan of learning by example and I think one line of code is often worth a hundred words, so I was really pleased that this book is based on building a complete application and comes with full application code to accompany it. The application is a storefront with an admin interface, so it covers most of the common tasks in a typical PHP application.
    While it means that on the road there were certain decisions to be taken, and certain ways of doing things will be chosen over certain others, the author clearly identifies the decision points and explains the reasons – i.e. why certain things go to a model and not controller, why this extension point and not that one is used, etc. ZF has a very rich set of features, so there’s no single “right way” to do all things – but the book certainly shows you one of the ways to reach the complete and nicely structured application.

    I actually took a bit of an experiment – as I was at the time building some ZF-based application, I decided to use the book as a first reference for any question that I needed with the app. I am pleased to report that the book indeed proved very helpful and I was able to find most of the advanced topics – like the use of ACLs, interactions between forms, views and decorators, modifying the behavior of the standard ZF classes, etc. – answered in the book and demonstrated in the code. The author successfully avoided the temptation to quote the manual extensively and instead picks up where the manual leaves off – i.e. how does one use stuff that the manual describes in practice.

    The book also covers – albeit somewhat lightly – the topic that is neglected by so many other ZF books – namely testing. It shows how to setup the test environment and how to execute some basic application tests. Ideally, I would like the topic of tests to be much more prominent and featured as something parallel to development and not something you do after (though I know that’s how it rally happens many times ;) ) – but I know there’s only so much you can put into one book )

    Summarily, I think it is a good book to have if you do or about to do serious ZF development.

    Tagged: book, PHP, zend framework
  • Permalink for 'Dymaically change z-index on Google Maps markers'

    Dymaically change z-index on Google Maps markers

    Posted: February 4th, 2010, 8:12am MST by Danne Lundqvist

    As many have noticed Google Maps API does not include a setIndex() method on the marker. You can set the z-index when adding a marker to the map. But it is not possible to change this afterwards.

    I didn’t find a good solution to the problem when searching and had to resort to my own, hacking away on Google Maps. As I was feeling really good about myself when I had it working really well I just remembered that Google Maps Javascript API V3 has been released in Google Labs… And of course there it was. The Marker class has a new method, setZIndex(zIndex:number).

    Well, version 3 of the API is still only released by Google Labs which is “home to developer products that are still in their formative stages“. So for anyone not inclined to use version 3 just yet, I’ll write down how I did it here.

    As I use JQuery in this particular project the example is also using JQuery. If used in production I suggest using try/catch wherever appropriate as the solution depends on a specific dom structure.

    I have the below html which is the container for the Google map.

    <div id="indexmap"></div>

    The map is created as below (you’ll have to add the lat/lng variable values yourselves.

    var map = new GMap2($('#indexamp'));
    var point = new GLatLng(lat, lng);
    map.setCenter(point, zoom);

    This, as most know, creates the actual map. Then it is time to add the markers. In my case I have a list of locations with the latitude/longitude in the actual html. JQuery helps me loop over these locations and dynamically add markers in the correct spots. This html looks like below. Note how each definition list have an id no with “mm_” as prefix. (Never mind any objections you have on having many definition lists like this… Never mind that these coordinates are fiction…)

    <dl id="mm_0">
      <dt>...</dt>
      <dd>
        <span class="lat">61.333</span><span class="lng">31.1324</span>
        Random text
      </dd>
    </dl>
    <dl id="mm_1">
      <dt>...</dt>
      <dd>
        <span class="lat">61.333</span><span class="lng">31.1324</span>
        Random text
      </dd>
    </dl>

    What I want is the markers to be highlighted with a different icon every time I hover over a definition list element (dl). However, both have the same coordinates and one of the markers will be hidden behind the other.

    So to prepare we need to make sure the actual images in the Google generated map can be connected to these defintion list id:s. The Google map have many different layers on top of each other. One layer contain the foreground images, another the shadows, mouse map definitions and so on. Each of these layers (normal div elements) have their own z-index.

    In these different layers the images used have their own z-index. However, the z-index for the marker foreground image is the same as for the transparent clickable marker image. This makes it possible to use the transparent image z-index to restore the foreground image z-index. This is important as not to confuse the user when he later click on a marker…

    So let’s loop over these images and give them appropriate id values as well as put the markers on the map. (No - Google does not give them id’s). This is, stripped to the bare essentials, the complete code with some comments.

    // Create the map
    var map = new GMap2($('#indexamp'));
    var point = new GLatLng(lat, lng);
    map.setCenter(point, zoom);
    
    // Loop over the definition lists picking up coordinates
    var n = 0;
    $('dl').each(function() {
    	var lat = parseFloat($('span.lat', this).text());
    	var lng = parseFloat($('span.lng', this).text());
    	var point = new GLatLng(lat, lng);
    
    	// Create the marker with custom images
    	var markerIcon = new GIcon(G_DEFAULT_ICON);
    	markerIcon.image = 'marker_default.png';
    	markerIcon.iconSize = new GSize(23, 30);
    	markerIcon.shadow = "marker_shadow.png";
    	markerIcon.shadowSize = new GSize(50, 30);
    	markerIcon.iconAnchor = new GPoint(11, 29);
    	markerIcon.infoWindowAnchor = new GPoint(11, 14);
    
    	var marker = new GMarker(point, {icon: markerIcon});
    
    	// Change the foreground image when hovering over a definition list
    	// Note that the actual id's have not been created yet.
    	var no = this.id.substring(3); // Exclude the prefix
    	$(this).hover(
    		function() {
    			marker.setImage('marker_selected.png');
    			// Bring this image to foreground
    			$('#mf_' + no)[0].style.zIndex = 1;
    		},
    

    Truncated by Planet PHP, read more at the original (another 933 bytes)

  • Permalink for 'Dynamically change z-index on Google Maps markers'

    Dynamically change z-index on Google Maps markers

    Posted: February 4th, 2010, 8:12am MST by Danne Lundqvist

    As many have noticed Google Maps API does not include a setIndex() method on the marker. You can set the z-index when adding a marker to the map. But it is not possible to change this afterwards.

    I didn’t find a good solution to the problem when searching and had to resort to my own, hacking away on Google Maps. As I was feeling really good about myself when I had it working really well I just remembered that Google Maps Javascript API V3 has been released in Google Labs… And of course there it was. The Marker class has a new method, setZIndex(zIndex:number).

    Well, version 3 of the API is still only released by Google Labs which is “home to developer products that are still in their formative stages“. So for anyone not inclined to use version 3 just yet, I’ll write down how I did it here.

    As I use JQuery in this particular project the example is also using JQuery. If used in production I suggest using try/catch wherever appropriate as the solution depends on a specific dom structure.

    I have the below html which is the container for the Google map.

    <div id="indexmap"></div>

    The map is created as below (you’ll have to add the lat/lng variable values yourselves.

    var map = new GMap2($('#indexamp'));
    var point = new GLatLng(lat, lng);
    map.setCenter(point, zoom);

    This, as most know, creates the actual map. Then it is time to add the markers. In my case I have a list of locations with the latitude/longitude in the actual html. JQuery helps me loop over these locations and dynamically add markers in the correct spots. This html looks like below. Note how each definition list have an id no with “mm_” as prefix. (Never mind any objections you have on having many definition lists like this… Never mind that these coordinates are fiction…)

    <dl id="mm_0">
      <dt>...</dt>
      <dd>
        <span class="lat">61.333</span><span class="lng">31.1324</span>
        Random text
      </dd>
    </dl>
    <dl id="mm_1">
      <dt>...</dt>
      <dd>
        <span class="lat">61.333</span><span class="lng">31.1324</span>
        Random text
      </dd>
    </dl>

    What I want is the markers to be highlighted with a different icon every time I hover over a definition list element (dl). However, both have the same coordinates and one of the markers will be hidden behind the other.

    So to prepare we need to make sure the actual images in the Google generated map can be connected to these defintion list id:s. The Google map have many different layers on top of each other. One layer contain the foreground images, another the shadows, mouse map definitions and so on. Each of these layers (normal div elements) have their own z-index.

    In these different layers the images used have their own z-index. However, the z-index for the marker foreground image is the same as for the transparent clickable marker image. This makes it possible to use the transparent image z-index to restore the foreground image z-index. This is important as not to confuse the user when he later click on a marker…

    So let’s loop over these images and give them appropriate id values as well as put the markers on the map. (No - Google does not give them id’s). This is, stripped to the bare essentials, the complete code with some comments.

    // Create the map
    var map = new GMap2($('#indexamp'));
    var point = new GLatLng(lat, lng);
    map.setCenter(point, zoom);
    
    // Loop over the definition lists picking up coordinates
    var n = 0;
    $('dl').each(function() {
    	var lat = parseFloat($('span.lat', this).text());
    	var lng = parseFloat($('span.lng', this).text());
    	var point = new GLatLng(lat, lng);
    
    	// Create the marker with custom images
    	var markerIcon = new GIcon(G_DEFAULT_ICON);
    	markerIcon.image = 'marker_default.png';
    	markerIcon.iconSize = new GSize(23, 30);
    	markerIcon.shadow = "marker_shadow.png";
    	markerIcon.shadowSize = new GSize(50, 30);
    	markerIcon.iconAnchor = new GPoint(11, 29);
    	markerIcon.infoWindowAnchor = new GPoint(11, 14);
    
    	var marker = new GMarker(point, {icon: markerIcon});
    
    	// Change the foreground image when hovering over a definition list
    	// Note that the actual id's have not been created yet.
    	var no = this.id.substring(3); // Exclude the prefix
    	$(this).hover(
    		function() {
    			marker.setImage('marker_selected.png');
    			// Bring this image to foreground
    			$('#mf_' + no)[0].style.zIndex = 1;
    		},
    

    Truncated by Planet PHP, read more at the original (another 933 bytes)

  • Permalink for 'How to Split WordPress Content Into Two or More Columns'

    How to Split WordPress Content Into Two or More Columns

    Posted: February 4th, 2010, 2:55am MST by SitePoint » PHP

    split WordPress contentWordPress is a great CMS, but implementing some features within your theme can require a little lateral thinking. The content for your page or post is usually output by the theme code using a single function call:

    the_content(args);

    But what if you need to split the content into two or more blocks? That might be necessary if your theme requires multiple columns or sections on the page. WordPress provides a get_the_content() function to return content as a PHP variable, but how do you determine where the divisions occur? There are a few solutions on the web, but most involve either:

    1. Splitting the content at html tags such as h2 headings. Unfortunately, that requires the content author to know a little html and it’s not very versatile — you couldn’t allow two headings in one column.
    2. Using a WordPress shortcode. That’s more flexible, but it still puts the onus on the content editor to remember and use the right code.

    The WordPress <!--more--> tag may offer a better solution. It’s normally used to split a long article into two or more pages, but not all themes use that facility and it only works for WordPress posts by default (not pages). Using the <!--more--> tag offers several advantages:

    • A “more” toolbar button is available in both the visual and html editing pane.
    • Divisions can be placed anywhere in the content.
    • It’s easy for non-technical users to understand how the content will be split.

    WordPress editing pane showing 'more' button

    To split your content, locate your theme folder (wp-content/themes), edit or create a functions.php file and add the following function within a <?php … ?> block:

    
    // split content at the more tag and return an array
    function split_content() {
    
    	global $more;
    	$more = true;
    	$content = preg_split('/<span id="more-\d+"><\/span>/i', get_the_content('more'));
    	for($c = 0, $csize = count($content); $c < $csize; $c++) {
    		$content[$c] = apply_filters('the_content', $content[$c]);
    	}
    	return $content;
    
    }
    

    You now need to locate the theme files which call the_content() within the WordPress loop. You should find it in single.php and page.php since these are used to display single posts and pages respectively. It may also be found in index.php, archive.php and search.php, however, these normally show more than one article so be careful how multiple content blocks are handled.

    Once you’ve found the relevant code, comment out the_content() and call the split_content() function. It returns the content as an array; each element contains a single content block split at the <!--more--> tag, e.g. $content[0], $content[1], $content[2] … etc. The html can then be output as required, e.g.

    
    Read the rest of this page »</p>');
    
    // split content into array
    $content = split_content();
    
    // output first content sections in column1
    echo '<div id="column1">', $content[0], '</div>';
    
    // output remaining content sections in column2
    echo '<div id="column2">', implode(array_shift($content)), '</div>';
    ?>
    

    I hope you find it useful.

    <script src="http://adscluster.aws.sitepoint.com/openx/adjs.sp.php?region=14&did=adz&adtype=horizontal" type="text/javascript">

    Related posts:

    1. The power of String.prototype.split() … almost
    2. The WordPress Security Update
    3. How to Expose PHP’s Private Parts



  • Permalink for 'The Reasons To Attend PHP Conferences'

    The Reasons To Attend PHP Conferences

    Posted: February 3rd, 2010, 11:00pm MST by Brandon Savage

    Recently, php|architect announced that they were extending the early bird pricing for the TEK-X conference being held this year in Chicago, IL. As someone who has been and will be going this year, this conference represnts a great opportunity for anyone who hasn’t gone to a PHP conference to attend one.

    There are some good reasons that you should be attending.

    Before I attended a conference, I had no idea what others were thinking with regards to PHP. The first big conference I attended was ZendCon and it was there that I discovered an entire world that I knew nothing about – the greater PHP community. But more than that, I discovered Really Smart People(tm) that I could interact with, be friends with, and who shared my passion for technology.

    If you’ve put off attending a PHP conference, or simply are on the fence, you should seriously consider attending TEK-X this year. The conference itself has a great lineup, but I also know several people who are going to be there that are bright, talented and very enthusiastic about the PHP world.

    That’s a great reason to go.

  • Permalink for 'Boost your PHP Performance 50% with HipHop'

    Boost your PHP Performance 50% with HipHop

    Posted: February 3rd, 2010, 9:58pm MST by SitePoint » PHP

    HipHopNo, I’m not talking about a break-dance move that will magically give you extra PHP performance. I’m referring, rather, to a new open source project announced by Facebook. HipHop is a “source code transformer” designed to reduce CPU and memory usage by transforming your PHP code into C++ code.

    To understand why this helps, you need to know a little bit about how PHP works. PHP is a scripting language, like Ruby, Python, and Perl. This is great for developer productivity, as there’s no need for the  code to be compiled. The trade-off for this flexibility is in performance, with a scripting language requiring more CPU power and memory than a compiled language such as C++. What HipHop does is transform your PHP code into true C++ code, which can then be compiled into machine code. This is not the sort of thing you would do while developing, but when you are deploying your work you can compile it into the superior C++ code.

    HipHop Performance Boosts:

    • Web — 50% less CPU usage with the same traffic
    • API — 30% less CPU usage with double the traffic

    The performance boosts that Facebook has seen is based on its own real-world experience, with over 90% of Facebook servers being converted to HipHop code in the last six months. The benefits released were split into two categories, the Web tier and API tier, and the benefits witnessed for each. The web tier reduced 50% of server load with the same amount of connections, and the API tier saw a 30% decrease, even with a twofold increase in traffic. The difference is explained by the web layer requiring more presentation logic and more abstract information (related information) than the API tier.

    What’s the catch?
    You’ll have to avoid a few PHP functions, such as eval() and create_function(). Because of the dynamic nature of these functions, the HipHop team was unable to transform them into C++ code; however, these functions are rarely used in most PHP applications in general.

    Currently your HipHop code has to run through a custom-written HTTP server bundled with HipHop; however, using HipHop code with Apache is high on the development road map.

    While HipHop will increase the performance of your PHP code, it’s not necessarily going to be the silver bullet for your performance woes; for example, if your bottleneck is in your database performance, HipHop will be unable to help you. There’s no need to worry about it making your code slower though, as the entire PHP runtime has been emulated in a way that even the most complicated code will run at the same speed as pure PHP code.

    Where can I find it?
    HipHop will be released very soon to the open source community, but in the meantime you can read the full write-up on the Facebook blog, or view the Facebook presentation.

    What do you think?
    I’m interested in doing some benchmarks and seeing how HipHop performs with the SitePoint codebase. Do you think you’ll be checking it out when it’s released?

    <script src="http://adscluster.aws.sitepoint.com/openx/adjs.sp.php?region=14&did=adz&adtype=vertical" type="text/javascript">

    Related posts:

    1. Free PHP Webinar: How to Increase Performance with Caching
    2. OOP and Performance
    3. Free Performance with MySQL Table Types



  • Permalink for 'hiphop for php'

    hiphop for php

    Posted: February 3rd, 2010, 5:45pm MST by PHP 10.0 Blog

    By now probably everybody that is connected to PHP world knows about Facebook’s HipHop.
    So here are my thoughts about it.

    1. This is a very cool and exciting technology. There were multiple attempts to do this in various ways, and from what it looks, HipHop is the most successful and appealing. I know doing these things is not easy – I tried something like that myself somewhere back in 2006 but was unable to go past very basic examples (I also made a mistake of choosing C instead of C++ as target, which I now think was not a smart decision). And the progress and support for almost all of the PHP magic is definitely great. There still are unsupported areas, but mostly are dark corners into which not many people venture (or should venture, at least )

    2. I do not see it as a replacement for php.net code or Zend Engine. The mainstream of PHP development still happens in the community around php.net and I do not think it is going to change anytime soon. I also see the fact that HipHop engine basically re-implements all the extensions as a serious disadvantage, for which the solution should be sought, even though I completely understand the technical reasons for doing so. I do not know which kind of the solution but while for the company like Facebook it might be OK to “freeze” certain set of extensions and features and maybe catch up periodically, I think it is obvious how such model can be a problem for the wider adoption.

    3. If we talk about broader adoption of this technology in a wider PHP world, there are some serious challenges to consider:

    • Plugins: right now, you must compile your whole application. However, many real-life applications have extensive plugin models, which consist of their main competitive advantage – take WordPress, Drupal, Magento, any Zend Framework app – all of these allow to write custom plugins and run them alongside the main code base. The model in which you have to rebuild whole application each time you add/change a line of code is not acceptable in these circumstances.
    • Modularity: this is connected to the above, but is a bit different. PHP right now runs on Apache, IIS, Lighty, nginx, and tons of other servers in different environments. For the use of the technology in the wide variety of environments PHP is used in, one must be able to modularize  and separate the application PHP code from the runtime and the environment.
    • Portability: I tried to run a bunch of my scripts through the demo that the HipHop team was very kind to give me – and most of them experiences unsupported functions or some function didn’t work exactly as their PHP counterparts (random example: PHP’s fopen() would error out given empty first argument, while HPHP implementation would open the current directory as file. There are more such things…). Now, I admit, it would be very easy to fix them, to use different functions and they would work, but again I think it’s obvious how it can be a problem for a PHP programmer, if you are not coding targeting HipHop specifically – and especially of you use 3rd-party code. Having different implementations always presents portability challenges.
    • Thread-safety: A huge problem with PHP thread-safety is third-party libraries. Many of them are not thread safe either explicitly, or, even worse, implicitly – i.e. they just have either bugs or information leaks between threads (like changing some setting in one thread and feeling its effect in another – imagine chdir() leaking through the thread boundaries – see how it can be a problem?) HipHop team’s answer to this question was “we had fixed all those extensions” – which, without diminishing the capabilities of this excellent team, I think is not a satisfactory answer. It very well may be that they indeed fixed all the problems they could see in the code they run – but let us not forget they run one (albeit huge) application. I have hard time believing they have fixed every threading problem with every C library in existence that has interface to PHP and will continue to do so as long as C libraries exist. This of course goes back to modularity question, since here we have coupling between compiling and runtime model.
    • Debugging: obviously, debugging C++ code is orders of magnitude harder than PHP code. So you either need ninja debugging skills, or a very good set of tools to allow you to identify a problem in a live server running non-source PHP.

    4. I also see certain danger potential in the success of this project. The danger

    Truncated by Planet PHP, read more at the original (another 2948 bytes)

  • Permalink for 'PECL/Cairo 0.2.0 released'

    PECL/Cairo 0.2.0 released

    Posted: February 3rd, 2010, 4:18pm MST by Michael Maclean

    The first beta version of the PECL/Cairo extension has just been released. This version includes support for loading arbitrary fonts via Freetype, cloning matrices, and has a rather large set of bug fixes. If you've been using 0.1.0 for anything at all I'd really recommend an upgrade. Windows builds will appear soon over at perisama.net for all the major PHP variants courtesy of Elizabeth M. Smith. Many thanks to Mark Skilbeck for helping get this release working on Windows!

  • Permalink for 'PHPBenelux: Recap'

    PHPBenelux: Recap

    Posted: February 3rd, 2010, 4:17pm MST by Lorna Mitchell
    Last weekend I was privileged to speak at the inaugural PHPBenelux conference in Antwerp, Belgium. Since Ibuildings is partly a dutch company I combined this with one of my regular trips to meet with the people there, visiting both our offices in the Netherlands and catching up with a bunch of colleagues in both locations before making my way to Belgium for the main event.

    The conference itself was very well organised and the venue worked very nicely. I liked the hotel (I'm accustomed to London hotel rooms so European ones always seem huge), which was nice and had an English slant on breakfast since sausages were available alongside the cheese and pastries! The venue itself was just across the car park and had plenty of rooms with an open exhibition space which worked nicely - the two tracks were on opposite sides of this space so the footfall for the exhibitors was hopefully good! Full marks go to the crew:

    phpbnl10 crew

    I gave my talk "Passing the Joel Test in the PHP World" with some updates since I first gave it at PHPNW09 in Manchester. This is a nice best practices talk and although I didn't have a lot of people in my talk, this was no surprise since Ivo was speaking in the same slot as me with his "PHP and the Cloud" talk, which I STILL haven't seen! If you are interested my slides are here: [www.slideshare.net] Thanks to my audience who were great and managed to stay enthusiastic despite my nerves and the late afternoon slot :)

    Here's to PHPBenelux 2011!
  • Permalink for 'Speaking at SuperMondays'

    Speaking at SuperMondays

    Posted: February 3rd, 2010, 3:28pm MST by Lorna Mitchell
    I'm delighted to announce that the people at SuperMondays in Newcastle have invited me to speak at their event on 22nd February. For this I'll be writing a new talk entitled "PHP and Web Services: Perfect Partners" - looking at how PHP is a good fit for web services and how I'm using it both in my day job and in my hobby projects. Visit the event page itself for the full description, a bit about me, and the arrangements for the night. I am warned that they have limited capacity so although admission is free, if you want to go you should register for tickets ASAP!

    If you are attending, let me know and come and say "hi" to me on the night! I don't know this crowd well but so far they are pretty friendly and I'm looking forward to the trip north :)
  • Permalink for 'Short HipHop blurp'

    Short HipHop blurp

    Posted: February 3rd, 2010, 2:46pm MST by Lukas Smith

    Well we all have read the announcement and chatted, twittered or whatever about it. I agree thats its cool this is being open sourced. I do fear however this means that there is no one less company looking after APC (mainly leaving just Yahoo then?). For now I think this is mainly interesting for "researchers" willing to work on improving the compatibility and more importantly the workflow around HipHop. I do not expect that anyone can really get a meaningful return on investment who makes this their business anytime soon (unless they can sell people on the hype), besides FB of course.

    Overall I am not so impressed with the numbers. Even a 50% speed gain across the board .. what does that really mean? Lets say Facebook spends one third of the request (and I expect this to be even lower) on network and disk I/O, then this means that they managed a performance increase by a factor of 4 in the pure PHP processing parts. Note that I talked to some of the guys at the presentation and they said that the noted 50% speed up was not a result of switching the webserver (the binary generated by way of the C++ transformation includes a multi threaded webserver).

    This is of course a nice speedup but wouldn't we expect at least a 2 fold .. or more increase if we could transform our PHP code into a C extension? This approach seems a lot more feasible for the masses. Like we could just drop in a ext/symfony or ext/ZF and thanks to autoloading magic our setup would continue to run unchanged. While it might not get that 4 fold speed up .. I would be willing to wager that it would get a 2-3 speed increase in the pure PHP processing.

    So again I welcome any company open sourcing stuff that solved real world problems, especially if they are also willing to support the community in understanding their solution. But to me this solution will only matter for the ultra large companies where every single percent of saved CPU cycles matter. For the rest of us I think we need to rely on APC for a bit longer. But maybe with this transformator out there, other people will start working on the much more feasible approach of writing a PHP Code to C extension transformator.

  • Permalink for 'Before you can dance'

    Before you can dance

    Posted: February 3rd, 2010, 2:36pm MST by Stefan Priebsch
    A lot has already be speculated about what percentage of existing PHP users would benefit from using HipHop. The numbers seem to range somwhere between 0% and 100% percent. I will not try a guess myself, but rather try to shed some light on some the most important prerequisites I think there are for a company to benefit from HipHop.
  • Permalink for 'Laying down some PHPat beats'

    Laying down some PHPat beats

    Posted: February 3rd, 2010, 1:28pm MST by Stefan Koopmanschap
    If there has been one buzz in the past days, it's been the announcement of Facebook of the Hip Hop for PHP (or HPHP). This new tool for PHP developers (or actually for users of PHP) is aimed at gaining performance by converting PHP code to C++ code, then compiling the C++ code to a binary which includes a web server. But what will it actually mean for PHP?
  • Permalink for 'Xdebug 2.1.0beta2 released'

    Xdebug 2.1.0beta2 released

    Posted: February 3rd, 2010, 11:51am MST by Derick Rethans
    Xdebug 2.1.0beta2 released Dieren, the Netherlands Wednesday, February 3rd 2010, 18:51 GMT

    I've just released Xdebug 2.1.0beta2 which features a few small bug fixes only. With this release the Windows 5.3/VC6 binaries also return.

    One of the bug fixes is in a new feature that allows you to configure that the debugger should connect back to the IDE running on the machine that initiated the HTTP request. This feature, that originally was contributed by Lucas Nealan and Brian Shire of Facebook, allows more easy use of multiple IDEs (users) working on the same code base. In order to enable this, set xdebug.remote_connect_back to 1. See the documentation for more information.

    Of course, this feature should only be enabled if nobody besides authorized developers can access the machine on which the xdebug.remote_connect_back callback feature has been enabled. Instead of enabling this setting, you can also support multiple developers through the proxy functionality that the DBGp protocol supports. For more information on that, see Debugging with multiple users.

    You can find the full changelog here and get the latest version from the download page.

  • Permalink for 'PHPBenelux conference 2010 wrapup'

    PHPBenelux conference 2010 wrapup

    Posted: February 3rd, 2010, 11:11am MST by Michelangelo van Dam
    This past weekend, Belgium was buzzing PHP all the way. PHPBenelux organized the first annual international PHP conference in Belgium and it can be called a true success. Attendees and speakers coming from all parts of the world made this event a true international conference and I was truly happy to be a part of it, this time as member of the organization.
    PreparationThe months, weeks and certainly the days prior to the conference were hectic, stressful and sometimes energy draining. With lots of things that still needed to be done last minute, we have learned that we still have lots of room to improve ourselves for future events. But, as it is common to PHP development, we met our deadlines and saw everything was running smoothly.
    Airport and train station runsThe conference had a few international speakers on the list, for who we had to ensure a smooth ride to the conference hotel. Stefan Koopmanschap picked up Cal Evans at Schiphol. Thijs Feryn went down to Antwerp Central Station to pick up Fabien Potencier, and had to do this 3 times returning each time without Fabien (read his blog article about what happend). I myself went to Brussels International Airport to pick up David Zülke and Rowan Merewood traveling together with Ben Waine.

    Speaker's dinner and pre-conference socialAs is custom to events like this, we organized as speaker's dinner where we invited our speakers and sponsors to participate in this socializing event where everyone has the opportunity to get to know each other, discuss topics and exchange ideas. We headed out to Da Giovanni, an Italian restaurant in the center of Antwerp that is known for it's overwhelming tacky design. Red-white blocked cloths everywhere: the shirts of the waiters, the tables and lamps. We had a decent meal and a very good laugh.Following the dinner we also organized a pre-conference social in De Vagant, one of Antwerp's most known Jenever locations. This was open for everyone that was in the area and could make it to the place. But tiredness and pre-conference jitters had this social ended well before midnight.
    The conferenceSaturday was the big day, and what a day it was ! Sponsors arrived well in time to set up their booths and at about 8:30am the first attendees were coming in. Since it had snowed during the night, most attendees were a bit late so we started the sessions with a delay of 30 minutes (by lunch time we were already back on schedule).After a short introduction by Stefan Koopmanschap, Derick Rethans officially opened the conference with his keynote talk "The PHP Universe", which was well accepted by the audience (See reviews on [joind.in] ). The following talks followed right after and filled the most of the conference.

    Truncated by Planet PHP, read more at the original (another 10292 bytes)

  • Permalink for 'Can HipHop Help The Planet?'

    Can HipHop Help The Planet?

    Posted: February 3rd, 2010, 10:40am MST by Stuart Herbert

    By now, you might have heard the details of HipHop, Facebook’s PHP-to-C++ convertor that was announced yesterday.  Like most of you, I’m eagerly awaiting the release of the code so that I can play with it and learn in detail what it can do and what it can’t.  For now, Marco’s post seems to have the most technical information in it so far.

    I’m with Sebastian on this one. Whether or not you think Facebook’s HipHop is relevant to you, I think they deserve credit for having shared their particular solution with the wider community.  (They’ll get extra credit when they actually release some code ) ) After all, they’ve built on top of open-source in the first place; giving something back to the community is part and parcel of being a good member of the community.

    How many of you earn your living from open-source, but have never contributed anything back?

    But that isn’t really what I want to blog about today.

    I’ve been following the chat on Twitter about HipHop, and I think all the nay sayers have been overlooking an important point.  HipHop has the potential to reduce the amount of power consumed in running a website.  And surely that can only be a good thing for all of us?

    If you don’t run your own servers in a data centre (for example you use a virtual server, or host on a shared hosting solution), then perhaps you might not be aware that the power required by each server in a rack is often a major factor in the overall cost of running the servers.  Whether or not you believe in climate change, energy prices are on the rise.  Whether or not you believe in peak oil, oil and natural gas supply issues are forecast to push energy prices up further.  Taking steps to get more work done per unit of power consumed has been the focus of hardware manufacturers for several years now.  Isn’t it time it also was the focus of the software community too?

    CPU usage is only one aspect of the total power consumed by a server in a rack, but in my experience people tend to add more servers to their solution primarily because they need more CPUs running their web servers to handle more traffic.  A reduction in the number of CPUs required will translate into a reduction of the number of servers required … which means a reduction in the amount of energy being consumed.

    How can that not be a good thing, if it can be achieved?

    I know the answer will be that PHP apps are not CPU-bound, that they spend much of their time waiting for results from the database.  That might be true if you’re measuring a PHP app from the point of view of elapsed time, but what if you’re measuring the PHP app in terms of CPU cycles consumed?  Every single PHP script has to run on a CPU, and has to get to the point where it’s sat waiting for the database.  If HipHop means that each PHP script uses less CPU to get to the same point, that has to be a step in the right direction.

    Until we can play with HipHop ourselves, it’s impossible to say whether it saves enough CPU cycles to allow us to use less CPUs and therefore less servers.  Remember, you’ve still got the overhead of your operating system and web server to factor into the equation.  And then there’s the energy cost of compiling your code in the first place during development; for seldom-visited websites, HipHop may increase overall energy requirements.

    But it sure is nice to hope, isn’t it?

    Share This

  • Permalink for 'My Take on Facebook's HipHop for PHP'

    My Take on Facebook's HipHop for PHP

    Posted: February 3rd, 2010, 9:10am MST by Sebastian Bergmann

    Disclaimer: Since Facebook Inc. is a customer of thePHP.cc, I might be considered biased. For the purpose of this blog posting, consider me taking off my "thePHP.cc hat" and putting on my "PHP Community hat".

    Yesterday Facebook Inc. announced "HipHop for PHP", a source code transformer that turns PHP 5.2 code (minus some features) into C++ code that can then be compiled with g++, for instance, to a regular binary.

    If you are following some key PHP community members on Twitter, you may have learned that a couple of weeks ago Facebook invited a select few to Palo Alto, CA to give them a sneak peek at the technology. This is one of the reasons why this announcement was preceded with a lot of rumors. I am not really interested in rumors (or conspiracy theories, for that matter), so I will focus on the technology and its impact here.

    I am very happy — both as a "programming language geek" as well as an Open Source enthusiast — that Facebook Inc. decided to open source their solution to their problem. Understanding this is crucial:

    • Facebook had a problem.
    • Facebook found a solution for their problem.
    • Facebook decided to share their solution with the PHP community at large.
      Kudos for that!

    Now what was their problem?

    Facebook has a large code base that would take a long time (one to two years by my estimation) to refactor or rewrite in either PHP or another programming language to achieve the performance improvement that Facebook was looking for. During this time of refactoring or rewriting, Facebook would not have been able to innovate.

    In the past, Facebook tried to achieve performance improvements by contributing to PHP as well as APC. Many PHP deployments benefit from this contributions today, but for Facebook they were simply not enough.

    From this perspective it makes a lot of sense to dramatically change the way that they deploy and execute their PHP code: without major modifications to their existing code base they are able to run it with a CPU usage reduced by 50%. This is a sustainable solution for them as it allows them to benefit from PHP's advantages such as shorter development cycles and lower training costs — while at the same time, thanks to HipHop, reducing their data center costs.

    Stefan Priebsch (also with thePHP.cc) makes the point that you need to rethink your PHP development before you can dance to the HipHop beat:

    "HipHop executes PHP code bypassing the Zend Engine, so there is no guarantee that a program will behave exactly alike on PHP and HipHop. More and better automated unit and integration tests will be required to allow you to compare the results on PHP and on HipHop, and determine whether deviations are to be interpreted as a bug, or can be tolerated."

    I could not agree more: As there is a real build — including a real compilation — with HipHop, best practices such as coding standards and continuous integration will be even more important.

    In conclusion, I would like to welcome "HipHop for PHP" to the PHP ecosystem. Yes, it is not a solution for a problem faced by 99.9% of the PHP deployments out there. But this does not make it less interesting in any way.

  • Permalink for 'HipHop for PHP is not for you 60% of the time, everytime.'

    HipHop for PHP is not for you 60% of the time, everytime.

    Posted: February 3rd, 2010, 8:18am MST by Vidyut Luther

    My apologies to Ron Burgundy for the title of the post, but I’m just a fan of the wisest man to ever live.

    As Marco and Illia and countless others have said, unless you don’t work with PHP or were in a coma, Facebook released HipHop for PHP , it’s open source, it’s awesome, it makes you go fast. It’s not for you. You, being the average PHP developer, systems administrator, hacker.  A lot is being made of how CPU load went down by 50% etc, that’s a great number and on the surface very hard to argue with, but to really understand it, you must understand the problem a lot better. Facebook didn’t decide to write HipHop and use it in production because they had all this money laying around and felt like paying 3 engineers to work on something. They looked at other existing alternatives, implemented them, and when they maxed them out, decided to switch. HipHop Does Not:
    1. Make your database queries faster. A slow database is slow whether accessed via PHP or C++, Java, Scala, Ruby…..
    2. Make your images load faster
    3. Debug faster / better, if anything you’ll be debugging HipHop and PHP , to make sure something didn’t break in the conversion.
    I really want people to understand, that the decision to switch to HipHop isn’t a light decision, and it’s definitely not the silver bullet. If anything, HipHop should be your last resort. But, it’ll help me reduce the number of web heads! It’ll also make you change your deployment process, you’ll have to learn how to use gdb and other tools to debug things in production. Keep that in mind when you think about the monthly cost of a cloud server, or a slice at slicehost. The number of servers arguments comes into play when you can eliminate > 100 servers. If you’re going from 4 servers to 2, I guarantee you that you’re doing it wrong. I suggest you to look into your application more, and find the bottlenecks. Be absolutely certain that you can’t tweak your DB any more, or use APC, or Zend Server or something else.
  • Permalink for 'Solar 1.0.0beta3 Released'

    Solar 1.0.0beta3 Released

    Posted: February 3rd, 2010, 7:19am MST by Paul M. Jones
    Yesterday, I released Solar 1.0.0beta3. You can see the very short change log here. Special thanks to “kalkin” for committing a series of fixes and improvements. These days I’m concentrating more on documentation. Previously, we had only the ubiquitous quick-start blog demo. This release includes a new chapter on Solar’s dynamic dispatch cycle; i.e., [...]
  • Permalink for 'HipHop for PHP - Do the limbo dance'

    HipHop for PHP - Do the limbo dance

    Posted: February 3rd, 2010, 12:56am MST by Christian Stocker

    Yesterday, Facebook released HipHop for PHP, a compiler which makes native code from PHP sources (via C++ and gcc). They promise twice the speed with that approach, something which helps you a lot if you have 1000s of servers like Facebook. I won't bore you with the technical details and what it can and can not do as Ilia already summed that up pretty nicely.

    We at Liip will certainly look into this technology once it's available and evaluate if it would makes sense for some of our customers and project. As HipHop is not a drop-in replacement for your existing setup this is something which has to be planned and tested carefully. You have to change the way your servers are setup and the way you develop and deploy. It even needs a server restart, if you change some code, so badmouths can now claim that PHP is even more becoming like Java :)

    A high amount of Switzerland's most visited sites run on PHP (and some of them are even done by or with us) and maybe HipHop could be useful for some of them, after all the usual optimizations (like APC, memcached, etc) didn't help enough. But for most websites (and more so for small ones), PHP's speed isn't really the bottleneck, it's the database or some other external dependency. And for these cases HipHop isn't the holy grail. So before you change all your setup to fit into HipHop's requirements, do some decent evaluations, what really is the bottleneck in your application and decide accordingly.

  • Permalink for 'HipHop For PHP: Who Benefits, Who Doesn’t'

    HipHop For PHP: Who Benefits, Who Doesn’t

    Posted: February 2nd, 2010, 6:31pm MST by Brandon Savage

    There’s been lots and lots of discussion regarding the Facebook “Hyper PHP” release of HipHop for PHP. This new technology is an in-production converter for PHP that takes PHP code, converts it into C++ code, and creates a complete binary that can be run on a server natively. Facebook claims improvements of up to 50%, and their model represents a shift in thinking about scripting languages like PHP.

    Ostensibly, lots of people are going to be thinking about how this will benefit them and their organizations. Here are some thoughts on who will benefit and who will not benefit.

    Who benefits
    There are lots of benefits for producers of large-scale web applications written in PHP. The ability to convert PHP code into something else that is more efficient without having to retrain their developers will ultimately reduce server load and deployment costs.

    In particular, anyone running a web application with more than two servers will certainly benefit, as there is likely the traffic necessary for such a large web application. With a 50% improvement, one could conceivably use only one server; however, for redundancy reasons, it’s likely a good idea to maintain at least two web servers.

    Others who benefit include those who distribute PHP code to clients directly. The ability to deploy an application on a web server in a compiled format ensures that reverse engineering is more difficult and protects intellectual property. There is considerable debate as to whether or not compiled or obfuscated code is worthwhile; given that the product designed by Facebook must be efficient, the idea of distributing a PHP-based binary makes a lot more sense.

    Who doesn’t benefit
    For all the benefits, there is a large group of PHP developers that won’t benefit: the average, every day developer. There are a vast number of websites that have a single server and not very much traffic; there are also lots of sites that run on shared hosts, or sites that have multiple sites on the same server. Since HipHop runs one web application at a time (with a built-in webserver), it’s impossible at the moment to run more than one website on a box. This is obviously less than optimal for most folks, and will limit adoption.

    Also, early adopters of PHP 5.3 won’t be able to use HipHop straight away. Currently, it supports PHP 5.2 (as most of Facebook is written in PHP 5.2), though there are plans to modify HipHop to support PHP 5.3.

    Bottom Line
    HipHop is still pretty awesome, and will certainly change the way PHP applications are developed. There are great opportunities here, and Facebook has certainly developed a revolutionary system. What will ultimately happen remains to be seen; regardless, it should be an exciting year for PHP development overall.

  • Permalink for 'PHPVille almost released today'

    PHPVille almost released today

    Posted: February 2nd, 2010, 3:03pm MST by Philip Olson
    Today Facebook released a HipHop l33t shizznizzle of a tool for PHP but sadly it's not the PHPVille I was hoping for. PHPVille is probably a game that encourages PHP community members to work on the PHP project (over at php.net). Much like FarmVille, users simply cannot stop playing!

    Possible game features:

    • Each SVN commit builds up your worth

    • Not tending to or feeding your PECL extensions will result in them drying up and dying

    • Dead PECL extensions may live on as zombies, as once in awhile people will resurrect them

    • Eventually you may purchase things like an @php.net email address, and karma for other SVN repositories

    • Neighbors share and improve each others code

    • Future enhancement: The selling of karma, in bulk

    • Future enhancement: When Oracle purchases PHP, you'll be rich! [in PHPVille cash]


    PHPVille members often discuss matters within the #php.pecl and #php.doc IRC channels on EFnet, or on the various mailing lists.

    If you have other PHPVille ideas then please post them here and we'll create the best facebook application ever! Also, thanks to Ralph and Ilia for discussing this on IRC and offering some of the ideas above. :)
  • Permalink for 'My Thoughts on HipHop '

    My Thoughts on HipHop

    Posted: February 2nd, 2010, 2:47pm MST by Ilia Alshanetsky
    To paraphrase Marco Tabini if you work with PHP you must be doing so in a pretty deep cave to have not heard of HipHop for PHP and the fervor around it the prior to its official announcement this morning by Facebook.

    I had a fortune to be part of the small group of PHP community people who were invited to take a peak at its technology prior to its official release in January. And I must admit it had been quite amusing to read some of the conjectures people were making about what it actually, given how off the mark most of their guesses were.

    So what is HipHop?

    In the tersest of terms HipHop is a tool that converts PHP code into C++ code that when combined with a PHP compatible engine and extensions (ports of some native PHP extensions Facebook uses) library also written in C++ can be compiled using GCC into a binary. This binary can then be ran on a command line or as a web server daemon that utilizes libevent. According to Facebook this can speed up applications by up to 50%, which is a pretty impressive improvement.

    It is not entirely surprising that world's largest PHP deployment, such as Facebook would look at solution that would allow them to halve their not inconsiderable count of servers or double capacity. Releasing this solution as Open Source is I think a great idea, and big kudos to Facebook for doing so.

    From a technical perspective the PHP optimization approach of converting PHP into a compiled language is not a completely new one, Roadsend compiler, a commercial product has been around for a few years now and has been doing that with some degree of success. That said it is not a trivial task and from an engineering perspective presents a fairly tricky development challenge, especially when you want to allow regular, off-the-self scripts to work. Perhaps more importantly, HipHop not a theoretical solution, "for you to test", it actually works, with most of the Facebook's servers running it and doing it well, on millions of lines of converted PHP code on daily basis, very impressive.

    At this point you are probably thinking, that if it is so great and it works, I'll deploy it on my servers as soon as I can get my hands on the source code. Well, unfortunately things are not quite so simple, there are few technical and deployment challenges you need to overcome.
    Continue reading "My Thoughts on HipHop "
  • Permalink for 'HipHop: What you need to know'

    HipHop: What you need to know

    Posted: February 2nd, 2010, 12:54pm MST by Marco Tabini

    By now, unless you’re living under several hundred metres of rock,  you’ve probably heard that Facebook has released HipHop for PHP, a tool that compiles PHP into C++ with some interesting claims of speed improvement. The thickness of unawareness-inducing rock may have to be lower to know that php|a and BP have announced our full support for the project with a number of initiatives that we’re going to roll out over the next few months.

    I have known about this project for a little while—Facebook was kind enough to invite me, along with a few other community members, to their office for a demo a few weeks ago. They gave me a copy of HipHop to try out, and I have been playing with it for the last few days.

    What it is

    First, a few random notes on how HipHop works. Haiping has done a great job of providing in-depth coverage in his post on the FB blog, so here are the CliffNotes:

    • HipHop transforms PHP into C++ code, which can then be compiled into a self-contained executable. The tool supports a large percentage of the current PHP 5.2 spec, with some obvious exceptions, like eval().
    • The tool attempts to find the maximum level of optimization possible for a given scenario using its own static analysis tool. For example, if it detects that all operations on a given variable are homogenous in type (e.g.: they are all integers), then it uses the corresponding C++ data type to provide maximum speed and memory enhancement. Where this is not possible, it implements its own variant type, equivalent to a zval.
    • HipHop doesn’t currently have its own PHP runtime—nor is it based on Zend Engine. It compiles everything to C++ and uses its own set of C++ library to provide the necessary support.
    • Once compiled, HipHop provides its own web server (a CLI interface is also available). It does not use (or require) Apache or any other server. Of course, this doesn’t preclude you from running one or more HipHop projects against separate ports on the same machine and then use Apache (or Squid, or any other server) to reverse proxy to them.
    • HipHop doesn’t currently support Windows (though, personally, I’d be surprised if that didn’t eventually change—it just so happens that FB built for the environment they use internally).
    • The entire tool is intended to be a drop-in replacement for the PHP runtime—as long as you do not use any functionality that it doesn’t support, you should be able to compile your existing site and run it.
    • Facebook is using HipHop in production to handle 90% of their traffic.
    What it’s going to do

    HipHop has the potential to be an incredibly disruptive product in the PHP landscape. If your company runs a PHP application that requires more than two servers (you’ll want two just for redundancy), you have no reason not to explore using HipHop. If Facebook’s claim of a 50% reduction in CPU usage means you could, potentially, get rid of 1/2 of your PHP machines with a minimum of investment. You don’t need to be Facebook to draw a huge advantage from this technology. Perhaps this one-to-one reduction is not apt, but even 40% or 30%—much more realistic—is major, and a truckload and a half more than any other existing PHP-related product can offer at this point.

    Clearly, this argument can be flipped around: you have every incentive to make sure that your application runs with HipHop—which could give Facebook a unique opportunity to exert significant control over the way PHP evolves.

    You might, at this point, think that this is not the first attempt at a PHP compiler—in fact, there are other compilers commercially available. Heck, even I wrote my own experimental compiler several years ago (in fact, I had a discussion about my experience with some of the Facebook team members about this a while back, presumably while they were researching HipHop)—and that ultimately it won’t make a difference.

    But HipHop is neither experimental nor unproven, and it’s free; it is used, in production, by the second-largest site on the Internet—and make no mistake about it, there is no smoke-in-your-eyes (not to mention other body parts) sleight of hand on Facebook’s behalf; their site is written in PHP by PHP developers, without the help of large numbers of custom extensions. In fact, their goal is precisely to allow their developers to continue using PHP—which they consider the nimblest web development environment—without compromising their ability to grow at the current pace in a financially responsible way.

    If you think about it, that makes a lot of sense from a business perspective: PHP is simple, flexible and easy; with HipHop as a drop-in

    Truncated by Planet PHP, read more at the original (another 826 bytes)

  • Permalink for 'HipHop for PHP, Facebook unveils it’s magic'

    HipHop for PHP, Facebook unveils it’s magic

    Posted: February 2nd, 2010, 11:38am MST by Echolibre

    After many days of speculations all around the web about Facebook’s rewrite of PHP, today Haiping Zhao from the Facebook team has announced “HipHop for PHP”. The basic idea of HipHop for PHP is that it turns the code you write in PHP into C++ which then can be turned into machine code.

    Even though there are others idea that have tried accomplishing the same goal as HipHop for PHP, I believe it is quite safe to assume that Facebook has a large enough user-base to produce code that is solid enough to run and can run well.

    The announcement has been made on the Facebook blog earlier today, and tonight there is going to be the video tech talk that everybody can watch:

    This evening we’re hosting a small group of developers to dive deeper into HipHop for PHP and will be streaming this tech talk live. Check back here around 7:30pm Pacific time if you’d like to watch.

    A few questions come to mind even though we haven’t seen the code just yet. My main concern though is the one of buffer overflows and the security implications of turning PHP code into C++. As they say on the blog, it took nearly 18 months before having a relatively stable version and 3 developers. This is a very short lapse of time to develop a solution used by so many.

    Another interest of mine related to this release is how does it compete with the likes of phc or roadsend php. If it does at all.

    However I have noticed on their blog that Facebook has also developed HPHPi which seems to let you use HipHop but without having to actually compile your code before running it (The concept seems a bit like APC’s stat on and off switch from the few lines of description), which seems like a quite interesting idea for the development stages.

  • Permalink for 'CalDAV server for PHP'

    CalDAV server for PHP

    Posted: February 2nd, 2010, 12:50am MST by Evert Pot

    It's been a long time coming, but I finally have some working CalDAV code. The server has been tested with iCal 3.0 and 4.0 (Leopard and Snow leopard), Sunbird 1.0 pre-release and Evolution.

    My main goal is to create a general-purpose CalDAV library, rather than a consumer-ready server app. I'm hoping people will be able to use this library to enable CalDAV functionality in their existing applications.

    If you're interested in hacking around or testing, you'll have to grab a copy from subversion. Full installation instructions are available. Because of the alpha-stability nature of the code data-loss can occur, so beware!

  • Permalink for 'Netbeans for PHP: Continues to Impress'

    Netbeans for PHP: Continues to Impress

    Posted: February 1st, 2010, 10:48pm MST by Davey Shafik

    It seems that I don’t blog much unless IDE’s are concerned; there is a good reason for this: IDEs are an integral part of my development process and when they suck, development sucks.

    The story so far:
    • Boy meets ZDE 2.5
    • ZDE grows up to 5.5
    • ZDE gets replaced by new eclipse-based ZSfE/PDT
    • ZDE keeps going, until one day, Boy upgrades OSX
    • Boy hacks OSX, but ZDE is running on a donut
    • OSX update kills ZDE for good
    • Boy cries
    • Boy finds Netbeans

    This is the continuation of that story. In the last installment Netbeans 6.7 was a nightly build, it had gotten it’s OSX look and feel, and it was starting to get it’s remote debugging up and running.

    Now, 6.8 has been out for almost 2 months, and things are really starting to gather steam. With the death of ZDE5.5 finally a reality, and PHP 5.3 code starting to become part of my work-day, I finally jumped 100% to Netbeans.

    And let me tell you, Netbeans 6.8 is nothing short of amazing. Debugging with xdebug is now almost as easy as ZDE, it works instantly on 90% of my remote machines, but I have 1 cluster for which Netbeans simply *cannot* find the local source file, making it impossible to debug.

    Watches, breakpoints (though, I haven’t figured out conditional breakpoints, if they are there), callstack and local variables work as you would expect (though watches/variables sometimes refuse to populate larger vars, I think this is xdebug config related). In addition, Netbeans supports arbitrary breakpoint groupings; these can be enabled and disabled as a group — very neat.

    In addition, it has path mapping to help with remote/local file correlation; so it can find the local file to show the source during debugging — this stops the problem ZDE has where two files have the same basename() and it’s unable to choose the correct one.

    However, a fully functional debugger is a minimum requirement. Netbeans 6.8 also has great support for PHP 5.3 (though it has some syntax support bugs), again another minimum.

    So where does Netbeans shine? The single biggest answer to that, is PHPUnit support. Netbeans lets you specify your test folder, and abstracts it out of the project, so your tests are separated visually; this is a great minor addition. In addition, Netbeans can generate unit tests (this utilizes phpunit’s built-in functionality), and has a great UI for running tests.

    You can run a single unit test by simply right clicking on the test and choosing Run, or you can test a whole project by right clicking on the project and choosing Test. Doing this will bring up the Test Results pane:

    As you can see, it shows the number of tests, the test suite, and it’s test status; this can then be expanded to show individual test methods.

    Further to this, you can have Netbeans capture code coverage information, if you have the xdebug extension installed locally. This then manifests visually in two ways; the first, is a summary:

    The second, more impressive/useful way, is visually within each file:

    You will also notice that this adds a set of buttons below the code, which can be used to run the test for just the current file (based on the typical phpunit file/test naming structure, I assume) and to re-run the entire test suite.

    To me, this integration is phenomenal, and is changing the way I work. This is a great example of an IDE conforming to your workflow, and proving new ways to do things; rather than fighting you and requiring you to change to it’s needs and ideals.

    Other things of note, Netbeans 6.8 has Symfony project integration, and 6.9 is including Zend Framework integration, if those things appeal to you — I have yet to play with either, so can’t comment on their usefulness.

    I can, without doubt, confidently say, that despite the few bugs, and some still immature minor things, Netbeans is my recommendation for an IDE.

    Go grab Netbeans today.

    - Davey

  • Permalink for 'Organizing your own conference'

    Organizing your own conference

    Posted: February 1st, 2010, 2:25pm MST by Stefan Koopmanschap
    Two days have passed now since the PHPBenelux Conference 2010. On the one hand, I feel a bit stupid to have spent the majority of my free time into a conference I can not really attend any sessions in. On the other hand, I'm so grateful that I did. Let me elaborate.
  • Permalink for 'WINCACHE test code committed to PECL, paves a way to test PHP CGI'

    WINCACHE test code committed to PECL, paves a way to test PHP CGI

    Posted: February 1st, 2010, 11:24am MST by Venkat Raman Don

    Few days back I made some code commit (code check-in) to WINCACHE SVN depot on PECL. I committed the test infrastructure to test WINCACHE. The entire test code can be see inside the folder at [svn.php.net] . Let me explain how it works. In order to make it work first of all the binaries has to be compiled. This is the binary which is responsible for driving the test suite, I call it as a kind of test driver. I have already committed the the Visual Studio solution file which is at location [svn.php.net] . However the solution file is meant for Visual Studio 2008 and may not be compatible with previous versions of Visual Studio. If you are using an old version of Visual Studio you may need to create a new solution/project file (simply chose ‘WIN32 Console Application’ while creating the solution/project file). After creating a new solution just add the C++ source/header files present at [svn.php.net] to the solution/project. Compile it in Visual Studio and the binaries should be made. This builds one executable which is named ‘test_wincache.exe’. You can either compile Release/Debug build but I always prefer Release build. Here is how you can use the binaries to test WINCACHE.

    • In your document root (typically C:\inetpub\wwwroot on IIS) create a new folder named ‘testwincache’.
    • Copy the folder named ‘php_all’ and ‘php_5_3’ from [svn.php.net] . Let me take some time explaining how the test cases are organized.
      • Inside the folder named ‘php_all’ there are PHP files which will run on both PHP 5.2 as well as PHP 5.3.
      • The folder ‘php_5_3’ contains test cases specific to PHP 5.3 and should not be run with PHP 5.2 as they will fail. They contain syntax/code specific to PHP 5.3.
    • Copy the folder named ‘php_all’ and ‘php_5_3’ inside the just created folder named ‘testwincache’.
    • In the folder named ‘testwincache’ create a folder named ‘temp’. Please ensure that this folder has sufficient right/ACL so that PHP application can write to it.
    • Also ensure that PHP application has proper read/write permission for folder named ‘php_all’ and ‘php_5_3’.
    • Open an elevated command prompt if you are on Vista+ OS.
    • Go to the folder where test_wincache.exe is present.
    • Type test_wincache.exe C:\inetpub\wwwroot\testwincache\php_all http://localhost/testwincache/php_all
    • This will run the WINCACHE test cases and dump a nice summary. The result can also be found in the file named result.txt inside temp folder.
    • If one wants to run php_5_3 test cases just replace php_all with php_5_3 in the above command.
    • One can also run test_wincache --detailed to get a detailed usage of the tool.

    What the code does?

    • The code parses the directory which is supplied as first argument and finds all the file which has name wincache<test_case_number>.php
    • Opens Internet Explorer and executes the test file in the browser using the IWebBrowser2 interface.
    • Each test case has an associated file named wincache<test_case_number>.out.txt which contains the expected output of the test case.
    • The test case itself write a file named output.txt in the tempora

    Truncated by Planet PHP, read more at the original (another 1752 bytes)

  • Permalink for 'phpUnderControl 0.5.1 released'

    phpUnderControl 0.5.1 released

    Posted: January 31st, 2010, 1:16pm MST by Manuel Pichler

    Today I have released phpUnderControl version 0.5.1. It's a bug fix release that closes several issues open since a long time. First of all I would like to thank Sebastian Marek who was the main contributor to this releases, so a big thankyou to you.

    • Now phpUnderControl should work with CruiseControl 2.8.3. Thanks to Mike van Riel who provided some hints on this issue in a blog comment.
    • Fixed #983: Graph unitests throw fatal error when ezComponents not available.
    • Fixed #966: phpcs-details.xsl not showing file name.
    • Closed #863: Destination option is now deprecated.
    • Fixed #862: Command line switches without parameter don't work.
    • Fixed #861: Password is used as username in check outs. This patch was supplied by Thorsten Daners via e-mail.
    • Fixed #734: Now the build dropdown redirects to the correct build uri.
    • Implemented #703: PHPUnit test results are now the first entry on the project overview page.
    • Fixed #700: Throw an exception when the specified project does not exist.
    • Implemented #675: Use "php -l" for lint checking and not PHPUnit.
    • Implemented #625: Integrate PHP_Depend results.

    Truncated by Planet PHP, read more at the original (another 2141 bytes)

  • Permalink for 'TechniqueNW 10'

    TechniqueNW 10

    Posted: January 31st, 2010, 12:55pm MST by Stuart Herbert

    Whilst everyone else was over at PHP Benelux 10 (which sounded like a great conference according to the Twitter feedback!), I was up in Morecambe, at the Technique|NorthWest training event organised by Northwest Vision and Media and run by The White Room.  A huge thanks to Paul Collins for inviting me up at the last minute to run the PHP workshop on the Saturday, and I’d love to be involved in further events like this.

    I had a great time at the event, and I was delighted to see how the North West of England is trying to build and support a digital economy, instead of simply leaving it to chance.  If only South Wales had such an initiative!

    Perhaps the most interesting thing I took from the weekend was the large disconnect between the people who attended and many of my friends on Twitter.  If you listen to the Twitterarti, you’d think that Adobe Flash is a technology that has run its course and is now in terminal decline (mostly because the iPhone and iPad do not support it, plus Adobe not seen as exactly a bastion of innovation these days).  And yet, by far the most popular workshop at Technique|NorthWest was the Flash workshop.  To these people, Flash is not only still relevant, but in their industry it is still the only real option for delivering online advertising campaigns.

    Food for thought.

    PS: I also took some photos of Morecambe before the Saturday workshops started.

    Share This

  • Permalink for 'Live exploiting aus Angreifersicht (XSS / CSRF), Vortrag@Mayflower-Würzburg'

    Live exploiting aus Angreifersicht (XSS / CSRF), Vortrag@Mayflower-Würzburg

    Posted: January 31st, 2010, 12:45pm MST by ThinkPHP /dev/blog - PHP
    Am kommenden Donnerstag, den 04.02.2010 findet wieder ein öffentlicher Vortrag im Mayflower Büro in Würzburg statt (Pleichertorstrasse 2, 97070 Würzburg, Straßenbahn und die Haltestelle Congress Centrum).
    Beginn ist um 18:00 Uhr, Thema des Vortrags ist "Live exploiting aus Angreifersicht (XSS / CSRF)".

    Anhand von interaktiven Beispielen erklärt Frank Ruske die Sicherheitsprobleme XSS (Cross-Site Scripting) & CSRF (Cross-Site Request Forgery). Welche Gefahren gibt es und wie werden diese Lücken ausgenutzt - ist das zentrale Thema dieses Vortrages?.

    Die "Donnerstags-Vorträge" werden sowohl in Würzburg als auch in München gehalten. Bei Interesse einfach das Blog beobachten, um auf dem Laufenden zu bleiben!
    Wir freuen uns auf viele Teilnehmer!


    Größere Kartenansicht
  • Permalink for 'Mobile Apps mit PhoneGap -> Vortrag@Mayflower-München'

    Mobile Apps mit PhoneGap -> Vortrag@Mayflower-München

    Posted: January 31st, 2010, 11:28am MST by ThinkPHP /dev/blog - PHP
    Am kommenden Donnerstag, den 04.02.2010 findet wieder ein öffentlicher Vortrag im Mayflower Büro in München statt (Mannhardtstraße 6, S-Bahn Isartor).
    Beginn ist um 18:00 Uhr, Thema des Vortrags ist "Mobile Apps mit PhoneGap".

    Thorsten Rinne zeigt, wie man mit Webtechnologien (Html, Css, JavaScript) mobile Apps für iPhone, Android, Blackberry und Co. entwickeln kann und weist auf die Unterschiede zwischen PhoneGap, Titanium Developer und anderen ähnlichen Plattformen hin.

    Die "Donnerstags-Vorträge" werden sowohl in München als auch in Würzburg gehalten. Bei Interesse einfach das Blog beobachten, um auf dem Laufenden zu bleiben!
    Wir freuen uns auf viele Teilnehmer!

  • Permalink for 'How to turn bad code into good code'

    How to turn bad code into good code

    Posted: January 30th, 2010, 1:05pm MST by Stefan Priebsch
    Want to learn how to turn bad code into good code, and master the full software development cycle, from good design to successful deployment of PHP applications?
  • Permalink for 'Going to FOSDEM 2010'

    Going to FOSDEM 2010

    Posted: January 30th, 2010, 12:52pm MST by Thomas Koch
    I'm going to fosdem 2010.

    I'm going to Fosdem 2010


    These are things I'd like to attend:
    time room topic speaker
    10:45-11:30 Janson Promoting Open Source Methods at a Large Company Brooks Davis
    13:15-13:45 AY Packaging Java Software for Debian Thomas Koch
    13:40-13:55 Ferrer CiviCRM: Common goals of FOSS and Not For Profit Organisations Xavier DUTOIT
    14:00-14:45 H.1308 The Maemo Community Council: a case-study in governance Dave Neary
    14:00-15:30 Guillissen LPI exam session 1 Klaus Behrla
    14:00-14:45 Janson What is my system doing - Full System Observability with SystemTap Mark Wielaard
    14:30-15:00 H.2213 Building Federated Social Networks on XMPP Tuomas Koski, Simon Tennant
    15:00-15:45 Janson Ganglia: 10 years of monitoring clusters and grids Bernard Li
    15:00-15:30 H.2213 XMPP and the Social Web Alard Weisscher, Laurent Eschenauer
    15:30-16:00 H.2213 PubSub Gone Wild: Info Sharing at Mediamatic Ralph Meijer
    16:00-17:30 Guillissen LPI exam session 2 Klaus Behrla
    16:00-16:15 Ferrer SIP Communicator: Skype-like conf calls with SIP Communicator Emil Ivov
    16:20-16:35 Ferrer Kamailio (OpenSER) 3.0.0: redefinition of SIP server Daniel-Constantin Mierla
    16:40-16:55 Ferrer asterisk: An introduction to Asterisk Development Mark Michelson
    17:00-17:15 Ferrer csync: Roaming Home Directories Andreas Schneider
    17:30-18:00 H.2213 Jingle Nodes: An Open Alternative to Skype Tiago Camargo
    18:00-18:30 H.2213 Multi-User Jingle: Voice and Video Conferencing with XMPP Dafydd Harries, Sjoerd Simons
    18:15-19:00 H.1302 Spacewalk: Linux Systems Lifecycle Management Marcus Moeller, Sandro Mathys








    09:15-10:00 H.1302 Linux distribution for the cloud Peter Eisentraut
    10:00-10:45 Janson RepRap - Manufacturing for the Masses Adrian Bowyer
    10:30-12:00 Guillissen LPI exam session 3 Klaus Behrla
    11:00-11:45 AW1.120 My life with HBase Lars George
    11:00-11:45 Janson Tor: Building, Growing, and Extending Online Anonymity Andrew Lewman
    12:15-13:00 H.1302 Cross distro packaging with (top)git Thomas Koch
    12:15-13:00 H.1308 Shared libraries in Debian Sune Vuorela
    13:00-14:30 Guillissen LPI exam session 4 Klaus Behrla
    13:15-14:00 AW1.120 CouchDB, a database designed for the web and more Benoit Chesneau
    14:00-14:45 Janson Large scale data analysis made easy - Apache Hadoop Isabel Drost
    15:00-16:30 Guillissen LPI exam session 5 Klaus Behrla
    15:30-16:15 H.1308 Continuous Packaging with Project-Builder.org Bruno Cornec
    15:30-16:15 AW1.120 Comparing the MapReduce way in CouchDB with the SQL way in a RDBMS Stéphane Combaudon
    16:15-16:45 AW1.120 Designing a scalable content management system on NoSQL technologies Evert Arckens
    16:15-17:00 H.1308 Debian Secrets: power tools for power users Wouter Verhelst
  • Permalink for 'Published in PHP|Architect'

    Published in PHP|Architect

    Posted: January 30th, 2010, 3:50am MST by Evert Pot

    PHP architect January 2010

    The January issue of PHP|Architect just got published, and I'm in it!

    I've written an apparent 5-page article about SabreDAV. The process was a lot of fun. It's definitely quite different from blogging, where quick and dirty is the rule rather than the exception. I hope I get the chance to do this again (all provided if there's another subject I feel knowledgeable enough in).

    So if you get a hold of a copy, I would be very interested in your feedback! The magazine is in PDF form these days, so subscribing and downloading is quick and easy =).

  • Permalink for 'PHP 5.3 Adoption: Some Numbers'

    PHP 5.3 Adoption: Some Numbers

    Posted: January 29th, 2010, 5:44pm MST by Stuart Herbert

    Last year, I ran a series of polls via Twitter to try and learn a bit more about your plans to move to PHP 5.3, and whether or not you actually followed through.  A huge thank you to everyone who voted!

    I’m not talking at any conferences this year, so I’ve published the planned PHP 5.3 adoption talk online for anyone who’s interested in what the PHP user community told us via these polls.  As well as the raw data, I’ve included an analysis of what the data might mean, and some talking points about what the PHP Group might want to do differently when PHP 6 (or PHP 5.4 if there is one) is released.

    You can find the talk online at Slideshare, along with all of my older talks.  I hope you find it useful and informative.

    Php 5 3 Adoption View more presentations from stuartherbert.

    Share This

  • Permalink for 'web2project Security Vulnerability'

    web2project Security Vulnerability

    Posted: January 29th, 2010, 9:40am MST by Keith Casey

    Late last month, I received some bad news about web2project...

    It turns out that web2project was vulnerable to a handful of select Cross Site Scripting (XSS: definition) vulnerabilities. While the attack vector was pretty specific to being an already authenticated user, it had the potential to be a major problem in a poorly configured system.

    On the positive side, I say "was" because within 10 days of being notified of the problem - and the same day the vulnerability became public - we had a patched release out the door and available to users. We've spent the past month since encouraging them to upgrade. Of course, we further benefit from the fact that although the vulnerability does affect us, we're not named in the report.

    On the negative side, it did take us 10 days to close the vulnerability. The patch itself was available a few days earlier via Subversion but it might not have been enough. Further, we didn't explicitly notify our users of a need to upgrade but since it was rolled with a handful of other major fixes, it appears that many people have upgraded already. Once again, we benefit from the very specific attack vector.

    To make this process easier and faster in the future, as of v1.3, we can already detect if upgrades have been uploaded but not applied. For an upcoming release, we're implementing a Drupal/WordPress-style means of notifying existing administrators thatan upgrade is available. In the meantime, watch this space or web2project's page on Sourceforge.

  • Permalink for 'The Forward Strategy for Zend_Feed Components (or Editing Feeds Is Too Hard)'

    The Forward Strategy for Zend_Feed Components (or Editing Feeds Is Too Hard)

    Posted: January 29th, 2010, 9:04am MST by Pádraic Brady
    Someone blogged about this earlier, Andy on "Adding new items to RSS feed – it shouldn’t be this hard!", so let me start by saying I unconditionally agree. Ha! Thought you had me there, didn't you ;-).

    To explain this problem, as Andy describes, you need to look at Zend_Feed_Reader (release in ZF 1.9) and Zend_Feed_Writer (released in ZF 1.10) as part of an overall strategy. The strategy can be summed up as "making feeds stupidly easy". You can throw in the new Zend_Feed_Pubsubhubbub on top of that (also released in ZF 1.10) for the real time part of the "stupidly easy" ;-).

    Each of these components are nothing like Zend_Feed (the original component since ZF's conception). They are larger, do some hideously complex work (so you don't have to), and come with a grand total (inclusive of the original Zend_Feed) of almost 1,300 unit tests and just shy of 1,500 assertions. In short, they represent a massive effort. The result is an API that I think has achieved the status of "stupidly easy".

    Therein lies Andy's problem however - it's a fracking ton of work -P. Zend_Feed_Writer and Zend_Feed_Pubsubhubbub took up nearly all my ZF related time for months up to the 1.10 release. Just as Rome was not built in a day, neither would a new style of Zend_Feed emerge in a single minor release, or even two.

    Looking forward, Andy's concerns (and those readers share) will be addressed in the next minor release. I've already taken steps towards this, for example, Zend_Feed_Reader was refactored somewhat for 1.10 to use an improved API related to returning data collections. Most methods, where relevant, also have a plural form accepting arrays.

    All of this is building up to one scenario - Zend_Feed_Reader parses a feed, and Zend_Feed_Writer may then import the Zend_Feed_Reader object for further manipulation. Unfortunately, there was simply no time to get that far for ZF 1.10, so it will have to wait for 1.11. The key word of the next iteration will be "Array", since presenting objects representing feed data as arrays (via ArrayObject et al.) can help both reduce some of the API clutter while also facilitating simpler internal manipulation (yep, all our internal data pointers are textually related to the methods used to get/set them).

    Yes, we could pull a "Zend_Feed" with arrays, but there's no joy in that and it wouldn't solve the problem of making this "stupidly easy" ;-). So in the short term, editing feed entries will be a slight pain in the ass. On the bright side, re-read Andy's entries - our exposure of all those DOM methods at every workflow step and subclass of Zend_Feed_Reader and Zend_Feed_Writer still allowed for a fairly simple solution for now ;-).

    Conclusion? We've come along away. We know we still have farther to go. Please be patient with me -). And on a serious note, blog away - there ain't no such thing as bad feedback. Thanks to Andy for sharing his experiences, and sharing his solution to this. Kudos.
  • Permalink for 'ob_start and HTTP headers'

    ob_start and HTTP headers

    Posted: January 29th, 2010, 9:00am MST by Brian Moon
    I was helping someone in IRC deal with some "headers already sent" issues and told them to use ob_start. Very diligently, the person went looking for why that was the right answer. He did not find a good explination. I looked around and I did not either. So, here is why this happens and why ob_start can fix it.

    How HTTP works

    HTTP is the communication protocol that happens between your web server and the user's browser.  Without too much detail, this is broken into two pieces of data: headers and the body.  The body is the html you send. But, before the body is sent, the HTTP headers are sent. Here is an example of an HTTP request response including headers:
    HTTP/1.1 200 OK
    Date: Fri, 29 Jan 2010 15:30:34 GMT
    Server: Apache
    X-Powered-By: PHP/5.2.12-pl0-gentoo
    Set-Cookie: WCSESSID=xxxxxxxxxxxxxxxxxxxxxxxxxxxx; expires=Sun, 28-Feb-2010 15:30:34 GMT; path=/
    Content-Encoding: gzip
    Vary: Accept-Encoding
    Keep-Alive: timeout=15, max=99
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=UTF-8

    <!DOCTYPE html PUBLIC "-//W3C//DTD html 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Ramblings of a web guy</title>
    .
    .
    So, all those lines before the html starts have to come first. HTTP headers are where things like cookies and redirection occur. When a PHP script starts to send html out to the browser, the headers are stopped and the body begins. When your code tries to set a cookie after this has started, you get the "headers already sent" error message.

    How ob_start works

    So, how does ob_start help? The ob in ob_start stands for output buffering. ob_start will buffer the output (html) until the page is completely done. Once the page is completely done, the headers are sent and then the output is sent. This means any calls to setcookie or the header function will not cause an error and will be sent to the browser properly. You do need to call ob_start before any output occurs. If you start output, it is too late.

    The down side

    The down side of doing this is that the output is buffered and sent all at once. That means that the time between the user request and the time the first byte gets back to the user is longer than it has to be. However, in modern PHP application design, this is often already the case. An MVC framework for example would do all the data gathering before any presentation is done. So, your application may not have any issue with this.

    Another down side is that you (or someone) could get lazy and start throwing setcookie calls in any old place. This should be avoided. It is simply not good programming design. In a perfect world, we would not need output buffering to solve this problem for us.
  • Permalink for 'Moving On'

    Moving On

    Posted: January 29th, 2010, 6:00am MST by Paul M. Jones
    I started working at OmniTI on 01 Oct 2007; today marks my last day with the company. After two years and three months, it’s time to move on. I wish Theo and everyone else there all the best in their current and future endeavors. While I don’t have a new employer, my finances are such that [...]
  • Permalink for 'LinuxTag 2010: Call for Papers Ends Today'

    LinuxTag 2010: Call for Papers Ends Today

    Posted: January 29th, 2010, 5:32am MST by Sandro Groganz, Open Source Marketi ...

    LinuxTag is the most important place for Linux and open source software in Europe. Last year, LinuxTag had over ten thousand attendees, and over 300 speakers. This year, the 16th LinuxTag will be June 9-12, 2010 at the Berlin Fairgrounds in Germany.

    LinuxTag seeks exciting and suitable proposals for presentations in the conference tracks. The Call for Papers ends today.

    I am proud to be a member of the LinuxTag Program Committee. Although a lot of proposals have already been submitted, there are some topics missing that I’d personally like to see covered. So, if you’re up for a last minute submission, get your inspiration from the following list:

    • Is/was the recent economic crisis an opportunity for Open Source?
    • More real-life case studies on how OSS is being used in mission-critical scenarios.
    • A European or global perspective on Open Source in Public Administration.
    • How to make use of Amazon EC2 or Google AppEngine with Open Source apps?
    • Technical tutorials for beginners, especially for building Web apps (e.g. PHP/Ruby/Java/etc. for beginners).
    • High performance Web environments with Open Source tools
    • Security in the Cloud
    • What’s the status of some of the regional Linux distributions?

    I can’t promise that your talk will be accepted if it covered one of the above topics. The review process is of course a joint effort of the whole Program Committee. Anyway, it’s definitely worth a try. Of course, any other topic I did not think of is also highly welcome.

    Go here to submit your LinuxTag proposal.

  • Permalink for 'Unicode nearing 50% of the web'

    Unicode nearing 50% of the web

    Posted: January 29th, 2010, 2:45am MST by Evert Pot

    According to a recent post from the Google Blog, Unicode nearing 50% uptake on the web. A rather steep graph as well:

    unicode uptake graph

    This is pretty good news. I've had the 'pleasure' of working with a number of integration project where the 3rd party was still using iso-8859-1 (aka latin-1). Usually when this is the case, its not by choice but because of their software's default settings (Browsers, MySQL, etc.). I for one hope non-unicode charsets will soon be a thing of the past.

    One other note in the post was about ligatures, such as fi and the dutch ij. If this is the first time you heard about these, you might be surprised to see that you can (likely) only copy-paste ij as a whole, and not just the i or j. It's one unicode character, not two. It just made me wonder: what kind of software would generate these, and more importantly why?

  • Permalink for 'Some Soul Searching'

    Some Soul Searching

    Posted: January 28th, 2010, 11:00pm MST by Brandon Savage

    This entry isn’t about PHP.

    It’s about where those of us who develop for a living, PHP or otherwise, see ourselves in the future.

    From time to time I do some soul searching and think about where I’ve been and where I’m going. With a tough few months in the books, I wanted to take some time and figure out my next moves, and where I’m heading.

    Soul searching isn’t easy, because it requires us to examine ourselves, and in particular, our mistakes, to decide whether or not what we’re doing is appropriate and good. Soul searching means reexamining every hard decision that we made and thinking about whether or not we decided rightly. And it means taking a hard look at where we said we were going, and whether or not we actually got there.

    I’ll be doing some soul searching this weekend as I think about the direction I want to go. And then I’m going to employ my resources to get there.

  • Permalink for 'CairoForPHP Samples'

    CairoForPHP Samples

    Posted: January 28th, 2010, 12:42pm MST by PHP-GTK Community

    CairoForPHP is an application that demonstrates several functions of the Cairo implementation for PHP. It uses a technique with which, from the same source, it can run both as a desktop application with PHP-GTK and as a web application in a webserver, thus demonstrating how PHP-GTK can be used as "just one" method of output and integrated into multi-platform, multi-environment applications.

    read more

  • Permalink for 'Stopping CodeIgniter from Escaping SQL'

    Stopping CodeIgniter from Escaping SQL

    Posted: January 28th, 2010, 6:28am MST by Lorna Mitchell
    I'm adding some small features to the API for joind.in when I have a moment and this is my first experience of working with CodeIgniter. I've been getting increasingly impatient with its tendency to try to escape my SQL code for me - this is a really useful default feature but it seems to assume I don't know what I'm doing and so it puts backticks all over perfectly acceptable SQL code, very annoying!

    One night when I was getting exasperated with it tangling up my SQL expressions, I tweeted my frustration in the hope that I was just missing something simple. A prompt reply from @damiangostomski told me that this was indeed the case ... I dug around for the API docs on codeigniter - it's an established framework and has a good reputation. I knew it would have API docs even though I hadn't used the framework before, and I found them:

    $this->db->select() accepts an optional second parameter. If you set it to FALSE, CodeIgniter will not try to protect your field or table names with backticks. This is useful if you need a compound select statement.


    That quote is from this API docs page - so a big thankyou to Damian for replying to me on twitter, and to the good people at codeigniter for adding a useful option to their framework and documenting it so nicely :)
  • Permalink for 'Ruby-like iterators in PHP'

    Ruby-like iterators in PHP

    Posted: January 27th, 2010, 9:22pm MST by PHP 10.0 Blog

    I’ve started playing with Ruby recently, and one of the things that got my attention in Ruby were iterators. They are different inside from regular loops but work in a similar way, and looks like people (at least ones that write tutorials and code examples ;) ) like to use them. For example, you can have:

    arr = {"one" => 1, "two" => 2, "three" => 3}
    arr.each do |key, val|
    print "#{key}: is #{val}\n"
    end

    which iterates over a Ruby hash and prints:

    three: is 3
    two: is 2
    one: is 1
    

    So it got me thinking – suppose I wanted to do something like this in PHP (suppose I don’t like regular loop-y iterators for some weird reason). Naturally, I wouldn’t get it in the same concise form as Ruby does, since I can’t change the syntax. But I could get the essence. Let’s try it. First, the main iterator:

    class RubyIterator {
      protected $_body;
    
      public function __construct($body) {
        if(!is_callable($body)) {
          throw new Exception("Iterator body should be a callable");
        }
        $this->_body = $body;
      }
      public function yield()
      {
        $args = func_get_args();
        call_user_func_array($this->_body, $args);
      }
    }

    Next, less try to make some class that uses it:

    class RubyArray {
        protected $_arr;
        public function __construct(array $a)
        {
            $this->_arr = $a;
        }
    
        public function each($body) {
            $iter = new RubyIterator($body);
            foreach($this->_arr as $k => $v) {
                $iter->yield($k, $v);
            }
        }
    }
    

    and then:

    /*
    arr = {"one" => 1, "two" => 2, "three" => 3}
    arr.each do |key, val|
        print "#{key}: is #{val}\n"
    end
    */
        
    $arr = new "/>

    Truncated by Planet PHP, read more at the original (another 6795 bytes)

  • Permalink for 'mtrack: a software development tracker + wiki'

    mtrack: a software development tracker + wiki

    Posted: January 27th, 2010, 9:12pm MST by Wez Furlong

    [Updated to add IRC and Google Groups links]

    I don't know if it's just me, or whether everyone in software development finds issue tracking software frustrating and/or broken in some way.  They're all either way too complicated to set up, configure or use (the Bugzilla's or the Jira's), or have annoying "features" (such as Trac's you-lose-your-edits-if-someone-else-changed-something).

    We've been using Trac at Message Systems for several years now and have been enjoying its pragmatic approach of keeping the interface simple but expressive; just enough structure to be helpful but not too much that it intrudes.  We've added/modified a couple of plug-ins to it to help track time and draw some graphs, but it has otherwise served us well.

    However, we've got a couple of projects that have started to converge and overlap and it's frustrating to visit the two different portals to interact and stay on top of things.  As we scale up our development teams even further (we continue to have bigger and bigger plans!) this will prove to be more widely frustrating.

    Enter mtrack; on one hand it's a clone of many of Trac's features (possible due to their pragmatic BSD license), but on the other it has some refinements in terms of its workflow.  What's important to me is that it is built to work with multiple code repositories and allows breaking out information on a per project basis.  It also tries hard to avoid losing your wiki or ticket edits if someone else updates things while you're working.

    continue reading …

  • Permalink for 'Zend Framework 1.10.0 STABLE Released'

    Zend Framework 1.10.0 STABLE Released

    Posted: January 27th, 2010, 12:35pm MST by Zend Developer Zone
    On behalf of the Zend Framework team and the framework's many contributors, I'm pleased to announce the immediate availability of the stable release of Zend Framework 1.10.0. You can download it from our downloads page: [framework.zend.com] This release includes a ton of new features (more on those below), as well as some huge changes to our documentation.
  • Permalink for 'Quo vadis PEAR?'

    Quo vadis PEAR?

    Posted: January 27th, 2010, 9:00am MST by till

    To PEAR or not to PEAR — PEAR2 is taking a while and I sometimes think that everyone associated with PEAR is busy elsewhere. Since a little competition never hurt, I'm especially excited about these recent developments.

    With the release of Pirum, I'm really excited to see two public PEAR channels that aim to make PEAR a standard to deploy and manage your applications and libraries. One is PEARhub and the other is PEAR Farm. I think I'm gonna stick with PEAR Farm for a while, so this blog entry focuses on things I noticed when I first played with it.

    PEAR vs PEAR Farm

    A lot of people mistake these new channels for the wrong thing. They think that this will eventually replace PEAR. I don't think it will — ever.

    While I really welcome the idea that people push PEAR's channel for a standard to distribute apps and libraries (PHPUnit, ezComponents, Zend Framework, Symfony, etc.), it's also very obvious that these open channels will never be the same.

    For an idea of what I mean — take a look at open code repositories around the web and especially when it comes to PHP, it's very obvious that while there's a lot of code, most of it is utter crap. (There I said it!)

    And no one wants to rely on it when reliability is an objective.

    The PEAR Coding Standards were not invented because it's so great to tell people how to write code. But a lot of people need this guidance. While they have a lot of ideas about how to implement a feature or a cool algorithm, their passion does not extend to test coverage or even little documentation. And that's where these sometimes frowned upon coding standards come in handy because they ensure that the code in PEAR is maintainable — which is really just the tip of the ice berg for professional software engineers and I'll save the rest for another blog post.

    Let's get to it

    Regardless of the fact that there always only few steps, PEAR setups tend to not work for or look complicated to a lot of people. Here are a few tips on how to get started. We'll assume pear itself is installed (apt-get install php-pear).

    PEAR Farm

    Instead of what is written in the FAQ - suggested steps to get started. ;-)

    • pear channel-discover pearfarm.pearfarm.org
    • pear install pearfarm.pearfarm.org/pearfarm-beta
    Spec files and package.xml

    The package.xml is a configuration file for the PEAR package. It's pretty long, and since XML is so verbose, it's a turn off to many. PEAR Farm suggests to create a spec instead, so it can create a package.xml for you. This is pretty convenient, but there are also a few gotchas.

    • pearfarm init (inside the code repo)

    If you're doing it for the first time, it will issue a warning about a configuration file being created — ignore it and move on.

    Continue by editing the .spec file with description, summary, maintainer and whatever else is a suggested edit inside it.

    Then, feel free create a package.xml:

    • pearfarm build

    This will leave you with a package.xml file in the same directory. Mission accomplished!

    Gotchas & Tricks

    These are a few things you should edit before you pearfarm push:

    • If you use git and happen to have a .gitignore, pearfarm will add .gitignore to the package.xml as well.

    • pearfarm adds a baseinstalldir attribute to the top most entity. Assuming your package is Foo_Bar and you have Foo/Bar.php in your repository, it would install into /usr/share/php/Foo_Bar/Foo/Bar.php, instead of Foo/Bar.php. I'd suggest you remove it and instead namespace in the package name right away — YourName_FooBar.

    • Does it work? Always pear package-validate before you push!

    • Does it install correctly? Feel free to pear install Package-x.y.z.tgz and check if the files installed ok (pear list-files pearfarm.pearfarm.org/Package)

    • A package.xml can have files with different roles, while the standard is php, there's also doc (for documentation) and test for tests. When the package.xml is generated from the .spec, all files get php by default, that's why I'd go through the list in to double-check that all files have appropriate roles set.

    • Another thing to take care of (imho), would be — somet

    Truncated by Planet PHP, read more at the original (another 585 bytes)

  • Permalink for 'Upheaval without wires'

    Upheaval without wires

    Posted: January 27th, 2010, 6:39am MST by Marco Tabini

    If you came here for advance information or predictions about Apple’s much discussed table, I am afraid I have neither. In fact, I am fairly sure that what I am about to tell you is unlikely to happen, so, there you are.

    On the other hand, I have certain hopes for the product and one, in particular, is something that I haven’t seen anyone in the media discuss: could the Jesus Tablet revolutionize the way we buy and use wireless data?

    Everyone agrees with the fact that the tablet will have some kind of 3G or 4G wireless cellular connectivity, but they all seem to take for granted that network access will be provisioned the same way it is done with the iPhone.

    The tablet, however, is not a phone—quite the contrary—and, therefore, it’s perhaps a good idea to ask whether Apple may not be looking for ways to create an even more captive market.

    To understand what the implications might be, one only needs look at the Kindle. It hasn’t occurred to me until recently that the killer feature of Amazon’s reader is not the e-ink screen, or the vast selection of books—it’s the fact that it makes accessing a cellular network completely seamless: there are no contracts for you to sign (except the one with Amazon), no data fees to pay (except the ones you pay to Amazon as part of your purchases) and—most importantly—no roaming fees to deal with.

    In other words, even though it doesn’t look like one, the Kindle is a cell phone that works the world over through a single provider that is not your cellco. In fact, looking at Amazon’s recent announcement of its revised royalty scheme for the Kindle, you can see that they are planning to charge $0.15/MiB for data transfer, regardless of where the user is in the world. To put things in perspective, the lowest price that is available to me while roaming in the States is $1/MiB—and that’s if I pay a $10 monthly fee to get it reduced from $6/MiB, if I sign a long term agreement and if I agree to pay on top of my regular voice and data plan.

    Compare this experience with the absolute hell that dealing with your current cellular company is, and you will see that there is an opportunity, for a sophisticated player, to create a wave of unprecedented disruption in the wireless market.

    If Apple were to sell the tablet and make a data plan available through Apple, a number of really important things would happen:

    • First, its users would become entirely captive—no messing around with third-party companies, subsidies, and the likes
    • Second, a clueful company would, for the first time in history, be in control of a wireless experience end-to-end. Just like the iPhone’s killer feature is the App Store, this could be the tablet’s one defining characteristic
    • Third, Apple’s immense buying power would bring costs down to a level that is going to be difficult to beat
    • Fourth, the fact that it doesn’t look like a phone doesn’t mean that the tablet couldn’t work like one—and without pesky wireless companies dictating terms, no-one would prevent customers from installing Skype or a SIP client on their systems
    • Fifth, Apple could easily integrate this service with others it already provides (MobileMe Data?)

    The disruption of this approach would be nearly total: because customers purchase service from Apple, the underlying network provider becomes little more than a curiosity, and it’s not unthinkable for our friends from Cupertino to eventually set up their own global wireless network.

    Of course, I have no illusion that it’s highly unlikely for any of this to happen—I mean, the wireless companies cannot possibly be so shortsighted to let this happen, right?

    Right?

    Image credit: Tablets by swimboy1

    Reblog this post [with Zemanta]<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript">
  • Permalink for 'WinCache Extension 1.0.1 – Servicing Release'

    WinCache Extension 1.0.1 – Servicing Release

    Posted: January 26th, 2010, 3:39pm MST by Ruslan Yakushev

    The new release of WinCache Extension for PHP - version 1.0.1 – is available for download. This is a servicing release that has fixes for bugs reported in v1.0. In particular the following fixes and changes have been made in this release:

    • Fixed require_once on PHP5.3. If the files were absolute and similar files were included in different case, require_once was including it twice.
    • Changed relative path cache to act as resolve path cache. Incremented refcounts under aplist lock. Did comparison using InterlockedCompareExchange.
    • Fixed crashes which were happening because aplist refcount and opcode cache refcount can get out of sync due to local cache.
    • Exposed is_local_cache property from ocache_fileinfo and fcache_fileinfo. Stats page will use this to indicate when local opcode data is shown.
    • Updated the wincache.php to pass chart data on query string to ensure that the charts show the same data that is displayed in tables
    • Updated the wincache.php to show whether information about a global or local cache instance is being displayed
    • Changed variable names and comments to indicate rplist is resolve path cache and not just relative path cache
    • Changed wincache.php to use resolve_path instead of relative_path

    The new release is available for download from the extension’s home page at: [www.iis.net] . The source code for the extension is available on PHP PECL page here: [pecl.php.net] . The documenation for the extension can be found at [www.php.net] .

  • Permalink for 'WINCACHE 1.0.1 released for both PHP 5.2 as well as PHP 5.3'

    WINCACHE 1.0.1 released for both PHP 5.2 as well as PHP 5.3

    Posted: January 26th, 2010, 2:59pm MST by Venkat Raman Don

    I recently asked user of WINCACHE to give feedback on soon-to-be-released bits of WINCACHE 1.0.1. We got mails from lot of people who came forward to help us with the testing. I would like to thank all of you there who helped us in testing the critical fix. I am still getting request for new binaries which is overwhelming. Based on the user’s feedback (which was all positive) we decided to release WINCACHE 1.0.1 today. I would advise everybody using WINCACHE to switch to the new stable version even if you are not seeing any problem with current builds. This version has got a critical fix and is good enough reason to upgrade to the newer bits.

    Upgrade is supported from Microsoft Web Platform Installer if one is using PHP5.2. The new binaries can be downloaded from link at [sourceforge.net] . The main download link contains the WINCACHE 1.0.1 binaries for PHP 5.2. Binaries for PHP 5.3 version can be found at [sourceforge.net] . Right now we are releasing only non-thread-safe bits of WINCACHE only. Anyone interested in thread safe version will be required to build the extension from downloading the sources from [pecl.php.net] .

    The release contains below fixes:

    • Fixed require_once on PHP5.3. If the files were absolute and similar files were included in different case, require_once was including it twice.
    • Changed relative path cache to act as resolve path cache. Incremented refcounts under aplist lock. Did comparison using InterlockedCompareExchange.
    • Fixed crashes which were happening because aplist refcount and opcode cache refcount can get out of sync due to local cache.
    • Exposed is_local_cache property from ocache_fileinfo and fcache_fileinfo. Stats page will use this to indicate when local opcode data is shown.
    • Updated the wincache.php to pass chart data on query string to ensure that the charts show the same data that is displayed in tables
    • Updated the wincache.php to show whether information about a global or local cache instance is being displayed
    • Changed variable names and comments to indicate rplist is resolve path cache and not just relative path cache
    • Changed wincache.php to use resolve_path instead of relative_path

    Thanks for the patient reading and till we meet again ‘Good Bye’.

    Don.

  • Permalink for 'PHP Developers Summit 2010 in Partnership with Microsoft this Weekend in the Philippines '

    PHP Developers Summit 2010 in Partnership with Microsoft this Weekend in the Philippines

    Posted: January 26th, 2010, 11:07am MST by Zend Developer Zone
    In partnership with Microsoft Philippines, PHP User Group Philippines presents PHP Developers Summit 2010 on January 30th. We are inviting you to come and join us in this gathering of the country’s best tech-talents, professionals and web developers promoting the use of PHP and open source solutions in the enterprise and schools.
  • Permalink for 'Inner Join / Outer Join – The Database Song'

    Inner Join / Outer Join – The Database Song

    Posted: January 26th, 2010, 8:14am MST by Maggie Nelson

    Finally found some footage of the Inner Join / Outer Join database song Craig Campbell and I created for the Schematic Tech Summit in September 2008! (The contribution was: lyrics about 50/50 and 100% of music is original and written by Craig.)

    Link to the footage: Inner Join / Outer Join

    And the lyrics:

    Craig: “Hey Maggie, I think this song’s going to be in A major…”
    Maggie “Major?! but I just met’er!”

    inner join outer join
    do you really know the difference?
    inner join outer join
    a null could ruin your existence

    it doesn’t matter which you choose
    whichever database you use
    oracle, mysql [and postgres!]
    i’ve got a story i should tell
    about inner and outer joins

    CHORUS

    do those phrases sound like gibberish
    like bubbles from a talking fish?
    or german or italian
    or japanese or french or dutch
    or maybe klingon?

    CHORUS

    focus on integrity
    and your database will feel pretty
    do you want an epic fail
    or do you want your app to scale
    and reach to Jupiter

    where aliens can run queries
    to make sure you have your foreign keys
    have your ON DELETE CASCADE
    relations come to aid!
    your world is normalized

    CHORUS x 2

  • Permalink for 'Speaking at conferences in spring 2010'

    Speaking at conferences in spring 2010

    Posted: January 26th, 2010, 7:22am MST by Derick Rethans
    Speaking at conferences in spring 2010 London, UK Tuesday, January 26th 2010, 14:22 GMT

    In the next few months, I will be speaking at the following conferences:

    PHPBenelux Conference 2010 is the first annual conference by the PHPBenelux usergroup. It is organized in Antwerp on Saturday January 30th. I will be giving a keynote titled "The PHP Universe".

    PHP UK Conference is PHP London's fifth annual conference and held on Friday February 26th at the Business Design Centre. I will be talking on PHP on the D-BUS.

    ConFoo (formerly PHP Québec) is the first edition of the Confoo.ca Conference. From March 10th to 12th 2010, international experts in Java, .Net, PHP, Python and Ruby will present solutions for developers and project managers the Hilton Bonaventure Hotel, located in downtown Montréal. I will be talking on Advanced Date/Time handling with PHP.

    Hope to see you there!

  • Permalink for 'Speaking at Confoo'

    Speaking at Confoo

    Posted: January 26th, 2010, 6:16am MST by Ilia Alshanetsky
    I will be speaking again this year at PHP Quebec conference, which has now been renamed to Confoo and covers many more topics then just PHP, which should make things even more interesting. With over 100 talks things looks to be an amazing conference, my own talk with cover PHP 5.3 awesomeness ;-)
  • Permalink for 'Book Review: Producing Open Source Software'

    Book Review: Producing Open Source Software

    Posted: January 26th, 2010, 3:31am MST by Keith Casey

    Recently, I realized that despite talking about Karl Fogel's book - "Producing Open Source Software" - numerous times over the past year[1][2][3], I've never written a review of it. So without further ado, here we go.

    I originally picked up my copy in mid-2007. It took me a couple months to get to it, but once I did, it rocked my professional world. To be clear, Karl Fogel is an early (founding?) member of the Subversion Version Control System.

    Karl starts off talking about the beginning an Open Source project and the things - both community and technical - that are required to get things rolling. If you're participated in an even moderately active/successful open source project, none of this will be surprising, but having all of it enumerated clearly never hurts. If you go with something like SourceForge, Google Code, Launchpad, or Microsoft's CodePlex, you'll have version control, forums, some release management and bug tracking immediately. Honestly, getting the technical infrastructure setup is just plain simple.

    The more important portion to me was the other "half" of the book where he discusses the team dynamics side of things.

    First of all, he talks about basic Political and Social Structure of the team itself. While he lays out some general principles, the more important and valuable stuff is in his specifics. How are important decisions made? How do community members become team members? What roles and responsibilities does a team member have over a random community member?

    Next, in Communications, he talks about all the day to day things we have to deal with. Difficult users, the proper tone, how to diffuse arguments, and generally how to keep things on topic are all covered. Does it all work? Nope, not all the time. But some of it definitely might work some of the time. Regardless, it's a good overview of tips and tactics interspersed with real world examples from the Subversion project.

    Finally, there is detailed discussion of Managing Volunteers. This is where the vast majority of projects have problems and the reason is obvious. Very few developers - no matter how sharp they are - know how to motivate people, engage a community, and delegate tasks. Most of us confuse communications and evangelism with marketing... which realistically, I guess they are the same. Doh.

    This was highlighted for me last fall at ZendCon when one person asked a panel "Do you think it's appropriate for a project to ask their users to go vote in [technical] polls?" If a project's leadership isn't supposed to engage and occasionally direct their community towards goals complementary with the project, I'm not sure what the point is.

    So overall, almost every single idea struck me as both blindly obvious, incredibly powerful, and almost always missed. And the single best part about this entire book... about 90% of it applies to any project or technical community. Yes, I don't care if you're working on an Open Source project, an internal project, or a commercial shrink-wrapped application. You can use almost any idea from this book and apply it immediately.

    When I started reading this book, I was active in DCPHP, working with a startup, and on the verge of leaving dotProject. This book crystallized many of my concerns and thoughts about what a community and project could and should be, so I set out to take the best ideas from the book and apply them to each of the communities that I participate in. It's been one of my primary motivators in unconference organizing and web2project and I don't hesitate to recommend this one to anyone who needs to make their project successful.

    Overall, I give it a 10.

    By the way, all of "Producing Open Source Software" is available under a Creative Commons license at ProducingOSS.com.

  • Permalink for 'Playing With Storytlr'

    Playing With Storytlr

    Posted: January 26th, 2010, 1:53am MST by Stuart Herbert

    I haven’t been blogging very much for some time now; since the car crash my weekends have mostly been spent recovering from the long commute to and from work during the week.  But I do tweet a lot, and thought it would be a good idea to update my website to show more of a lifestream rather than just the blog.

    Storytlr has been getting a few mentions recently, such as this story on Arstechnica, since its authors decided to release it under the Apache license.  Based on Zend Framework, Storytlr is relatively simple to install, but not yet as polished as Wordpress has become.

    My first impressions are that it has promise, but that it’s not yet a 1.0 release in terms of quality.  That surprised me, given that the guys used to run a business based on this, but full credit to them for placing the code under an open source license so that the community can keep it alive.

    The Google project … I wouldn’t say it was dead, but at the time of writing it hadn’t been updated for over six weeks.  There’s also a github project from the Storytlr authors, and jmhobbs has an active clone of the Storytlr project where he’s busy adding some much-needed polish.  I’ve cloned the project too, and I’ll commit fixes and improvements (such as improving the Twitter plugin, and a new podcasting plugin) there as and when time allows.

    I hope others pick up Storytlr and start contributing fixes and improvements too.  I think it has the potential to be worth the effort.

    Share This

  • Permalink for 'PHP Summit in Düsseldorf'

    PHP Summit in Düsseldorf

    Posted: January 25th, 2010, 11:36pm MST by Sebastian Bergmann
    PHP Summit

    This blog posting is in German as the event it relates to is German-only. Sorry for the inconvenience. Our next training event in English will be in Montréal in March.

    Der 1. PHP SUMMIT ist eine neue und einzigartige Veranstaltung mit dem Anspruch, alle wichtigen Themen von PHP in kompakter Form zu vermitteln. Hier können Sie drei Tage lang, jenseits der ausgetretenen Pfade von klassischen IT-Trainings im Unterrichtsstil mit Übungsaufgaben und Lernkontrolle, insgesamt 18 intensive und interaktive Power Workshops erleben.

    Sämtliche Workshops beziehen sich auf die tägliche Projektarbeit und zeigen Ihnen den produktiven Live- Einsatz von Tools und Methoden. Hohe Interaktion mit den Teilnehmern, Live-Coding statt vorgefertigter foo/bar Beispiele, Informationen über neueste Trends in der PHP-Entwicklung — alles gewürzt mit einer guten Prise Humor — das sind die einzigartigen Merkmale des PHP SUMMIT. Darüber hinaus profitieren Sie vom geballten Wissen und der Praxiserfahrung der drei Experten von thePHP.cc: Sebastian Bergmann, Arne Blankerts und Stefan Priebsch.

    Melden Sie sich noch heute an, um sich Ihren Platz zu reservieren!

  • Permalink for '5.2->5.3 migration script'

    5.2->5.3 migration script

    Posted: January 25th, 2010, 4:34pm MST by Stas Malyshev

    Wrote an article on DevZone about migration script from php 5.2 to 5.3. This little script can save some time when you consider to move your codebase to run under 5.3 (which you should ) ).

    This script doesn’t do everything I’d like it to do – specifically, I’d like to make it try to figure out all kinds of messy reference scenarios, but I’m not sure how yet. And if you have other idea, please comment there or here. It’s on public git, so you can take it and modify if you wish.

    Tagged: migration, PHP, php53
  • Permalink for 'Start of HT 2010'

    Start of HT 2010

    Posted: January 25th, 2010, 4:24pm MST by Josie Messa
    Moved back to Oxford on Saturday of -1st week. Had a lot of fun moving the usual handful of boxes out of the car, over a few inches of ice and into my house trying to avoid the foot long icicles hanging from the guttering (welcome to student housing). Managed to arrive at exactly the same time as about 5 other people on my street which was great. As usual got Mum to buy me a steak in Cafe Rouge to help me survive the rest of term without raw meat.

    The rest of 0th week was spent in the library (from Sunday onwards) doing vac work and revising for collections. My wake up call was cycling to the river in the snow to cox the first boat. Training was going well although we only were able to get one VIII out and that had two novices in. Although the morning outings got me out of bed they also subjected everyone I happened to see to my complaints about not being able to feel my toes until about 9pm, when they were thoroughly warmed up after watching four episodes of House curled up in a blanket.

    Unfortunately Hilary Term didn't start so well. Had two collections on Friday which I did pretty poorly on. I'm entirely blaming that on feeling ill for most of Thursday (who knew snow was bad for you). By Sunday I felt much better, cured by running between the star wars marathon (all 6 films) happening in my basement and the library to get the last of the vac work finished.

    Monday morning started with a 9am probability lecture, fun times! My diary looked horrific with about 16 hours worth of lectures scheduled. Considering I'm supposed to be taking 72 hours of lectures this term (which equates to 9 hours a week) I realised I needed to cut down on some of the courses. On Monday night I stole Mason (tutor) away from his dinner and we chatted about courses (unfortunately we were sat right at the bottom of the stairs leading to the dining hall. Subsequently most of the conversation was spent with me acknowledging half the college as they walked past, wondering why people were taking photos of the cat, and then trying to avoid the cat scratching my legs out). Was able to narrow it down to 80 hours which is far more sensible...

    Tuesday night was formal hall - classic lamb shank (which I'm really starting to get fed up of), with a dessert of football in the bar followed by a cheeseboard of probability served in the library, going on until I can't remember what hour of the morning (probably not that late considering my track record of this term so far).

    Wednesday turned out to be a pretty good evening. There was a surprise Captains' meeting (only a surprise since I apparently no longer process information in emails), so had to grab Dave (men's rowing captain) from the union and run down to a lecture theatre in Christ Church and listen to Pembroke and Christ Church whinge at each other for about an hour and a half. For me the meeting consisted of a lot of face-palming and wishing I had brought some work with me to make the time a bit more productive. On the way out, after locking all the captains inside the college gates, Dave asked if I'd eaten dinner yet. This evolved into us eating at Quod (which turns out is a really expensive restaurant on high street) and him paying for it. I wish being Boat Club captain was usually this decadent. On my walk home I bumped into all the freshers queuing outside NOPS (North Oxford Property Services) for the Jericho student housing release and did my Mother Theresa bit part by bringing out tea and hot water bottles. I have unfortunately not had either the mugs or the hot water bottles returned so I refuse to do anything charitable for the freshers again.

    The main event of Friday was getting soaked THROUGH semi-waterproof tracksuit bottoms and my sexy Somerville rowing splash jacket whilst cycling the 15 minute ride from my house to kickboxing - then attempting to box in soaking wet trackies. On arriving back home I was so exhausted that even climbing up the stairs to the warm shower was far too much effort. Naturally I solved the problem by curling up in the basement and watching House (this term's addiction, almost half way through season 2 and we only started watching it a week and a half ago).

    On Saturday the college had their first bop of Hilary term. For some reason it couldn't be held in college so I had to walk down to the OTHER END OF TOWN dressed as Evita. It was a good fun night, the venue was packed and everyone was in a good mood. Plenty of bad dancing was had.

    Highlig

    Truncated by Planet PHP, read more at the original (another 614 bytes)

  • Permalink for 'vfsStream 0.5.0 released'

    vfsStream 0.5.0 released

    Posted: January 25th, 2010, 9:17am MST by Stubblog - Planet PHP
    Today I shipped vfsStream 0.5.0 which brings a new feature thanks to the efforts of Benoit Aubuchon: vfsStream now supports the rename() functionality which allows you to write test cases using vfsStream for methods that rename files. Another patch of him was to change the stat() call to respect the STREAM_URL_STAT_QUIET flag.

    One more new feature is the added support for . as current directory alias so that vfs://foo/. resolves to vfs://foo - this allows to use file_exists($dir . '/.') as workaround for the failing is_executable() call on directories, as described in the comments to the is_executable() documentation in the PHP manual. Of course this raises the question if vfsStream will support .. as well - if somebody takes the time to create a patch I will incorporate this. I did not look into this issue further, but I guess it might involve recursion and a more advanced parsing of the vfs URL to make it work properly, as there might be cases like vfs://foo/bar/baz/../../dummy.

    So grab the release and make use of the new features, if you like to.
  • Permalink for 'Speaking at PHPNW February'

    Speaking at PHPNW February

    Posted: January 25th, 2010, 1:45am MST by Lorna Mitchell
    If anyone is able to make it to the PHPNW User Group meet in Manchester next Tuesday 2nd February - I'm the speaker there! I'll be giving a talk entitled "Best Practices for Web Service Design", which covers lots of information about web services and how to write one that your users will love! Details of the event are over on upcoming, you can find out more about the talks, the venue and the group as a whole. If you're able to make it then I'll see you there - its a good crowd :)
  • Permalink for 'Cool DateTime Functions In PHP 5.3'

    Cool DateTime Functions In PHP 5.3

    Posted: January 24th, 2010, 11:00pm MST by Brandon Savage

    Over time, the PHP DateTime object has become one of the best objects available to PHP developers. This object has grown since early PHP 5 into a robust class that has the ability to do lots of great things.

    Recently, I was exploring some of the functionality provided by the DateTime object as of PHP 5.3 (and wishing that Ubuntu had PHP 5.3 as a package distribution). Here are some of the new things in PHP 5.3 that are really cool.

    Note: you can read the manual on the DateTime object here.

    DateTime::add() and DateTime::sub()
    The add() and sub() methods are about adding or subtracting the number of days, months, years, etc. from a DateTime object. The interface is a bit clunky, requiring you to pass in a DateInterval object. However, this still provides an easy way to modify a DateTime object.

    For example, let’s say we wanted to add 3 weeks to our DateTime object:

    <?php
    
    $dt = new DateTime(); // Set to now.
    $dt->add(new DateInterval('PW3'));
    echo $dt->format('n/j/Y'); // Outputs 3 weeks from today's date.
    
    ?>
    

    How is this an improvement over using the DateTime::modify() method? It improves on it in one specific way: it’s object-oriented. Rather than passing a string you have the ability to pass an object.

    DateTime::diff()
    One of the coolest PHP 5.3 features introduced was the ability to diff two DateTime objects. This returns to you a DateInterval object, which contains the details of how different the objects are.

    $dt1 = new DateTime('August 3rd, 2004');
    $dt2 = new DateTime('August 10th, 2006');
    var_dump($dt1->diff($dt2));
    

    The result that you get looks like this:

    object(DateInterval)[3]
    public ‘y’ => int 2
    public ‘m’ => int 0
    public ‘d’ => int 7
    public ‘h’ => int 0
    public ‘i’ => int 0
    public ’s’ => int 0
    public ‘invert’ => int 0
    public ‘days’ => int 737

    This can be extremely useful in determining the time difference between two objects.

    DateTime::getTimestamp() and DateTime::setTimestamp()
    Sometimes it’s just useful to be able to grab the Unix timestamp from the DateTime object. But prior to PHP 5.3, to do so required some clunky code using strtotime() and a formatted date string. PHP has fixed this, and you can now use these getter and setter methods to get the Unix timestamp.

  • Permalink for 'Working with Microsoft SQL Server driver (php_sqlsrv.dll) for PHP on Windows'

    Working with Microsoft SQL Server driver (php_sqlsrv.dll) for PHP on Windows

    Posted: January 24th, 2010, 9:51pm MST by Venkat Raman Don

    I get a lot of forum posting in our IIS forum asking how to develop PHP application using Microsoft SQL Server. Today I am going to explain basics of developing PHP application on Microsoft SQL Server. Let me start by stating one thing, developing PHP application on Microsoft SQL Server is really easy. The extension which glues the two world namely PHP and Microsoft SQL Server is called ‘Microsoft SQL Server Driver for PHP’. Some important characteristics of this driver are:

    • This is fully supported by Microsoft (so far as you are using the binaries distributed by Microsoft).
    • The 1.1 release of the driver supports both PHP 5.2 (to be precise PHP version 5.2.4 onwards) as well as PHP 5.3.
    • Both thread safe and non thread safe DLL is distributed. This means one can use it on Windows hosting IIS or Apache.
    • People can also look at the code of the driver. The source code for the driver is available here.
    • There is support in the form of forum too. Simply post your query/question here.
    • There is also a team blog which talks about new release/feature at [blogs.msdn.com] .
    • The manual explaining every detail can be found at [technet.microsoft.com] .
    • One can download it from [www.microsoft.com] .

    This driver is replacement of old PHP MSSQL driver. So if you have enabled this extension, you may as well disable php_mssql.dll extension in your php.ini file. In order to disable the old MSSQL driver simply comment the below line in your php.ini file (put ‘;’ in the beginning of the line).

    extension=php_mssql.dll

    The old MSSQL driver is not supported by Microsoft as it takes dependency on some deprecated libraries, so it is a good idea to do the new development using new SQL Server driver. Also porting your existing application to the new SQL Server driver should be easy and is advisable from my side unless you are not planning any enhancement/development in that piece of code.

    One can use Microsoft Web Platform Installer too to get the latest driver. The SQL Server driver can be found under ‘Database’ link inside ‘Web Platform’ tab. The installation comes with different version of driver to support different version of PHP as well as thread safe and non-thread safe appetite of it. The naming convention should tell you this. For example the DLL named ‘php_sqlsrv_53_ts_vc9.dll’ means this DLL should be used with thread safe version of PHP 5.3 built using VC9 compiler. Please use appropriate version otherwise PHP will not load the DLL at runtime. The installation also comes with a help file (CHM file) which contains lot of useful information pertaining to installation, usage as well as all the API well documented.

    I hope this will help you getting started with developing PHP application on Microsoft SQL Server. Thanks for the patient reading and till we meet again ‘Good Bye’.

    Thanks,

    Don.

  • Permalink for 'Installing Storytlr in your own domain'

    Installing Storytlr in your own domain

    Posted: January 24th, 2010, 4:41pm MST by Hasin Hayder
  • Permalink for 'Installing the PHP SSH2 extension in Snow Leopard (10.6)'

    Installing the PHP SSH2 extension in Snow Leopard (10.6)

    Posted: January 23rd, 2010, 2:03pm MST by Vidyut Luther

    Getting PHP with SSH support is not an easy task in Snow Leopard. If you need it, here’s a hackish way to do it, until Sara or Mike get around to patching the ssh2 in PECL.

    Requirements:
    • Xcode : You’re going to be compiling stuff, get it from the apple dev site, be sure to install the unix dev tools.
    • Brew: This will help you install libssh2: [github.com]
    The Hack

    In an ideal world, all you should’ve had to do is just run sudo pecl install ssh2-beta, if you do this, it’ll fail even after you’ve met the dependencies above.

    To make your life easier, go ahead and run that command, and let it fail. Once it fails, you’ll need to patch the downloaded file.

    In my case, I had to go to /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/download/ssh2-0.11.0

    1. Go get the patch file mentioned here: [pecl.php.net]
    2. Install the patch: patch -p0 < ssh2-php53.patch
    3. Run make
    4. Run make install
    5. Add the extension in php.ini (extension=ssh2.so)

    Have fun with the docs: [php.net]

    PS: I’m running Snow Leopard 10.6.3 so my paths may be different than most people running 10.6.2. (yes 10.6.3 will have 5.3.1)


  • Permalink for 'Drupal 6: Aufbau/API/Best practices, Vortrag@Mayflower-Würzburg'

    Drupal 6: Aufbau/API/Best practices, Vortrag@Mayflower-Würzburg

    Posted: January 23rd, 2010, 1:19pm MST by ThinkPHP /dev/blog - PHP
    Am kommenden Donnerstag, den 28.01.2010 findet wieder ein öffentlicher Vortrag im Mayflower Büro in Würzburg statt (Pleichertorstrasse 2, 97070 Würzburg, Straßenbahn und die Haltestelle Congress Centrum).
    Beginn ist um 18:00 Uhr, Thema des Vortrags ist "Drupal 6: Aufbau/API/Best practices".

    Was unterscheidet Drupal von anderen Content-Management-Systemen? Wie ist es aufgebaut? Wie kann man neue Module entwickeln? Daniel Hallmann zeigt wie man Drupal 6 sinnvoll einsetzen kann und präsentiert die gängigsten "best practices".

    Die "Donnerstags-Vorträge" werden sowohl in Würzburg als auch in München gehalten. Bei Interesse einfach das Blog beobachten, um auf dem Laufenden zu bleiben!
    Wir freuen uns auf viele Teilnehmer!


    Größere Kartenansicht
  • Permalink for 'Splitting PHP Class Files'

    Splitting PHP Class Files

    Posted: January 22nd, 2010, 4:26pm MST by Matthew Turland

    A recent work project required me to write a PHP script to interact with a remote SOAP service. Part of the service provider’s recommended practices entailed using a slightly dated software package called wsdl2php, which generates a single PHP file containing classes corresponding to all user-defined types from a specified WSDL file.

    The issue I ran into was due to all the generated PHP classes being housed in a single file. I had to process two WSDL files that had several identical user-defined types in common. As a result, I couldn’t simply include the two PHP files generated from them because PHP doesn’t allow you to define two classes with the same name.

    Looking at its source code, modifying wsdl2php to change this behavior was not a very appealing option. Attempting to consolidate the two WSDL files into one with no redundant user-defined type declarations seemed futile as well. Instead, I resolved to split the generated PHP files such that each class was contained in its own file. This would also allow me to use an autoloader to determine which of the classes I actually needed for the particular service call I was making.

    Due to the number of classes, splitting the classes into separate files by hand would have been tedious and time-consuming. I decided to tap into my previous experience with the tokenizer extension to throw together a CLI script that would handle this for me. Once I got it working, it clocked in at just over 50 LOC with comments and whitespace. You simply call it from a shell and pass it the PHP file you want to split and the destination for the split class files.

    I thought it might be useful for others needed to process similarly formatted source code, so I threw it into a github repository for anyone who might like to take a look. I’m open to suggestions for improvements to implement if enough people find it useful. Feel free to file an issue on the repository if you happen to find a bug.

  • Permalink for 'Zend Framework 1.10.0rc1 Released'

    Zend Framework 1.10.0rc1 Released

    Posted: January 22nd, 2010, 10:12am MST by Zend Developer Zone
    We're entering the final stretches of the Zend Framework 1.10.0 release train: last night, we released our first release candidate (RC) for 1.10.0. You can download it from our downloads page: [framework.zend.com]
  • Permalink for '"Android/iPhone Apps mit Titanium Developer" Vortrag@Mayflower-München diesmal!'

    "Android/iPhone Apps mit Titanium Developer" Vortrag@Mayflower-München diesmal!

    Posted: January 22nd, 2010, 9:48am MST by ThinkPHP /dev/blog - PHP
    Am kommenden Donnerstag, den 28.01.2010 findet wieder ein öffentlicher Vortrag im Mayflower Büro in München statt (Mannhardtstraße 6, S-Bahn Isartor).
    Beginn ist um 18:00 Uhr, Thema des Vortrags ist "Android/iPhone Apps mit Titanium Developer".

    Thomas Steur zeigt wie man mit Webtechnologien (Html, Css, JavaScript) native Apps für iPhone und Android entwickeln kann. Titanium Developer erlaubt dabei die Verwendung von nativen UI Elementen und Features wie Geolocation, Accelerometer, Datenbank usw.

    Die "Donnerstags-Vorträge" werden sowohl in München als auch in Würzburg gehalten. Bei Interesse einfach das Blog beobachten, um auf dem Laufenden zu bleiben!
    Wir freuen uns auf viele Teilnehmer!

    (Foto: [www.flickr.com]

  • Permalink for 'Cairo article published'

    Cairo article published

    Posted: January 21st, 2010, 1:38pm MST by Michael Maclean

    I've got 3 posts or so queued up in my mind to write out, but some of them rather depend on doing other things first, so this will just be a quick note to say I have an article in the most recent php|architect magazine on the subject of "Vector Graphics with Cairo". This is a basic introduction to the PECL/Cairo extension which I've been helping out on for a while now. Thanks to Keith Casey for his input, to the folks at php|architect for letting me do it, and the long-suffering Elizabeth Marie Smith for putting up with all my stupid questions while working on this and other extensions!

    Now, back to my regularly scheduled coding...

  • Permalink for 'mtrack: a software development tracker + wiki'

    mtrack: a software development tracker + wiki

    Posted: January 21st, 2010, 9:12am MST by Wez Furlong

    I don't know if it's just me, or whether everyone in software development finds issue tracking software frustrating and/or broken in some way.  They're all either way too complicated to set up, configure or use (the Bugzilla's or the Jira's), or have annoying "features" (such as Trac's you-lose-your-edits-if-someone-else-changed-something).

    We've been using Trac at Message Systems for several years now and have been enjoying its pragmatic approach of keeping the interface simple but expressive; just enough structure to be helpful but not too much that it intrudes.  We've added/modified a couple of plug-ins to it to help track time and draw some graphs, but it has otherwise served us well.

    However, we've got a couple of projects that have started to converge and overlap and it's frustrating to visit the two different portals to interact and stay on top of things.  As we scale up our development teams even further (we continue to have bigger and bigger plans!) this will prove to be more widely frustrating.

    Enter mtrack; on one hand it's a clone of many of Trac's features (possible due to their pragmatic BSD license), but on the other it has some refinements in terms of its workflow.  What's important to me is that it is built to work with multiple code repositories and allows breaking out information on a per project basis.  It also tries hard to avoid losing your wiki or ticket edits if someone else updates things while you're working.

    I chose to implement mtrack in PHP rather than continuing to extend Trac in python.  My primary reason for this is that I've seen web apps written with Perl and Python, and while there are certainly guru developers out there that can build some awesome apps, those languages don't really lend themselves to web development and that limits the scope of potential contributors.  While I can probably persuade some of my colleagues to code python web bits, I'll find it much easier to persuade more of them to code PHP web bits.  I'm sure this property extends outside of our organization.

    continue reading …

  • Permalink for 'So Long, Blue Parabola'

    So Long, Blue Parabola

    Posted: January 21st, 2010, 8:43am MST by Matthew Turland

    I’ve decided to leave Blue Parabola. My last day there will be Tuesday February 16. I’d like to thank Keith Casey and Marco Tabini for choosing me to be part of the team. It’s been a privilege to work with them and I’ve learned a great deal.

    As for what’s next, I’ll be starting at K-fx2. (Nope, no funemployment for me.) There, I’ll be developing Zend Framework applications and helping to streamline development processes and infrastructure.

    Thanks to all my friends and family who’ve provided support during this transition. I’m looking forward to what the next year holds.

  • Permalink for 'PHP Days Montréal'

    PHP Days Montréal

    Posted: January 21st, 2010, 8:00am MST by Sebastian Bergmann

    Together with my friends and partners from thePHP.cc, Arne Blankerts and Stefan Priebsch, I will be giving an "Advanced PHP Development" training in Montréal in March.

    • How much effort is required to adapt your code to your customers' change requests?
    • Is it easy, or is it cumbersome and tedious?
    • And what about your code's complexity and readability?
    • Is everything crystal clear, or are there parts of the code base that nobody dares to touch anymore?
    • How often do you need to fix bugs after a release?
    • And, by the way: how easy is it to roll a release anyway?

    If any of these questions made you blush with embarrassment, it is high time that you attend this training!

    Learn how to turn bad code into good code and become better, more professional PHP developers. No question goes unanswered when we pull up an editor and explain best practices while we code a sample application live.

    The PHP Days Montréal are a one-of-a-kind classroom training experience where all three thePHP.cc trainers will be present at all times. As the training is scheduled right before the ConFoo conference and the topics covered complement its presentations, the PHP Days Montréal are the perfect preparation for attendees to get the most out of the conference.

    Register now to secure your seat as the number of attendees is limited to ensure a beneficial learning environment.

  • Permalink for 'Direct manipulation interfaces'

    Direct manipulation interfaces

    Posted: January 21st, 2010, 6:26am MST by Henri Bergius

    There certainly is a lot of buzz about Apple's rumored Tablet product. Daring Fireball writes:

    If you’re thinking The Tablet is just a big iPhone, or just Apple’s take on the e-reader, or just a media player, or just anything, I say you’re thinking too small — the equivalent of thinking that the iPhone was going to be just a click wheel iPod that made phone calls. I think The Tablet is nothing short of Apple’s reconception of personal computing.

    What I find most interesting are the view that the Tablet may bring new computer interaction paradigms. Again from Daring Fireball:

    Our “desktop” computers’ human interfaces haven’t fundamentally changed since 1984 — keyboard and mouse/trackpad for input, overlapping draggable resizable windows on-screen, and a hierarchical file system where you create and manage “document files”. Have you ever sat back, scratched your chin, and wondered when the computer industry will break free of these current interfaces — which can be a hassle even for experts, and downright confusing (e.g. click vs. double-click) for the non-experts? Surely no one expects the computer interfaces of, say, 50 years hence to be based on these same metaphors and input methods. What’s the next step?

    A touchscreen tablet isn't really suited for the WIMP paradigm as for example text entry is quite difficult, and you probably want larger, thumb-friendly user interface elements. This is where Microsoft's Tablet PC initiative failed, trying to bring the regular WIMP user interface to the tablet.

    Instead what seems to be happening is that all the Wiis, iPhones, and N900s are now heading us towards a post-WIMP world. Instead of indirect manipulation by mouse and keyboard we can now interact with our applications using the more natural ways of touching things on screen or moving the device around.

    This innovation will not be limited only to mobile APIs, web applications can already now know whether user is accessing them via a WIMP system or a touchscreen device thanks to CSS media queries and Javascript orientation events in latest Firefox.

    The user interface innovation that is arriving thanks to these new interaction possibilities is quite promising, though it will probably take a while before we know what things actually work, and what are just fun demos.

    If you're thinking about new kinds of user interfaces, it might be a good time to read papers like Noncommand User Interfaces (Jakob Nielsen, 1993) and Magic Ink (Bret Victor, 2006).

    I certainly am as we are in the process of defining a new kind of CMS UI for Midgard 2.

    Update: Gizmodo has a very nice article on Jef Raskin's information appliance concept and the evolution of GUIs.

  • Permalink for 'Bayesian Opinion Mining'

    Bayesian Opinion Mining

    Posted: January 21st, 2010, 3:28am MST by Ian Barber

    A bigger type of miner The web is a great place for people to express their opinions, on just about any subject. Even the professionally opinionated, like movie reviewers, have blogs where the public can comment and respond with what they think, and there are a number of sites that deal in nothing more than this. The ability to automatically extract people's opinions from all this raw text can be a very powerful one, and it's a well studied area - no doubt because of the commercial possibilities.

    Opinion mining, or sentiment analysis, is far from a solved problem though. People often express more than one opinion "the movie was terrible, but DeNiro's performance was superb, as always", use sarcasm "this is probably the best laptop Dell could come up with", or use negation and complex devices that can be hard to parse "not that I'm saying this was a bad experience".

    On top of this, expressions of sentiment tend to be very topic focused - what works for one subject might not work for another. To use a well worn example, it's a good thing to say that the plot of a movie is unpredictable, but a bad thing to say it about the steering of a car. Even within a certain product, the same words can describe opposite feeling about different features - it's bad for the start-up time on a digital camera to be long, but it's good for the battery life to be long. This is why a great deal of work, particularly in product reviews, is spent in classifying which element of a product is being talked about, before starting the opinion mining process.

    At the movies

    We'll start with a simpler approach, and look at movie reviews. Luckily for us these are fairly easily available on line from places like Rotten Tomatoes and IMDB, and indeed a convenient data set of sentences expressing positive and negative opinions has already been compiled. We're using opinions expressed on the sentence level in order to give ourselves a little more granularity - while most movie reviews are longer than this, they will also usually express more than one opinion, and keeping our document unit smaller helps us avoid muddying the waters.

    The data is supplied as two files, one for positive opinions and the other negative, with one sentence per line, which makes it easy to parse. To actually extract the opinion, we're going to make use of a classic and well known tool, a Naive Bayesian classifier. These were all the rage for spam filters a couple of years back, and are still a hugely popular way of doing filtering. They have the advantage that they're easy to implement, pretty effective, and quick to classify with.

    Naive Bayes

    Bayesian classifiers are based around the Bayes rule, a way of looking at conditional probabilities that allows you to flip the condition around in a convenient way. A conditional probably is a probably that event X will occur, given the evidence Y. That is normally written P(X | Y). The Bayes rule allows us to determine this probability when all we have is the probability of the opposite result, and of the two components individually: P(X | Y) = P(X)P(Y | X) / P(Y). This restatement can be very helpful when we're trying to estimate the probability of something based on examples of it occurring.

    In this case, we're trying to estimate the probability that a document is positive or negative, given it's contents. We can restate that so that is in terms of the probability of that document occurring if it has been predetermined to be positive or negative. This is convenient, because we have examples of positive and negative opinions from our data set above.

    The thing that makes this a "naive" Bayesian process is that we make a big assumption about how we can calculate at the probability of the document occurring: that it is equal to the product of the probabilities of each word within it occurring. This implies that there is no link between one word and another word. This independence assumption is clearly not true: there are lots of words which occur together more frequently that either do individually, or with other words, but this convenient fiction massively simplifies things for us, and makes it straightforward to build a classifier.

    We can estimate the probability of a word occurring given a positive or negative sentiment by looking through a series of examples of positive and negative sentiments and counting how often it occurs in each class. This is what makes this supervised learning - the requirement for pre-classified examples to train on.

    So, our initial

    Truncated by Planet PHP, read more at the original (another 29822 bytes)

  • Permalink for 'Moving on to php 5.3 and Zend Server CE'

    Moving on to php 5.3 and Zend Server CE

    Posted: January 20th, 2010, 5:21pm MST by Danne Lundqvist

    I have had some serious issues with one of my servers these last days. But finally things are starting to get back to normal. It seems /var was full due to mysql wreaking havoc for no particular reason. This lead - curiously enough - to network problems. If one of the discs failed because of these events or if it is somehow the original problem causing all this I really can’t tell…

    Anyway, instead of quickly fixing the problem, I took the time to set up a new server running Zend Server CE with PHP 5.3. It feels good to finally move to 5.3 as well as trying out Zend Server in a production environment.

    Now if I only had time to try out the new Zend Server 5.0. I’m especially curious about the job queue management. As I’ve more or less lost two days and two nights I guess that’ll have to wait.

  • Permalink for 'Speaking at a Conference'

    Speaking at a Conference

    Posted: January 20th, 2010, 9:57am MST by Matthew Turland

    I can’t make any claim to the title of veteran conference speaker. Not yet, at least. However, I have done it once before at ZendCon in 2008 and I’ll be doing it again at php|tek this year. I thought I’d take a blog post to give out a few tips to any prospective first-time speakers based on my first speaking experience. I’m assuming there that you’ve already decided on a particular conference that you want to attend, you’ve submitted a session proposal, and you’ve been accepted.

    First, in addition to the other things you should do before attending, be ready to give your presentation before you get on the plane. You should start on your slides as far in advance as possible. Don’t put it off or wait until the last minute, because it will likely be more work than you anticipate. This includes making sure that any live demos you intend to give will run as expected. Syntax errors and crashing web servers look very bad to the audience.

    One of the reasons for this is that you’ll want to practice your talk out loud. It’s one thing to put the material onto slides, but it may sound different when it’s actually coming out of your mouth and going into the crowd. You may find stumbling points, places where you stutter or get caught off-guard when transitioning from one topic to another. Try to organize the presentation such that it matches your natural flow when talking about the topic without any slides at all.

    Which reminds me, learn from the masters. People like Marco Tabini have spoken before and have a wealth of knowledge that they’ll share fairly freely most of the time, especially if alcohol (or, in Marco’s case, an espresso) is involved. Look at books like Presentation Zen by Garr Reynolds. Take the time to hone your presentation skills before you have to make your delivery.

    If you’ve been to a conference before, you’ve probably already learned about my next point the hard way. Don’t depend on wifi internet access availability. Why not? Because the vast majority of the time, it will suck. There won’t be enough IP addresses, someone will do something to hog bandwidth and make latency skyrocket, it will find some way to refuse to work. Save local copies of files, write a minimal daemon to simulate a remote server, do whatever you need to do to avoid it.

    That point goes hand in hand with this one: test your equipment early and have a Plan B. In particular, hook your laptop up to the projector in the room in which you’ll be speaking (or to a test projector, if the conference hosts provide one and prefer you use that) to make sure it can display your slides. Ben Ramsey was gracious enough to loan me his Macbook at ZendCon because my Sony Vaio refused to work with the projector and the time-sensitive situation did nothing but add to my speaking nerves. Make sure you don’t end up in the same spot.

    Lastly, don’t let critical reception deter you from speaking again. I got pretty negative feedback the first time around, but I took it in stride. While I know I have plenty of room for improvement, I’m still going to give it another shot. Do your very best, then strive to be better.

    Hope you enjoyed this blog post and gleaned something useful from it. If you’ve got any of your own speaking tips, please feel free to add a comment on this post. If you’ll be attending php|tek, I look forward to seeing you there!

  • Permalink for 'Call for testing a critical fix in WINCACHE RTW 1.0'

    Call for testing a critical fix in WINCACHE RTW 1.0

    Posted: January 20th, 2010, 2:41am MST by Venkat Raman Don

    There has been several instances where people using WINCACHE have reported problem while running it on the actual production server. They have complained that WINCACHE works very well on development server but the users can see a crash (or different symptoms of it) while actually deploying it on a live production server. I am pasting some of the forum links where these kind of problems have been reported:

    [forums.iis.net]

    [forums.iis.net]

    [forums.iis.net]

    [forums.iis.net]

    As one can see there are various symptoms of this. Users can start getting a blank page or PHP can stop responding. And eventually there will a crash report in the Windows Event Viewer which will be something similar to:

    Faulting application php-cgi.exe, version 5.2.11.11, time stamp 0x4ab13019, faulting module php_wincache.dll, version 1.0.819.0, time stamp 0x4a8e6f87, exception code 0xc0000005, fault offset 0x000029be, process id 0x37c, application start time 0x01ca3d975761fce0.

    The developer on the team was finally able to figure out the actual problem. As per him,

    Crashes were happening because refcounts of global aplist filemap and global opcode cache filemap were going out of sync. When a local opcode cache filemap get created, this process doesn’t increment refcount of filemap which holds global opcode cache but still increment the refcount of filemap used to store global aplist. As new php-cgi processes gets created and killed, this difference in refcounts keep going high and reaches a point where refcount for global opcode cache hits zero but global aplist is positive. At this point all opcode cache offsets in global aplist are invalid. Now the next php-cgi process which gets launched creates a new global opcode cache filemap and but uses existing global aplist. This process will crash when it uses old opcode cache offsets from the aplist because those are not valid for brand new opcode cache. I have fixed the bug by making global aplist set opcode cache offsets to 0 when we detect that a new global opcode cache is created.

    This has been a very critical fix. Since I was never able to reproduce it, I would like this to be validated by all of the user’s out there who have seen the crash. Please take time to validate this critical fix. If you want to get the binaries please write a mail to one of the email id specified below specifying whether you are interested in PHP 5.2 or PHP 5.3 version of WINCACHE DLL. The email ids to reach for is:

    • ruslany[at]microsoft[dot]com {Program Manager on the WINCACHE team}
    • ksingla[at]microsoft[dot]com {Developer on the WINCACHE team}
    • donraman[at]microsoft[dot]com {Tester on the WINCACHE team}

    I am on vacation till the end of this week and hence I will prefer to use first two mailing ids.

    I would personally like this fix to address all the crashes being observed in WINCACHE by the users above. It is very important for you all using WINCACHE and seeing the above bad behavior to look at the new binary, try it and report any problem if it still persists. We want to address all the above crashes which will eventually be packaged/bundled together and released as WINCACHE 1.0.1. So please come forward and help us. We did test it on Ruslaan’s server ( [www.ruslany.net] ) and now it is no longer crashing (It does use to crash before). So we do have some sort of validation on our side.

    This fix closes the bug at [pecl.php.net] . The actual code for the fix can be found at [svn.php.net] for people interested.

    Happy testing and thanks for helping the WINCACHE team. And till we meet again ‘Good Bye’.

    Thanks,

    Don.

  • Permalink for '10 Android apps every Android device needs'

    10 Android apps every Android device needs

    Posted: January 20th, 2010, 1:45am MST by Tobias Schlitt
    Since last November I'm the happy owner of an Android smart phone. Actually, I already have my second one: After the HTC Hero, which was already amazing, I now have the Motorola Milestone (aka Droid). This blog post lists and reviews the apps that I think every Android phone should have installed.
  • Permalink for 'Blog review of SugarCRM books'

    Blog review of SugarCRM books

    Posted: January 19th, 2010, 8:20pm MST by John Mertic

    Check out a review of The Definitive Guide to SugarCRM: Better Business Applications and all of the available SugarCRM books on Sander Van Hooft’s blog. He recommended my book as the book to read for any SugarCRM developer, especially if they want to get deep into the MVC framework.

    Thanks Sander for the great review of the current state of SugarCRM books!

  • Permalink for 'Zend Developer Zone Announces the Return of Jayson Minard as Editor-in-Chief'

    Zend Developer Zone Announces the Return of Jayson Minard as Editor-in-Chief

    Posted: January 19th, 2010, 4:51pm MST by Zend Developer Zone
    The creator of Zend Developer Zone returns to take the reins as Editor-in-Chief. Jayson Minard steps back in with a focus on increasing the ZDZ's value to the PHP community through more original and deeper content.
  • Permalink for 'Using ini files for PHP application settings'

    Using ini files for PHP application settings

    Posted: January 19th, 2010, 4:24pm MST by Brian Moon
    At dealnews we have three tiers of servers. First is our development servers, then staging and finally production. The complexity of the environment increases at each level. On a development server, everything runs on the localhost: mysql, memcached, etc. At the staging level, there is a dedicated MySQL server. In production, it gets quite wild with redundant services and two data centers.

    One of the challenges of this is where and how to store the connection information for all these services. We have done several things in the past. The most common thing is to store this information in a PHP file. It may be per server or there could be one big file like:

    <?php

    if(DEV){
        $server = "localhost";
    } else {
        $server = "10.1.1.25";
    }

    ?>


    This gets messy quickly. Option two is to deploy a single file that has the settings in a PHP array. And that is a good option. But, we have taken that one step further using some PHP ini trickeration. We use ini files that are loaded at PHP's startup and therefore the information is kept in PHP's memory at all times.

    When compiling PHP, you can specify the --with-config-file-scan-dir to tell PHP to look in that directory for additional ini files. Any it finds will be parsed when PHP starts up. Some distros (Gentoo I know) use this for enabling/disabling PHP extensions via configuration. For our uses we put our custom configuration files in this directory. FWIW, you could just put the above settings into php.ini, but that is quite messy, IMO.

    To get to this information, you can't use ini_get() as you might think.  No, you have to use get_cfg_var() instead. get_cfg_var returns you the setting, in php.ini or any other .ini file when PHP was started. ini_get will only return values that are registered by an extension or the PHP core. Likewise, you can't use ini_set on these variables. Also, get_cfg_var will always reflect the initial value from the ini file and not anything changed with ini_set.

    So, lets look at an example.

    ; db.ini
    [myconfig]
    myconfig.db.mydb.db     = mydb
    myconfig.db.mydb.user   = user
    myconfig.db.mydb.pass   = pass
    myconfig.db.mydb.server = host


    This is our ini file. the group in the braces is just for looks. It has no impact on our usage. Because this is parsed along with the rest of our php.ini, it needs a unique namespace within the ini scope. That is what myconfig is for. We could have used a DSN style here, but it would have required more parsing in our PHP code.

    <?php

    /**
     * Creates a MySQLi instance using the settings from ini files
     *
     * @author     Brian Moon 
     * @copyright  1997-Present dealnews.com, Inc.
     *
     */

    class MyDB {

        /**
         * Namespace for my settings in the ini file
         */
        const INI_NAMESPACE = "dealnews";

        /**
         * Creates a MySQLi instance using the settings from ini files
         *
         * @param   string  $group  The group of settings to load.
         * @return  object
         *
         */
        public static function init($group) {

            static $dbs = array();

            if(!is_string($group)) {
                throw new Exception("Invalid group requested");
            }

            if(empty($dbs["group"])){

                $prefix = MyDB::INI_NAMESPACE.".db.$group";

                $db   = get_cfg_var("$prefix.db");
             &nbsp

    Truncated by Planet PHP, read more at the original (another 4107 bytes)

  • Permalink for 'Closing and reopening GitHub issues via PHPUnit tests'

    Closing and reopening GitHub issues via PHPUnit tests

    Posted: January 19th, 2010, 2:41pm MST by Raphael Stolt
    PHPUnit GitHub TicketListener Since PHPUnit 3.4.0 a new extension point for interacting with issue tracking systems (TTS) based on the test results has been added to PHP's first choice xUnit framework. The extension point has been introduced by an abstract PHPUnit_Extensions_TicketListener class, which allows developer to add tailor-made ticket listeners supporting their favoured TTS. Currently PHPUnit ships with a single ticket listener for Trac as it's still the used TTS for the framework itself. As I start to become more and more accustomed to use GitHub for some of my exploratory projects and hacks, the following blog post will contain a GitHub_TicketListener implementation and a showcase of it's usage.Annotating tests with ticket meta dataAs you might know, it's considered to be a best practice to write a test for each new ticket representing a bug and drive the system under test (SUT) till the issue is resolved. This extension of test-driven development is also known as test-driven bug fixing. To create a relation between these tests and their associated tickets, PHPUnit provides a new @ticket annotation which will be analyzed before each test is run. The following code listing shows such an annotated test.
    <?php
    require_once 'PHPUnit/Framework.php';

    class ExampleTest extends PHPUnit_Framework_TestCase
    {
    ....

    /**
    * @ticket 2
    * @test
    */
    public function shouldGuarantyThatTheSutHandlesTheIssueCorrectly()
    {
    // test code
    }
    ....
    Peeking at the GitHub_TicketListener implementationThe current version (3.4.6) of PHPUnit has a pending issue regarding the abstract TicketListener class, so the first step is to apply an 'exploratory' patch, which might break the functionality of the shipped Trac ticket listener but will enable the use of the one for GitHub's TTS.

    The next step en route to a working GitHub_TicketListener is to extend the patched abstract PHPUnit_Extensions_TicketListener class. This abstract class contains two abstract methods named getTicketInfo and updateTicket which have to be implemented by the specific ticket listener class, and will be responsible for the interaction with the TTS.

    The implementation of the getTicketInfo method retrieves the ticket status for the annotated ticket, while the updateTicket method is responsible for changing the ticket status based on the test result and the former ticket state. Both implementations make use of the relevant TTS part of the GitHub API by utilizing PHP's curl extension as shown in the next code listing which alternatively is available via this gist.
    &lt?php
    require_once('PHPUnit/Extensions/TicketListener.php');
    PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

    /**
    * A ticket listener that interacts with the GitHub issue API.
    */
    class PHPUnit_Extensions_TicketListener_GitHub extends
    PHPUnit_Extensions_TicketListener
    {
    const STATUS_CLOSE = 'closed';
    const STATUS_REOPEN = 'reopened';

    private $_username = null;
    private $_apiToken = null;
    private $_repository = null;
    private $_apiPath = null;
    private $_printTicketStateChanges = false;

    /**
    * @param string $username The username associated with the GitHub account.
    * @param string $apiToken The API token associated with the GitHub account.
    * @param string $repository The repository of the system under test (SUT) on GitHub.
    * @param string $printTicketChanges Boolean flag to print the ticket state
    * changes in the test result.
    * @throws RuntimeException
    */
    public function __construct($username, $apiToken, $repository,
    $printTicketStateChanges = false)
    {
    if ($this->_isCurlAvailable() === false) {
    throw new RuntimeException('

    Truncated by Planet PHP, read more at the original (another 8040 bytes)

  • Permalink for 'The ConFoo.ca "Web Techno" conference is coming soon'

    The ConFoo.ca "Web Techno" conference is coming soon

    Posted: January 19th, 2010, 1:17pm MST by Christopher Jones
    Francis Begin reminded me that Québec's premiere (can I say that?) open source conference is coming sooner than you think: ConFoo.ca is styled as a "Web Techno" conference "with over 130 presentations in 8 rooms". It takes place in March,...
  • Permalink for 'The ConFoo.ca "Web Techno" conference is coming soon'

    The ConFoo.ca "Web Techno" conference is coming soon

    Posted: January 19th, 2010, 1:17pm MST by Christopher Jones
    Francis Begin reminded me that Québec's premiere (can I say that?) open source conference is coming sooner than you think: ConFoo.ca is styled as a "Web Techno" conference "with over 130 presentations in 8 rooms". It takes place in March,...
  • Permalink for 'Tracing PHP Oracle Applications, part 1'

    Tracing PHP Oracle Applications, part 1

    Posted: January 19th, 2010, 12:14pm MST by Christopher Jones
    (This was an article I wrote for a newsletter). In December 2009, PHP reached the number three position in the TIOBE language index. Analysts are recommending PHP be considered in your technology portfolio. Oracle Enterprise Linux users are well placed...
  • Permalink for 'Tracing PHP Oracle Applications, part 1'

    Tracing PHP Oracle Applications, part 1

    Posted: January 19th, 2010, 12:14pm MST by Christopher Jones
    (This was an article I wrote for a newsletter). In December 2009, PHP reached the number three position in the TIOBE language index. Analysts are recommending PHP be considered in your technology portfolio. Oracle Enterprise Linux users are well placed...
  • Permalink for 'Using animated GIF in CLabel'

    Using animated GIF in CLabel

    Posted: January 19th, 2010, 7:43am MST by Michael Spector
    Have you ever tried to use animated GIF in Eclipse RCP? Unlike using regular image you have to provide your own mechanism that switches between image frames when using animated GIF (more about this is here). Fortunately, you can save in implementing your own thread by using org.eclipse.ui.internal.ImageCycleFeedbackBase and org.eclipse.ui.internal.AnimationEngine (though these classes are still in internal package). Let's say we need to add an animated image to a CLabel. First of all, we extend ImageCycleFeedbackBase:

    public class AnimatedLabelFeedback extends ImageCycleFeedbackBase {
    private CLabel label;

    public AnimatedLabelFeedback(Shell parentShell, CLabel item, Image[] images) {
    super(parentShell, images);
    label = item;
    }

    public void initialize(AnimationEngine engine) {
    background = label.getParent().getBackground();
    display = label.getParent().getDisplay();
    }

    public void saveStoppedImage() {
    stoppedImage = label.getImage();
    }

    public void setStoppedImage(Image image) {
    label.setImage(image);
    }

    public void showImage(Image image) {
    if (!label.isDisposed()) {
    label.setImage(image);
    }
    }
    }

    This is how we attach animated GIF to the newly created CLabel:
    label = new CLabel(parent, SWT.SHADOW_NONE);
    Image[] images = loadAnimatedGIF(parent.getDisplay(), "icons/obj16/animated.gif");
    AnimatedLabelFeedback feedback = new AnimatedLabelFeedback(parent.getShell(), label, images));
    animation = new AnimationEngine(feedback,
    -1, // endless
    100 // delay between frames in milliseconds);
    animation.schedule();

    loadAnimatedGIF() is implemented as follows:
    private void loadAnimatedGIF(Display display, String imagePath) {
    URL url = FileLocator.find(Activator.getDefault().getBundle(),
    new Path(imagePath), null);
    ImageLoader imageLoader = new ImageLoader();
    imageLoader.load(url.openStream());
    images = new Image[imageLoader.data.length];
    for (int i = 0; i ImageData nextFrameData = imageLoader.data[i];
    images[i] = new Image(display, nextFrameData);
    }
    }
    Dispose animation engine when it's not needed anymore (usually in dispose() method):
     animation.cancelAnimation();

    PS: @since 3.3
  • Permalink for 'web2project Status Update: 1.3'

    web2project Status Update: 1.3

    Posted: January 19th, 2010, 3:58am MST by Keith Casey

    Since the v1.2 release in early December, it's been a bit of an adventure... in the first week after the release, we got a couple major bug reports. Another few days resulted in a few more. Another day, another bug. In the first two weeks, we received a total of 7 bugs that ranked from major to critical. All in all, it was a bad time. Conveniently enough, none of the bugs were particularly complicated or deep, so we were able to quickly resolve each of them and eventually release a v1.2.1. And after receiving word of a small issue requiring another merge, v1.2.2 shortly after the New Year.

    While a few members of our community were understandably upset, I was impressed that the bugs were found so quickly and resolves just as quickly. I couldn't put words to this well until I read Karl Fogel's post "Bug Growth is Proportional to User Growth, and Bugs are not Technical Debt." Wow, that Karl is a smart guy. More on that topic later.

    For v1.3 we have quite a few features and fixes on the way:

    First, we've written some Views Helpers. These helpers handle auto-linking fields that have url's in them or even email fields. On the other side of things, we've added validation for email and url fields. If something is supposed to be a url, it will be.

    Next, we've moved the Upgrader into the System Admin. By doing this, we can make sure only Administrators can upgrade a system. Further, we've added a warning message in case someone deployed an upgrade but didn't run the script.

    Next, we've added CSS "minification". Through some creative manipulation of our Phing script, when our download package is created, it compresses the CSS. We were able to trim 33% from both the download packages and the installed application. We've tracked down a few other places and can probably drop another 20-30% of the package the same way.

    Finally, we're spending quite a bit of effort on character encoding and internationalization. If you use web2project exlcusively in English, you haven't noticed any problems. If you use German, Russian, or a variety of other languages, you've noticed issues in the Gantt charts and the PDFs. Unforuntately, to resolve this one, it takes a lot of effort:

    • At present, the Gantt charts are created in three different places in the system with similar-but-not-quite-the-same behavior in each. This is being resolved with the GanttRenderer class but it's not all there yet. The added benefit is that now the jpGraph component is abstracted away from the core code. We've talked about replacing it but now we really can.
    • Even worse is the PDF generation. Each report of the Reports module handles its own PDF generation, file creation, and even naming conventions. We've started refactoring this to handle it all in our CReports class. It hasn't simplified much but it's already allowed us to make the report generation and cleanup a little more secure.

    On a related note, we've also been working on compatibility. v1.2 was the first version of web2project to formally support IIS7 but v1.3 is going to push this even further in at least one major direction.

    Stay tuned...

  • Permalink for 'Javascript on the Desktop (well Linux Mostly)'

    Javascript on the Desktop (well Linux Mostly)

    Posted: January 19th, 2010, 2:36am MST by Alan Knowles

    Unfortunately my internet line died over the weekend, and I was left without a connection until Tuesday. I had a bit of offline time to have a look at some interesting new(ish) technology.

    If you have paid any attention to Gnome development, there are mentions of gnome-shell, and something about making it easier to develop add-on/applets etc. using Javascript. I have not really had time to look at this much, however given the fact I had downloaded all the components prior to my loss of connectivity, I spent some time over the weekend and monday looking at this in more detail.

    It looks like there are obviously things going on in IRC and mailing lists, so most of my impressions are from the websites, and code. There are basically 2 projects currently.

    GJS - This is the mozilla Javascript engine bound to the gobject introspection system
    Seed - This is the webkit Javascript engine bound to the gobject introspection system

    Of the two, Seed apears to be a little more advanced and more time has gone into it, based on the fact there appear to be more core features in Seed (eg. I could not find anything like Seed.print() in GJS), and there are very few examples in GJS

    Both of these use the GObject introspection method to bind to Gtk, and a large and growing number of other libraries. This is something I found very interesting having gone through a similar process with rooscript.

    The fundimental issue of creating bindings to Gtk (and anything that uses the GObject system) is that historically, almost everyone (PHP, Python etc.) who did it used this method.

    * Parse the html documentation, or the .h files (extracting the classes, enums, methods, arguments etc.)
    * Generate Binding code for each library, which wraps these methods, loads the '.so' libraries and links it all together.
    * Compile a Module (or statically link it in some cases)
    * Run... Test.. Fix bugs in wrapping code... Run ... Test.

    What GObject inspection introduces is an very thin layer that can be used to expose any of these methods without writing any binding code (other than to GObject inspection). The result is that to add more features (linking to another library) - you just have to generate a XML file describing the interface, compile it with g-ir-compile and put it in the right folder, and you have magically added support to a new Library, without generating an C code!

    This also means that fixing the binding is considerably simpler (fix the XML file, re-compile etc.) and you have solved bugs in any language that is using it... (as I found with gtk_tree_store_set_column_types()

    Playing with the languages.
    GJS and Seed present the Gtk API very slightly differently, which at present appears to be a bit of a blocker for deciding which to use (or even to bother for some). The key differences are for authoring

    * Javascript 'let' features in GJS - not available in Seed.. - This is rather a big blocker as code designed for GJS will fail in Seed totally.. (and visa-versa probably)
    * Different call signatures to signals� � �  SEED:OBJECT.signal.connect(method)�  vs�  GJS:OBJECT.connect('signal', method)�  - I think personally that GJS way is more true to the concept and cleaner, however as you can see below there are ways around this.

    Seed has a git repo on gnome 'seed-examples', which contains a large number of examples, although their depth is rather thin unfortunatly.. (code coverage is probably 1% at best)...
    Both have pretty much Zero in the documentation stakes.. - A rather trivial task to create - which I'm tempted to have a go at....

    Anyway back to my playing around..
    I've been doing some serious shit in Javascript recently, GUI builders, Code generators, Hacking GTK bindings etc. so I've seen the good, bad and ugly as far as Javascript goes (Bad sometimes being my code).�  I've been slowly moving to what I regard as an effecient, productive use of Javascript, most of which can be seen in the xtype support in RooJS

    After runing the first few examples in seed-examples, I decided to see if using an xtype / Roo structure could be done with Seed. After a bit of tweaking, and bugfixing of Seed, I finally got this code to work.



    var win = XN.xnew({
    xtype : Gtk.Window,
    type: Gtk.WindowType.TOPLEVEL,
    listeners : {
    'delete-event' : function (widget, event) {
    return false;
    },
    destroy : function (widget) {
    Gtk.main_quit();
    }
    },

    set : {
    set_border_width : [ 10 ],
    resize : [300, 300],
    show_all : []
    },
    items : [

    Truncated by Planet PHP, read more at the original (another 5487 bytes)

  • Permalink for 'Survey Identifying Business Needs for Semantic CMS'

    Survey Identifying Business Needs for Semantic CMS

    Posted: January 18th, 2010, 8:19am MST by Sandro Groganz, Open Source Marketi ...

    Please shell out a few minutes to help the IKS Project identify business needs for semantic CMS by participating in a survey. The results will help the EU-funded project to work towards an Open Source interactive knowledge stack.

    There are two different sets of questions, depending on your background:

    Thanks for participating in the survey and please spread the word!

  • Permalink for 'Three Ways to Make a POST Request from PHP'

    Three Ways to Make a POST Request from PHP

    Posted: January 18th, 2010, 2:03am MST by Lorna Mitchell
    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">[http">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.

    POSTing from PHP Curl

    This is pretty straightforward once you get your head around the way the PHP curl extension works, combining various flags with setopt() calls. In this example I've got a variable $xml which holds the XML I have prepared to send - I'm going to post the contents of that to flickr's test method.

    $url = 'http://api.flickr.com/services/xmlrpc/';
    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
    curl_close($ch);
     
    First we initialised the connection, then we set some options using setopt(). These tell PHP that we are making a post request, and that we are sending some data with it, supplying the data. The CURLOPT_RETURNTRANSFER flag tells curl to give us the output as the return value of curl_exec rather than outputting it. Then we make the call and close the connection - the result is in $response.

    POSTing from Pecl_Http

    Pecl_Http has two interfaces - one procedural and one object-oriented; we'll start by looking at the former. This is even simpler than in curl, here's the same script translated for pecl [http:]

    $url = 'http://api.flickr.com/services/xmlrpc/';

    $response = [http_post_data(] url, $xml);
     
    This extension has a method to expressly post a request, and it can optionally accept data to go with it, very simple and easy.

    POSTing from Pecl [Http:] the OO interface

    Finally let's see what the OO verison of the extension looks like. Exactly the same call as both the above examples, but using the alternative interface, means our code looks like this:

    $url = 'http://api.flickr.com/services/xmlrpc/';

    $request = new [HTTPRequest(] url, [HTTP_METH_POST);]
    $request->setRawPostData($xml);
    $request->send();
    $response = $request->getResponseBody();
     
    This example is quite a bit longer than the previous one, and you might think this indicates that this approach is more complicated. In some senses that is true and its probably overkill for our extremely trivial example. However it is worth mentioning that the pecl_http extension is extremely flexible and powerful, and can handle some cases that the curl extension can't. So even if it looks more complicated here, it can still be an excellent choice to implement.

    In Conclusion

    That was a very fast round-up of three ways you could make an arbitrary web service call from PHP - hopefully these examples are clear and will help anyone just starting to implement something along these lines.
  • Permalink for 'PEAR metapackage for Statusnet'

    PEAR metapackage for Statusnet

    Posted: January 17th, 2010, 4:55pm MST by Ken Guest

    A short while ago, someone popped into the PEAR irc channel on efnet and asked about installing Statusnet – which is a “open source micro messaging platform that helps you share and connect in real-time within your own domain.” It’s what powers identi.ca and similar micro-blogging services.

    Specifically, this person wanted advice on installing the six or so PEAR packages on which this software depends; eight if you include the optional ones.

    Foreseeing a number of people wanting similar help, I thought it would be best to create a metapackage to bundle these PEAR packages together – at the least it would mean only one “pear install” command would be required and it would reduce the number of potential mistakes that could be made.

    Following my own instructions in the “Dependency Tracking (Meta Packages) with PEAR” section in the PEAR documentation, I quickly came up with Statusnet_Statusnet-0.1.1.tgz.

    Install it via “$pear install [short.ie] for the moment – as the location of where it’s being hosted may change during the week.

  • Permalink for '"Voldemort, Hadoop & Co." Vortrag@Mayflower-München'

    "Voldemort, Hadoop & Co." Vortrag@Mayflower-München

    Posted: January 17th, 2010, 1:45pm MST by ThinkPHP /dev/blog - PHP
    Am kommenden Donnerstag, den 21.01.2010 findet wieder ein öffentlicher Vortrag im Mayflower Büro in München statt (Mannhardtstraße 6, S-Bahn Isartor).
    Beginn ist um 18:00 Uhr, Thema des Vortrags ist "Voldemort, Hadoop & Co."

    Warum sind Datenbanken so zerbrechlich und so hart zu skalieren? Warum ist es so schwer einen Algorithmus auf viele Rechner zu verteilen? Rene Treffer gibt einen Einblick in Voldemort, Hadoop und HBase, die Open Source Implementationen von GoogleFS, Map/Reduce, Bigtable und Amazons Dynamo.

    Die "Donnerstags-Vorträge" werden sowohl in Würzburg als auch in München gehalten. Bei Interesse einfach das Blog beobachten, um auf dem Laufenden zu bleiben! Wir freuen uns auf viele Teilnehmer!

  • Permalink for 'Wanna help out on wiki.php.net?'

    Wanna help out on wiki.php.net?

    Posted: January 16th, 2010, 12:42pm MST by Lukas Smith

    Recently I have devoting my attention towards other projects like djtechtools.com and un-informed.org/un-i.org away from php.net. That is not to say I have stopped following whats going on or that I do not care anymore. Its just that I feel that I can make more of a difference in these other projects. Also it might just be sort of a phase thing. I am sure one day I will become focused on php.net stuff again. Until then I hope others will pick up the slack and make sure that PDO gets love, at people diligently follow up on todo items mentioned on internals and that someone else picks up wiki.php.net and takes care of some regular maintenance stuff. Like there is a new version of dokuwiki out that fixes some issues, adds some features and adds PHP 5.3 support. If you are interested drop me a line or submit a comment. Who ever sticks around for a while and gives the wiki some love will obviously get commit access with that ever so shiny @php.net email alias.

  • Permalink for 'Zend Framework 1.10.0beta1 Released'

    Zend Framework 1.10.0beta1 Released

    Posted: January 15th, 2010, 7:39am MST by Zend Developer Zone
    Almost a month has passed since our alpha release of 1.10.0 , but the activity on the Zend Framework trunk has done anything but slow down. A number of contributors have completed features that were only near-completion during the alpha, and others have undergone further community review to add a bit of polish to their APIs. At this time, I'm happy to announce a BETA release of 1.10.0. [framework.zend.com]
  • Permalink for '2009 Highlights'

    2009 Highlights

    Posted: January 14th, 2010, 9:16pm MST by Chris Shiflett

    I'm a bit delinquent, but this is my first post of the year, and sticking with tradition, it's a chance for me to record highlights from the previous year. This is my seventh consecutive year doing this; it's hard to believe I've been blogging consistently for that long.

    I used to speak at more than a dozen conferences each year, and it negatively affected the quality of my talks and the quality of my life. My speaking schedule for 2009 was much better:

    PHP UK I gave the last talk at PHP UK, and although it wasn't considered a keynote, it sure felt like one. It was one of my favorite talks for numerous reasons. I had just spent a few hours drinking Persian tea in the sun at a café with Jon and Jon, so I was both relaxed and energized. The stage had no podium, so I felt very connected to the audience. (It also helped that the auditorium was shaped like a bowl.) The feedback was also extremely kind; people thought the talk was inspiring, even better than expected, mind boggling, and the highlight of the conference. (One person even suggested it saved the conference.) Perhaps more surprising than the quality of the feedback was the quantity, thanks mostly to the ubiquity of Twitter. To those who said nice things, thank you so much. It really helped lift my spirits. I capped off my visit to London with an Arsenal match. (It was yet another draw; they're doing much better this season.) PHP Québec Almost immediately after returning from the UK, I was off to Montréal for the annual PHP Québec conference, one of my favorites. I enjoyed all the usual delights, including viande fumée at Schwartz's. I was very happy to be giving the closing keynote, and even happier about how many people were there and all of the nice feedback on Twitter and elsewhere. I managed to get a photo of the audience participating in a change blindness experiment, which I later used in a change blindness demonstration, just to be meta. :-) php|tek The annual php|tek conference was back in Rosemont (not too far from Chicago), and it was every bit as fun as expected. I was able to celebrate my birthday at the Map Room, where Sean played beer host, and everyone had a great time. (I know I did.) I also managed to make it downtown, where I tried Chicago-style pizza for the first time. It was pretty good, but it just can't compete with New York-style pizza. (I still love going to Grimaldi's for lunch when the line's short.) My talk was a big hit as well, but I didn't have quite as much energy as when I gave it at PHP UK. OSCON San Jose is no Portland, and that one fact made this OSCON a little underwhelming. It has often been my favorite conference of the year, but not this year. Luckily, Andrei convinced Helgi, Jon, Sean, and me to stay in San Francisco. As a result, some of my best memories were of places like Samovar, 21st Amendment, and Russian River. In the evenings, I learned a lot about grids, leading, and vertical rhythm from Jon while watching him prepare his talk. The tutorial I gave with Sean went really well, although it was a little rough around the edges, and my talk was a big hit. A

    Truncated by Planet PHP, read more at the original (another 5532 bytes)

  • Permalink for 'Making software management tools work for you – see it at Confoo.ca'

    Making software management tools work for you – see it at Confoo.ca

    Posted: January 14th, 2010, 3:27pm MST by John Mertic

    Coming this March, I’ll be premiering a new at confoo.ca entitled “Making software management tools work for you“.

    The inspiration for this talk came from seeing soo many talks about using the gazillion different tools out there, from version control and bug tracking to project planning and collaboration. Each talk does a great job at introducing the tool and talking about how it works. The big void I hope to fill is to how to evaluate and develop your processes, and then how to pick the right tools to make support your process. I’m going to draw on experiences I’ve had in working with different types of team, and hope to illustrate that there is no “silver bullet” of management tools, but rather that tools should compliment the process your team has in order to achieve true efficiency.

    Be sure to register by January 22 to get in on the early-bird $200 of offer. Big thanks to the organizers of the conference for accepting my talk; I’m really excited to hear the feedback from it.

  • Permalink for 'Why Subversion Still Beats Git'

    Why Subversion Still Beats Git

    Posted: January 13th, 2010, 11:00pm MST by Brandon Savage

    There are lots of projects heading over to Git these days. It’s not hard to see why: Git offers great merging support, distributed version control, and a great playground. Spots like Github even offer centralization crucial to large open source projects. But when it comes to the corporate world, Git may not be ready for prime time.

    Corporate America needs a centralized version control system. Subversion still offers this: Subversion centralizes the repository and simply checks out a working copy (versus Git, which gives you a complete repository). Corporate America still needs to have cannonical version numbers, and the ability to see the progress of a product over time as a single line – not a bunch of branches and independent repositories.

    Git is a great piece of software. It is fantastic for distributed version control. It is my opinion that when it comes to corporate work, Subversion will still continue to win out

  •  
    ← PHPDeveloper.org Nettuts+ →