Archive

A quick update to wordpress 2.0

Wordpress 2.0 is out! Let’s see, I needed to manually install PHP Markdown which used to be a default plug-in and also an upgraded version of wp-contact form. But other than that everything else just worked.

I’m still here

I just haven’t been in the mood to write as of late. I got an email from a reader asking when I’m going to start writing again, so I figured I might as well address it online. I did have urges to post a few times. Especially when Apple announced the Intel thing (WOW) then a bit later introduced a multi-button mouse! And of course their most recent got-to-get-one toy: the iPod nano.

New projects include learningRuby on Rails for web development (I think my PHP days are close to over now). And using Textpattern (which finally was released out of beta at version 4.0 no-less) for times when you don’t need to re-invent the CMS wheel.

The next big push at work is a total rewrite of the Samson website. Hopefully we can get it done with rails.

I think I’m done with mountain biking, I want to start riding on the road. That would involve a significant expenditure on a road bike, so I’ll probably put that off ‘till the spring.

Please use the contact form to let me know if you have any preferences of what you’d like to see me wrote more about.

My Approach to Apache Virtual Hosts in OS X

The development workflow
If I was developing a site locally on my Mac for a site called http://www.cooldomain.com/ I’d develop it under the domain dev.cooldomain.com that I’m hosting locally on my OS X powered Mac. This way I know, whenever I type dev. before the domain name it’s the local copy and when I have www. before the domain name it’s the live site.

Setting up vhosts
First I create a folder in my home directory called webserver this is where I keep all of my locally hosted sites. For a site called www.cooldomain.com I create a folder within the webserver folder called cooldomain. I then create 2 folders inside that folder first logs (for log files) and then public_html. Your site will be served from the public_html folder.

Continue reading ‘My Approach to Apache Virtual Hosts in OS X’

Temporary computing enviornment

So I’m using an ‘extra’ powerbook while the iBook gets a new logic board this week. What’s a web developer to do with a new (temporary use) machine? Get Apache, PHP & MySQL running of course. Rather than muck around with the OS and .conf files I figured I’d try out some of the complete web server packages that have come out in the last nine months. First up was MAMP, I liked the idea, a simple drag-and-drop install, no mucking around in /usr, /var/ or /etc and the option of using PHP4 or PHP5 was a bonus. Changing the MySQL password turned out to be easy, but killed the web based admin tools built into it. No prob, I can work around that. But then, the showstopper, no mod rewrite! So I went and downloaded another package, WebServerX Kit this is a complete Apache2/PHP5/MySQL/phpMyadmin install. It places its files in /usr/local and comes with a pref pane to start and stop the servers. Wouldn’t ya know it, same deal no mod rewrite. So what did I end up doing? I grabbed the MySQL package from Server Logistics (which btw comes with a nice pref pane) and used Apple’s built-in Apache/php (you need to edit the httpd.conf file to get php working) which comes with mod rewrite pre-installed and all is well again in web dev land. Yes, I will soon post details of how I set up virtual hosting on OS X.

iBook Dead Again

Well, that didn’t take long. No less than 2 hours after the previous iBook post the iBook finally said no more. Right now I’m in the process of backing it up while it’s in FireWire Hard Disk mode, then it’s off to to Apple Store. Hopefully afterward I can remote access into it and de-authorize iTunes and the Studio MX suite.

iPod Photo

I should mention that in March I broke down and purchased an iPod Photo (30GB). I’ve been very pleased with it so far. I believe that the newer generation iPods (including the Shuffle) seem to sound better than the earlier ones. I think hear less distortion in the low end. I’m still using the 512MB shuffle for nights out when I don’t want to carry the full size ‘Pod with me and while snowboarding. I do like having my Photos with me, one feature that helps is that I can sync Music to the iPod from one Mac (my G4 Desktop) and Photos to the iPod from another (an iBook). iTunes 4.8 even allows to to turn off warnings that you would normally get when plugging your iPod into another machine. I’ll definitely pick up the iPod Camera Connector before my next vacation.

