Month of July, 2007

PHP4 End of Life

The PHP Team formally announced today that PHP4 will be discontinued as of 12/31/2007.

More information can be located here.

Surf the web via a secure tunnel

On occasion you may find yourself developing a site for a client who during the development phase will limit access to the site to a certain set of IP Addresses. This can be a real pain to deal with if your local IP is always changing.

To deal with this I always get the client to grant access to the damagestudios.net IP address (which is fixed and located in a cage in Santa Clara)

I then create a secure ssh tunnel and configure either Firefox or Camino to use the damagestudios.net site as a proxy.

Here’s what you need to accomplish this:

  • openSSH client (OS X has this built in)
  • access to an openSSH server
  • 10 minutes

First you need to create the tunnel. We need to know the name or IP address of the server you will be tunneling to, as well as your login name and password on that server.

For the example I'm using my information, you'll need to replace the username and servername with your information

Now fire up terminal or iTerm and enter the following into your terminal window.

ssh -D 8080 -f -C -q -N fusion94@damagestudios.net

You will then be prompted for your password, which you should enter. Your ssh tunnel is now in place.

Here's a quick overview of what those switches mean:

-D 8080: This basically does a lot of dynamic stuff and makes it behave as a SOCKS server. Of course you could use any non privileged port here (above 1023).
-f: This will fork the process into the background after you type your password.
-C: Turns on compression.
-q: Quiet mode. Since this is just a tunnel we can make it quiet.
-N: Tells it no commands will be sent. (the -f will complain if we don’t specify this).

So now that the tunnel is made we will need to configure Firefox or Camino to use this tunnel.

To do this open Firefox or Camino and type the following into the address bar:

about:config

This will bring up quite a bit of options but you can use the Filter: bar to filter out some of the results. To do this type in proxy into the filter bar.

There are 6 line items we need to deal with.

  • network.proxy.no_proxies_on : localhost, 127.0.0.1, 192.168.0.0/24, .damagestudios.net
  • network.proxy.socks : 127.0.0.1
  • network.proxy.socks_port : 8080
  • network.proxy.socks.remote_dns : true
  • network.proxy.socks_version : 5
  • network.proxy.type : 1

For the example I'm using my information, you'll need to replace the .damagestudios.net with your information

Once you made these changes you are set. You can confirm that you are serving from the fixed IP address by going to What is my IP.

If you ever need to verify that the tunnel is up all you need to do is enter this into the terminal.

ps -aux | grep ssh

You should see a line similar to this:
fusion94 499 0.0 -0.1 29424 2576 ?? Ss 8:31AM 0:03.01 ssh -D 8080 -f -C -q -N damagestudios.net

There’s a lot more that can be done from here such as configuring things on the server for keeping the connection alive. You could also setup your server to allow a key based login so you could have your tunnel open when you start up your computer.

Regardless that's a blog posting for another day.

Go PHP 5

I hope more people and projects decide to support this initiative.

PHP 4 has served the web developer community for seven years now, and served it well. However, it also shows its age. Most of PHP 4's shortcomings have been addressed by PHP 5, released three years ago, but the transition from PHP 4 to PHP 5 has been slow for a number of reasons.

PHP developers cannot leverage PHP 5's full potential without dropping support for PHP 4, but PHP 4 is still installed on a majority of shared web hosts and users would then be forced to switch to a different application. Web hosts cannot upgrade their servers to PHP 5 without making it impossible for their users to run PHP 4-targeted web apps, and have no incentive to go to the effort of testing and deploying PHP 5 while most web apps are still compatible with PHP 4 and the PHP development team still provides maintenance support for PHP 4. The PHP development team, of course, can't drop maintenance support for PHP 4 while most web hosts still run PHP 4.

To learn more about this please visit: Go PHP5

Drupal 6 Code Freeze

Formal announcement tomorrow on the Drupal website but it looks as though Drupal 6 is frozen as of today.

It looks as though it's time to fix bugs and QA the hell out of it.

If you haven't started testing your modules against the 6.x code base then go grab a copy of the development snapshot of Drupal 6 and help us test.


Disclaimer/Warning

This is not stable, and production sites should not run this code.

Copyright 2002-2008 Damage Studios