Press "Enter" to skip to content

Category: Net: Techy: PHP

Posts about the PHP programming language

Marking old posts

I’ve just added a piece of code from “Jem on WordPress” to flag that content older than 6 months on this blog may be inaccurate and not reflect “now” (this comes as I’ve just realised this would be my 996th [19 private, 6 drafts] post in a period of time spanning 15th of October 2001 to “today”: and that’s a long time in anybody’s book

Quicknotes: PHP Pear Modules

Just really for my memory:

To install all of the above:

pear channel-discover pear.pearplex.net
pear install pearplex/PHPExcel
pear channel-discover pear.bairwell.com
pear install bairwell/Bairwell_Geocoder

If you want to make your own PEAR module, consider PHIX Project

WordPress PHPStorm coding standards

I’m a regular user of JetBrains PhpStorm coding package and recently I’ve been doing a bit of WordPress orientated work – so how can I ensure my code matches the WordPress coding standards? Well, using Rarst’s WordPress coding standards helps.

  1. Just download the file and save it as “WordPress.xml” into your Php Storm folder such as .WebIde40/config/codestyles (on Linux, this was /home/[username]/.WebIde40/config/codestyles : I did have to show hidden files in Nautilus: on Windows it’ll be something like C:\Users\[username]\.WebIde40\config\codestyles\ ). To find your configuration file easily, run the following commands:
    • Linux: cd ~/.WebIde40/config/codestyles
    • Mac OS X: cd ~/Library/Preferences/WebIde40/codestyles
    • Windows: cd c:/Users/USERNAME/.WebIde40/config/codestyles
  2. Restart PhpStorm
  3. Load your project and go to “File -> Settings”
  4. Select “Project Settings -> Code Style”
  5. Select “Scheme: WordPress” and OK
  6. Select “Code -> Reformat code…” and wait for your code to be reformatted

This won’t catch every item (such as the Yoda conditions), but it’ll at least make it a bit closer.

Bye Bye Mangahigh – hello Bairwell!

After just over 3 years working at Blue Duck Education Ltd as the Lead Developer/Systems Architect with Toby Rowland and other very talented people (too numerous to name here) building the Mangahigh Maths Games educational resource which we built from a brand new site to being one of the fastest growing educational games sites – I’m now leaving for pastures new.

So where am I going?

Well, my fiancĂ©e and I will be starting, on the 3rd of January, a new company called Bairwell Web Development to combine our two talents. Bairwell will be offering WordPress, Perch and LAMP (Linux, Apache, MySQL, PHP 5 : also some Varnish, PostgreSQL, Memcache, Perl and Systems administration) development consultancy services – so if you want a well designed (Katy), scalable and responsive (me) website: then please get in touch with us via our web development site (Katy is still working on it at this time of writing), Twitter or Facebook.

Fingers crossed!

Running Jenkins CI for PHP on Amazon EC2 [4/7]

Continued from Preparing PuTTY for Amazon EC2

Connecting to Amazon EC2 using PuTTY

  1. Load PuTTY
  2. In the Hostname box, enter the Public DNS entry of your Amazon EC2 instance (ec1-23-456-78-901.xx-yyyy-1.compute.amazonaws.com)
  3. Click, in the left hand side of the PuTTY window, Connection->SSH->Auth
  4. In the “Private Key Field” select the file you saved from “Preparing PuTTY for Amazon EC2
  5. Click “Open”
  6. Login as “ec2-user”

Continued in Installing and Configuring Jenkins CI