Sunday, December 05, 2010

PHP5.3 on Ubuntu Lucid Lynx 10.4

I found myself needing to install PHP5.3 on a new install of Ubuntu Lucid Lynx 10.4 recently, here's how I did it:


Had to get libicu38

Had to remove the newer version of libkrb - which removed apache and everything (couldn't ssh in after this - so need to then
apt-get install openssh-server


aptitude install libicu38 apache2 apache2-mpm-prefork mysql-client-5.1 mysql-server-5.1 php5 php5-cli php5-mysql libapache2-mod-php5

set timezone in /etc/php5/apache2/php.ini :
date.timezone = Europe/London

I also wanted mod_rewrite:
sudo a2enmod rewrite

aptitude install curl curl-ssl php5-curl

/etc/init.d/apache2 restart

Hope this helps someone.

Saturday, October 09, 2010

XDebug using a Parallels VM and PHPStorm 1.0.2

I wanted to get XDebug working with my new IDE of choice: PHPStorm. I'm running a Parallels Virtual Machine (VM) with Ubuntu on it, and sharing my local folder on my Mac running Leopard.

I already had PHP 5.3.2, Apache 2.0 and mySQL running on the VM.

I installed XDebug using:
apt-get install php5-xdebug

This added a file named: "/usr/lib/php5/20090626+lfs/"

I then went in to /etc/php5/apache2/php.ini and added the following lines to the bottom:



Another time, I used this:



I also checked there was no zend lines referring to zend debuggers etc, which conflict.

The IP I used above was not the IP of the VM as reported when using ifconfig on the VM, it was instead the IP of my host machine (my mac):

ifconfig on my mac:

I added a file phpinfo.php with to see the xdebug settings:

I now needed to set up PHPStorm to use this configuration:

Under: Run > Edit Configurations in PHPStorm:

Clicking on Server path mappings:

Above, I made sure to use the mount point that the VM was using - this was configured using Parallels > Virtual Machine > Configure > Shared Folders options tab previously when setting up my VM.

I had mapped the /media/psf/ mapping to /var/www/ using a symlink. ( ln -s)

Here is the server configuration

and the mappings tab:

I made sure my VM Apache was restarted:
/etc/init.d/apache2 restart

Now to debug, I could click the Run > Debug option in PHPStorm.

I hope this helps someone. Any questions, please email nathan [ at ] eit dot co dot nz.

Monday, June 14, 2010

GIT with CruiseControl

To get GIT to work as a plugin within cruisecontrol, you need to configure like this:

<plugin name="git" classname="net.sourceforge.cruisecontrol.sourcecontrols.Git" />

This is not obvious when looking here:

The resulting config.xml file will look like this:

<project name="socialgo" buildafterfailed="true">

<currentbuildstatuslistener file="logs/${}/status.txt"/>

<modificationset quietperiod="60">
<git localWorkingCopy="projects/${}/source/"/>

<plugin name="git" classname="net.sourceforge.cruisecontrol.sourcecontrols.Git" />

<antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${}/build.xml" target="build" />

<schedule interval="300">
<ant anthome="apache-ant-1.7.0" buildfile="projects/${}/build.xml"/>

<merge dir="projects/${}/target/test-results"/>

<artifactspublisher dest="artifacts/${}" file="projects/${}/target/${}.jar"/>


Wednesday, March 24, 2010

Calum's website

Calum Ryan ( @zizzfusion ) is offering a free pizza voucher prize - and although I love pizza, I'm always interested in commenting or helping on any website designs that people ask for feedback about.

The website is:

The things that I like:
- that smokey look at the top
- easy to see fresh articles from the homepage - with comment count as bubbles.
- simple top right navigation
- a contact form on the homepage
- flickr photos
- screen shot popup - love these things.

The things I would change (if I had time - and yeah, I never do have time so I understand):
- the positioning of the popup about this competition - overlays the logo - could do with a cookie check to see it doesn't show again when refresh the homepage, but ideally slide it in, and position it so it doesn't look like an overlay banner advert.
- when viewing on 1024*768 there is no margin and slightly to wide, so the nice circle to the right is cut off and a unnecessary scroll bar appears.
- the logo is a bit flat - could do with some backdrops and colour contrast
- the logo does not appear on all pages - so I could be mistaken for looking at another website when going to the portfolio page
- portfolio page calls "articles" "tutorials"
- navigation doesn't show which page you are currently on
- Article category buttons only work for text area - expect the whole button to be clickable
- screen shot popup needs a close button at the top.
- could enhance the portrait picture on the portfolio page as it's very dark.
- description in meta tags could be stuffed with more keywords like "design, webdesign, london etc.. - not exceeding 156 characters of course.

With a few tweaks this could be a great website!