iBook Logic Board problems again

Yes, it’s been a while. I figured I’d better write something before my iBook goes on the blink again (literally). That’s right my iBook is exhibiting the video blinking symptoms that just scream “Replace my Logic Boardagain. I haven’t even done the 10.4 Tiger thing to this machine ‘cause I just have to many things tricked out in the OS for web development (which reminds me that I’ll have to post my OSX virtual hosts setup here soon). I’ll just have to do another Carbon Copy Clone and get it over with.




![how the webserver fodler structure looks](http://jumpserve.com/blanco/images/webserver-vhosts-osx.jpg "Webserver folder structure") For the sake of consistency I'm going to pick a single OSX GUI text editor for this tutorial. [TextWrangler](http://barebones.com/products/textwrangler/) is free, installs a handy command line tool (edit) and it works well so we'll go with it. (Feel free to use emacs, vi, pico, TextMate, SubEthaEdit or any editor that supports plain text editing.) First we'll refresh the list of binaries (since we may have just installed the TextWrangler Command Line Tool). Fire up the terminal and type: rehash Next, we'll change to the hosts file (/etc) directory and make a backup copy of the hosts file cd /etc/ sudo cp hosts hosts.backup Now, we'll edit the file as a root user in TextWrangler sudo edit hosts Once the hosts file is open in TextWrangler, scroll down to the end and add two lines # lookupd -flushcache 127.0.0.1 dev.cooldomain.com The first line is merely a coment that will remind us to flush the lookupd cache whenever we edit the hosts file. The second line tells the machine to send all requests for dev.cooldomain.com to this machine and not out to the 'net. Save the file after you've added these lines and switch back to the terminal and type: lookupd -flushcache Now, we're gonna edit the httpd.conf file. First change to the httpd.conf directory and make a backup copy of the httpd.conf file cd /etc/httpd/ sudo cp httpd.conf httpd.conf.backup Now, we'll edit the file as a root user in TextWrangler sudo edit httpd.conf Once the file is open in TextWrangler, do a find (cmd-f) for NameVirtualHost and be sure the following line is not commented out (with a `#` in front of it) if it is remove the `#`: NameVirtualHost *:80 Next set up your vhost configuration at the bottom of the document. You can copy and paste the following code remembering to change `yourusername` with your actual username and `cooldomain` with the name of the folder you created in the webserver folder earlier. ServerAdmin youradminaddress@email.com ServerName dev.cooldomain.com DocumentRoot /Users/yourusername/webserver/cooldomain/public_html ErrorLog /Users/yourusername/webserver/cooldomain/logs/dev.cooldomain.com-error_log.log CustomLog /Users/yourusername/webserver/cooldomain/logs/dev.cooldomain.com-access_log.log common Options Indexes ExecCGI FollowSymLinks MultiViews AddHandler cgi-script .cgi AllowOverride all Order allow,deny Allow from all Once you're done modifying the httpd.conf file, save it return to the terminal to check your changes. running apachectl configtest will tell you if there are any errors in your httpd.conf file. If you've got errors, go back to the httpd.conf file and check everything you changed or added. If you get Syntax OK You're ready to restart apache. Restarting apache can be done from the command line via `sudo apachectl restart` or `sudo apachectl graceful` or via the sharing preferences pane (clicking stop and then start will effectively restart apache). That's it. Just put your site inside the _public\_html_ you created earlier, fire up a web browser and type in the domain name (dev.cooldomain.com in this example). Apache should serve it up with no hassles at all. This is just one approach to vhosting under OS X that happens to work for me. Here are references to two others: [Enabling Virtual Hosts on MacOS X (evolt.org)](http://www.evolt.org/MacOSX_vhosts/) [Virtual Hosting on Mac OS X (patrickgibson.com)](http://www.patrickgibson.com/news/andsuch/000091.php) [post_title] => My Approach to Apache Virtual Hosts in OS X [post_category] => 0 [post_excerpt] => [post_lat] => [post_lon] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => apache-vhosts-osx [to_ping] => [pinged] => [post_modified] => 2005-12-29 00:59:55 [post_modified_gmt] => 2005-12-29 05:59:55 [post_content_filtered] => [post_parent] => 0 [guid] => http://jumpserve.com/blanco/?p=620 [menu_order] => 0 [post_type] => post [post_mime_type] => [comment_count] => 3 [ancestors] => Array ( ) ) [3] => stdClass Object ( [ID] => 619 [post_author] => 2 [post_date] => 2005-05-24 23:34:06 [post_date_gmt] => 2005-05-25 04:34:06 [post_content] => So I'm using an 'extra' powerbook while the iBook gets a new logic board this week. What's a web developer to do with a new (temporary use) machine? Get Apache, PHP & MySQL running of course. Rather than muck around with the OS and .conf files I figured I'd try out some of the complete web server packages that have come out in the last nine months. First up was [MAMP](http://www.mamp.info/), I liked the idea, a simple drag-and-drop install, no mucking around in /usr, /var/ or /etc and the option of using PHP4 or PHP5 was a bonus. Changing the MySQL password turned out to be easy, but killed the web based admin tools built into it. No prob, I can work around that. But then, the showstopper, no mod rewrite! So I went and downloaded another package, [WebServerX Kit](http://wserverxkit.sourceforge.net/) this is a complete Apache2/PHP5/MySQL/phpMyadmin install. It places its files in /usr/local and comes with a pref pane to start and stop the servers. Wouldn't ya know it, same deal no mod rewrite. So what did I end up doing? I grabbed the [MySQL package from Server Logistics](http://serverlogistics.com/mysql.php) (which btw comes with a nice pref pane) and used Apple's built-in Apache/php (you need to edit the httpd.conf file to get php working) which comes with mod rewrite pre-installed and all is well again in web dev land. Yes, I will soon post details of how I set up virtual hosting on OS X. [post_title] => Temporary computing enviornment [post_category] => 0 [post_excerpt] => [post_lat] => [post_lon] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => temporary-computing-enviornment [to_ping] => [pinged] => [post_modified] => 2005-05-24 23:34:16 [post_modified_gmt] => 2005-05-25 04:34:16 [post_content_filtered] => [post_parent] => 0 [guid] => http://jumpserve.com/blanco/?p=619 [menu_order] => 0 [post_type] => post [post_mime_type] => [comment_count] => 0 [ancestors] => Array ( ) ) [4] => stdClass Object ( [ID] => 618 [post_author] => 2 [post_date] => 2005-05-23 14:09:19 [post_date_gmt] => 2005-05-23 19:09:19 [post_content] => Well, that didn't take long. No less than 2 hours after the [previous iBook post](http://jumpserve.com/blanco/archives/2005/05/22/ibook_logic_board_2/) the iBook finally said no more. Right now I'm in the process of backing it up while it's in FireWire Hard Disk mode, then it's off to to Apple Store. Hopefully afterward I can remote access into it and de-authorize iTunes and the Studio MX suite. [post_title] => iBook Dead Again [post_category] => 0 [post_excerpt] => [post_lat] => [post_lon] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => ibook-dead-again [to_ping] => [pinged] => http://jumpserve.com/blanco/archives/2005/05/22/ibook_logic_board_2/ [post_modified] => 2005-05-23 14:09:30 [post_modified_gmt] => 2005-05-23 19:09:30 [post_content_filtered] => [post_parent] => 0 [guid] => http://jumpserve.com/blanco/?p=618 [menu_order] => 0 [post_type] => post [post_mime_type] => [comment_count] => 0 [ancestors] => Array ( ) ) [5] => stdClass Object ( [ID] => 617 [post_author] => 2 [post_date] => 2005-05-22 13:21:13 [post_date_gmt] => 2005-05-22 18:21:13 [post_content] => I should mention that in March I broke down and purchased an [iPod Photo](http://www.apple.com/ipodphoto/) (30GB). I've been very pleased with it so far. I believe that the newer generation iPods (including the Shuffle) _seem to sound better_ than the earlier ones. I think hear less distortion in the low end. I'm still using the 512MB shuffle for nights out when I don't want to carry the full size 'Pod with me and while snowboarding. I do like having my Photos with me, one feature that helps is that I can sync Music to the iPod from one Mac (my G4 Desktop) and Photos to the iPod from another (an iBook). iTunes 4.8 even allows to to turn off warnings that you would normally get when plugging your iPod into another machine. I'll definitely pick up the [iPod Camera Connector](http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore?productLearnMore=M9861G/A) before my next vacation. [post_title] => iPod Photo [post_category] => 0 [post_excerpt] => [post_lat] => [post_lon] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => ipod-photo [to_ping] => [pinged] => [post_modified] => 2005-05-22 13:24:56 [post_modified_gmt] => 2005-05-22 18:24:56 [post_content_filtered] => [post_parent] => 0 [guid] => http://jumpserve.com/blanco/?p=617 [menu_order] => 0 [post_type] => post [post_mime_type] => [comment_count] => 0 [ancestors] => Array ( ) ) [6] => stdClass Object ( [ID] => 616 [post_author] => 2 [post_date] => 2005-05-22 13:12:14 [post_date_gmt] => 2005-05-22 18:12:14 [post_content] => Yes, it's been a while. I figured I'd better write _something_ before my iBook goes on the blink again (literally). That's right my iBook is exhibiting the video blinking symptoms that just scream "[Replace my Logic Board](http://apple.com/support/ibook/faq/)" _again_. I haven't even done the [10.4 Tiger](http://apple.com/macosx/) thing to this machine 'cause I just have to many things tricked out in the OS for web development (which reminds me that I'll have to post my OSX virtual hosts setup here soon). I'll just have to do another Carbon Copy Clone and get it over with. [post_title] => iBook Logic Board problems again [post_category] => 0 [post_excerpt] => [post_lat] => [post_lon] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => ibook_logic_board_2 [to_ping] => [pinged] => [post_modified] => 2005-05-22 13:12:21 [post_modified_gmt] => 2005-05-22 18:12:21 [post_content_filtered] => [post_parent] => 0 [guid] => http://jumpserve.com/blanco/?p=616 [menu_order] => 0 [post_type] => post [post_mime_type] => [comment_count] => 7 [ancestors] => Array ( ) ) ) )

SERVER

Array
(
    [REDIRECT_STATUS] => 200
    [HTTP_HOST] => jumpserve.com
    [HTTP_USER_AGENT] => CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
    [HTTP_ACCEPT] => Accept: application/xhtml+xml,text/html;q=0.9,text/plain;
    [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
    [HTTP_ACCEPT_ENCODING] => gzip
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [HTTP_CONNECTION] => close
    [HTTP_CACHE_CONTROL] => no-cache
    [HTTP_PRAGMA] => no-cache
    [PATH] => /bin:/usr/bin:/sbin:/usr/sbin
    [SERVER_SIGNATURE] => 
    [SERVER_SOFTWARE] => Apache
    [SERVER_NAME] => jumpserve.com
    [SERVER_ADDR] => 207.7.108.21
    [SERVER_PORT] => 80
    [REMOTE_ADDR] => 38.103.63.61
    [DOCUMENT_ROOT] => /users/home/blanco/domains/jumpserve.com/public_html
    [SERVER_ADMIN] => web@one.textdrive.com
    [SCRIPT_FILENAME] => /users/home/blanco/domains/jumpserve.com/public_html/blanco/index.php
    [REMOTE_PORT] => 58611
    [REDIRECT_URL] => /blanco/page/3/
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => GET
    [QUERY_STRING] => 
    [REQUEST_URI] => /blanco/page/3/
    [SCRIPT_NAME] => /blanco/index.php
    [PHP_SELF] => /blanco/index.php
    [REQUEST_TIME] => 1231455547
)

REQUEST

Array
(
)
-->