Author Archive

GoDaddy and SOPA: I’m moving [UPDATE: Done!]

There has been a lot of fuzz the last weeks about GoDaddy supporting SOPA.

Not only are they supporting the bill, resitricting a free and open internet, they are also releasing false statements to try and calm down customers by saying they dropped support. On the day of this writing however they have not dropped their support officially.

No matter wether they will drop their support, i’m already looking too move my 5 domains plus hosting away from the company. If an internet company does not get how bad such a bill can, and will, be from the second they lay their eyes on it, they do not deserve any of my money.

I must say i have never had problems with their services or anything, but supporting SOPA is really a statement of complete idiocy, in which i will not partake. This is a completely selfish act on the behalf of GoDaddy imo, so they will loose me, among many others as a customer in the weeks to come…

If you too are a customer, please inform yourself about SOPA.

Note to Self

ubuntu php dev prep commands:
sudo apt-get install vim php5 apache2 libapache2-mod-php5 mysql-server phpmyadmin
sudo apt-get install php-pear php5-xdebug php5-sqlite php5-curl php5-svn php5-mcrypt php5-ldap phpunit
sudo a2enmod rewrite
echo 'ServerName localhost' | sudo tee /etc/apache2/httpd.conf
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo service apache2 restart
sudo apt-get install subversion git git-svn

pear prep commands:
sudo pear upgrade
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear install phpunit/PHPUnit --alldeps

mounting shared folder in virtualbox:
sudo mkdir /mnt/workspace
sudo chmod 777 -R /mnt/workspace
echo '[FOLDERNAME]  /mnt/workspace  vboxsf  defaults,rw 0   0' | sudo tee /etc/fstab
sudo mount -a

install sun java jdk to run PHPStorm
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk

(thx to this blog for the tip on the repo)

install openVPN support in gnome
sudo apt-get install network-manager-openvpn-gnome

Zend Framework ContextSwitch

Today was the day I got tired of constantly disabling the layout and viewRenderer when making ajax calls in the ZF project I’m currently working on.
Today is the day I went and visited my old friend, the Zend Framework ContextSwitch Action Helper.

Continue reading »

Building PHP with bundeled GD on Ubuntu

I was having trouble with some GD library functions not working in my PHP5.3 install on Ubuntu. Apparently Debian distributions do not compile PHP with the bundeled GD library, since it is a branch of the original GD, they consider it insecure.
To fix this problem I downloaded the sources and compiled PHP with the correct GD library.

Continue reading »

Closures in PHP5.4 alpha

The PHP community has been on a roll lately, after the great new release of PHP5.3 last year, a shiny new alpha is seeing light aka PHP5.4. The featurelist is not as big as the one of the previous release. But that’s because the previous one was huge… sporting stuff like namespaces, anonymous functions and late static binding.
PHP5.4 is mostly aimed at improving the previous release, but also gives us devs some nice features to enhance our codebase.

Continue reading »

Debian based Linux flash plugin

Lot’s of websites are still using Flash to play movies. I personally think this is counter productive because of it’s pour compatibility, and support not beeing native. It’s biggest competitor at the moment is HTML5. It can do video playback natively in the browser, with hardware acceleration and better power management. HTML5 also does not exclude a large userbase of iOS internetters.

Continue reading »

Upgrading GoDaddy to 4th Generation Hosting (4GH)

Godaddy recently “upgraded” their hosting capabilities. As they call it: 4GH. Now this is probably all just marketing tricks, especially because they still do not support PHP5.3 officially on shared hosting… (workaround here (not tested yet))

They also publicise the fact that there are EU servers now, but I’m not sure if that’s actually a new thing… anyway, I wanted to make sure I was in on the goodness.
A one sentence google got me there right away, the server is upgrading for free as I’m typing.
go get yours here, your hosting will be upgraded within the 72 hours.

Service Layer and Zend Framework part2

Since my last post, I’ve had some time to reflect on my take on a ServiceLayer and do a little experimentation. This time it around it won’t be all talk and no action though, time to get your code-writing-mittens on. For the purpose of this post I have created a GitHub repository, as the series will progress (if it ever will of course) I should end up with a descent, flexible, robust implementation.
A few points are to be made clear before we get our hands dirty. I will only be using stable libraries, so no ZF2 for now, I’ll be sticking to ZF1.11. (Although Matthew Weier O’Phinney wrote a nice introduction about the new plugin broker architecture in ZF2 which will come in handy in situations like this…). Luckily the autoloader rewrite in ZF 1.10 will allow us to use PHP 5.3 namespaces in our library classes. Another new PHP feature that will come in handy will be Late Static Binding.

Continue reading »

PHPUnit and floating point precision

Last week I’ve had some trouble unit testing a function that converted a point on a map given in degrees, minutes and seconds, to a longitude and a latitude. I did not write the function myself, but was only unit testing it. PHPUnit gave me some weird output, from which I could not extract a cause. Some mighty debugging got me to the bottom of it.

Continue reading »

Service Layer in PHP

I’ve been thinking about robust, extensible, and easy patterns or strategies for setting up an application. Starting from an MVC viewpoint, I feel there’s a need for an extra layer, a service layer.
The service layer can handle workflow that only represents business logic. This meas the Controllers and Models can focus on their own tasks, being handling request logic and persistence logic respectively.
Service layer is a broad concept, and there are many ideas and examples available, for different languages and frameworks. My goal is to try and sculpt it in such a way that it fits in with PHP and Zend Framework.

Continue reading »