Category: PHP

  • OneNote API and PHP

    Recently Microsoft released an API for my brain indexer favourite tool, OneNote. To say I’m excited by the opportunities presented with this API, especially when it has some more features, would be an understatement. What’s really promising is how open the dev team are being about the API’s progress and out how quickly they are rolling new stuff out. The API is…

  • Building a PHP development server from scratch

    The other day my dev server completely died, this was rather inconvenient to say the least. 24 hrs later and my new (excellent, very quiet, powerful but only consuming 150w) HP 54L Proliant Microserver was sitting on my desk ready for building. I’ve done a server build so often that I can do it with…

  • Debugging with PhpED and DBG

    As a long-term PhpED user, I’ve always been well aware that I was not making the most of some of the more powerful features of my IDE, particularly the debugging capabilities. Well this week I finally got debugging set-up properly and as per most of my other blog posts I’m listing what I did here…

  • Setting PHP error reporting from a vhost or .htaccess

    Here on our dev servers, we turn PHP error reporting full on so we get to know of any issues with our code well before it hits production (where errors are turned off). This does, however, cause problems with older legacy sites that generate reams of warning errors because the developers were slack and –…

  • Symfony’s most popular plugins

    Francios a core member of the Symfony team recently blogged about the 20 most popular plugins of the Symfony project based upon page views. That list is: I find it very interesting that the ‘simple’ ones are all in the top 6 with the CMS one – which is very new – already taking up…

  • UK PHP Conference 2007

    Yesterday, I attended the UK PHP Conference 2007, organised by the guys at PHP London; it was held at Keyworth Centre, a part of South Bank University, near Elephant and Castle Tube. The first talk was on mashups by Cal Evans, an interesting account of how he created a PHP/AJAX UPS parcel tracker for a…

  • Remote PHP debugging

    After 8 or so years of being a professional web developer I today finally cracked using a debugger with PHP. I’ve been a long suffering PHPEdit user from since it was open source and into having to pay (twice) for a licence. Unfortunately I started getting very irritated by some annoying and performance degrading bugs…

  • Emulating PHP’s substr() with Smarty [sort of]

    Today I had a requirement to strip off the first 9 digits from a string from within a Smarty template. The system using Smarty is *totally* locked down so no access to plugins or using php functions as modifiers so I could not simply do $string=substr($string,9); or even {assign var=”shorterThing” value=$thing|substr:9} In the end I…

  • WordPress spam plugin

    After getting over 200 comment spams in 2 days I decided to implement an automatic spam blacklist system as manual parsing wasn't cutting it any more. Akismet seems good: We can’t stand spam. Who can? You have better things to do with your life than deal with the underbelly of the internet. Automattic Kismet (Akismet…

  • WordPress Widgets

    I'm a developer, I don't mind – in fact, no, I *like* – coding but when it comes to doing stuff on my own site I'm rather hesitant and I prefer things that Just Work out of the box. I installed a new theme K2 last night and whilst it looks good I did have…

  • Using the Zend Framework – Part 1

    Edit: Sorry I never got around to finishing this, there’s only 2 parts of 3. For the past few years I’ve not really learnt anything new PHP dev-wise, mainly because I’ve been getting on with the task of running a business. Anyway, recently I’ve been bringing myself back up-to-speed with what’s happening at the leading edge…

  • Installing a new WordPress theme, K2

    If you’ve installed WordPress in the past then you will have seen the Kubrick theme. A lot of people who use WP end up keeping the original theme as it looks good, for example Cathie has done just this on her blog: http://ackers.bealers.com/. Bealers.com has been annoying me recently, the way it looks and the…

  • The Zend Framework – part 2

    I’ve added a second part to my of my Using the Zend Framework over in my How-To section. http://bealers.com/how-to/using-the-zend-framework-part-2/ Related: Part 1

  • Installing CMS Made Simple

    Grab the code Option 1 – Subversion [code] cd ~bealers/www svn co http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk cmsmadesimple [/code] This checks out the entire project including a lot of modules into a folder called cmsmadesimple which may not be what you want, but it’s what I’ve done. Option 2 – Tarball Instead you could grab the tarball and extract…

  • The Zend Framework – part 1

    I’ve been playing with the Zend Framework and have started a little How-To mostly for my own benefit. http://bealers.com/how-to/using-the-zend-framework-part-1/

  • WordPress PHP syntax highlighting

    I’ve been writing code in my spare time again and have been wanting to blog little snippets but WordPress munges any code that I add into the post body. I googled for wordpress plugins and most didn’t support WP 2 or were a bit tame but then look what I found. The iG:Syntax Hiliter by…

  • PHP Perl Compatible Regular Expressions cheat sheet

    A great one page cheat sheet for PCRE’s can be found over on the PHP Guru website. http://www.phpguru.org/article.php?ne_id=67

  • Building a PHP Development server from scratch

    ***This post is very out of date. See here for a newer version written in 2013.*** Following these instructions will get you a Debian based PHP/MySQL development server set-up with the ability to have multiple developer sandboxes that are accessible from a remote machine on the local network, using Samba. Time needed < 1hr INSTALL OPERATING SYSTEM…

  • PHP XML-RPC timeout

    If you’re using PHP to do XML-RPC and are getting odd issues with a timeout of around 60 seconds then you may want to look at the PHP.ini setting: default_socket_timeout this is by default set to 60 seconds, no-where near enough time for what I was using it for. Note: I’m using the PEAR XML-RPC…

  • File uploads made easy.

    Every time I’ve written some code to upload a file, either to send it off as an email attachment or as an image for some dynamic content piece, I’ve always meant to write a few functions so I don’t have to write the code again. Well, people on the Back-end.org support board have been asking for the…