Posts

Showing posts with the label php

Query logging and profiling in MongoDB

In my previous blog post I mentioned that the 1.5.0 release of the MongoDB driver for PHP has improved notification support using the PHP Notification API , and showed off a fairly useless (but fun) progress bar. Now its time for a little bit more practical examples using this system: Query logging and profiling. Those of you who clicked through to the github Pull Request may have noticed the long long description of the API and noticed all the different " MONGO_STREAM_NOTIFY_LOG_xxx " constants it included.. When instantiating MongoClient you can pass in " Driver Options " using the 3rd argument. Currently there is only one available Driver Option: " context ". The  context  key takes a Stream Context , and is assigned to all of the underlaying connections the driver creates - which means you can set any of the Socket Context  and SSL Context  options and it will Just Work (maaan.. that saved me a ton of work.. Not needing to implement any of ...

New PHP.net designs floating around

Since 2008 there have been numerous efforts to create a new design for www.php.net, all of which have failed - so far. We've never come as close as two years ago, when the "beta mode"  option was added to our website, but we never really got around to finish it. The "beta design" has even received a lot of makeover compared to what is "beta mode" now . To make things a little bit more awesome, there is also a new branch called "responsive"  which has a lot of changes in it too , especially for manual pages . Hopefully, one day, we'll actually finish one of these and flip the switch forever. In the meanwhile, I'm working on retiring my little baby , PhD , as I want to encourage more people to get involved with the overall project, especially the neglected parts like documentations. It doesn't help anyone to be greeted with a "ohh, btw, you have to have a doctorate to be able to work on the docs" like "almos...

up2date PHP5.3 packages for Ubuntu

Most Linux distributions have a policy of not being to up to date with upstream releases of software, mostly for good reasons. This however is extremely painful for developers, as it means they often need to use really outdated version, containing all sorts of bugs - and even missing features. This has been pissing me off for quite some time, so I have been running my own PHP builds for a while - but when it comes to deploying the apps... the sysadmins obviously start complaining that they have to invest a lot more work into maintaining the servers then they otherwise would have to. So.. What can we do about that?  Launchpad to the rescue! Launchpad makes it really easy to provide your own custom packages, and even has a vast build farm to build packages automatically for different architectures and different Ubuntu releases. The only down side is it doesn't build rpm packages.. Thats fine by me, but that would be really useful for those wishing to deploy on a RedHat bas...

The PHP project and Code Review

Reading code is not only fun, its also a great way to exercise your brain - not to mention a fantastic way to discover new ways to solve problems. At work  ( we are hiring btw !), for example, I read pretty much every single commit (and merge requests, for that matter) - and I'm subscribed to several different OSS commit lists. I can't say I read every commit to PHP, I focus on the areas I care about, but I do skim over the rest - if only just to see when new features are added. The PHP project has a good chunk of mailinglists , everything from support lists, developer discussions, QA, and so on. Every commit to our SVN is automatically posted to the relevant commit mailinglist(s). The main commit lists are;  - PHP (php-cvs@lists.php.net,  http://news.php.net/php.cvs )  - PHP Documentation (doc-cvs@lists.php.net, http://news.php.net/php.doc.cvs )  - PHP-GTK (phpgtk-cvs@lists.php.net,  http://news.php.net/php.gtk.cvs )  - PEAR (pear-cvs@list...

Unix manual pages for PHP functions

Did you know that unix manual pages for PHP functions and methods existed? For a while I had vim configured to run reflection when I hit " K ", but after the PHP documentation team released unix manual pages for PHP I now get the manual page in all its glory; function description, parameter descriptions, return values, examples, notes, see also and everything you are used to see from the online manual. Its awesome. As many PHP functions use "standard names" the documentation team decided to not install the manual in the standard man directory. When you install the unix manual package you get a little shell script (called "pman") which runs the normal "man" command for you, and sets the manual directory to wherever you installed the package. To install the PHP manual as unix manual pages: $ pear install doc.php.net/pman If you are running very old pear version you need to "discover" the doc.php.net channel first: $ pear c...

Most PHP releases in August!

Since PHP 3.0.18 (released October 2000) (no, php.net doesn't keep release records before that for some reason) 60 PHP releases have been made. August and May are the most common months for PHP releases, with 9 releases each. PHP5.3.1 and PHP5.2.11 are in the works these days.. Judging by the August release "frenzy" I bet both will be out by the end of the month! Other useless stats? 26 PHP releases have been on Thursdays 1 On Saturday There have only been 2 releases in 2009 so far 2004 had 10 releases January, April and October have only had 3 releases (each) There has never been a release on Sunday The 89th, 121st, 122nd, 194th, 228th, 241st and the 349th day of the year have had 2 releases each The 3rd day of the month is most likely to be a release day, with total of 6 releases The 9th, 16th, 18th and 21st (of any month) have never been release days... The 18th week of the year is most likely to have an release, whole 8 releases have been made in that week! Want ...

8 reasons why you should *not* write for the php.net manual

8 reasons why you should *not* write for the php.net manual : You get more page hits by publishing your work on your blog You get a free pass to conferences by converting your work into presentation You get paid to submit your work to magazines & commercial websites You get a "trading card" and considered a star The community will know your name You can flame the documentations without needing to do anything about it You can copy&paste parts from the manual and sell it (see point#3) You can license your work to forbid any commercial use or further improvements :)

"Latest releases" box and "conference teaser"

Update (February 19th): Thanks to Steph this should look fine in our favorite browser, IE6, now. I committed the conference teaser patch few hours ago, and as usual it only took about an hour for it to go live . I really think its a nice compromise, looks nice there above the news entrys and isn't that intrusive. Anyway. I also committed "latest releases" box on the right, above the "event section". The idea is to list the latest, stable, releases there - and when we are in RC phase then list them in a box below it . The links will be to qa.php.net where a "big fat warning box" will welcome the user and explain what a "release candidate" really is. Release Candidates will now get more exposure and, hopefully, get more testing - benefiting all of us. Speaking of 'latest releases', I've seen lot of code parsing the frontpage , the download page , the php-announce mailing list, heck, even cvs log in order to get the latest r...

PHP.net frontpage changes

As many of you know I changed the frontpage of php.net recently by moving conference announcements and call for papers to its own dedicated page in a desperate attempt to regain the control of our frontpage. WTF?! came up among conference planners which didn't like the changes at all . Heck, why should they? They lost an important, free, ads on a very popular page on the web. The flip side: they have now their own page free of any distractions and irritations around their advertisements. Regain control? Yes. Conference planers have treated php.net frontpage as their private commercial ground for long enough. It was time for the php.net "staff" to take control of the frontpage back and publish php.net relevant news . This is a community effort, you are no king. Good point. I am no king. But enough is enough. Flooding the frontpage with conference announcements and call for papers had to stop. It was so overwhelming that there was no point for us to post real ...