Alex Hardy


Hello there!

Archive for ‘Downloads’

A quick guide to installing a local PHP MySQL development server on Mac OS X

Friday, December 21st, 2007

Mac users are sensitive little souls. Artistic types. We love our beautifully designed computers and software, but poking around in the guts of our operating system doesn’t come quite as naturally to us as to our PC using friends.

Sometimes though that can be a very worthwhile exercise, such as installing a dev server. Perhaps you have a laptop, and need to be able to work or present when you don’t have internet access (eg: while travelling). Here’s how…

Good news, everyone!

The Apache web server and PHP are already installed as part of Mac OS X and only need to be turned on. The MySQL database server will have to be downloaded and installed, but we’ll cross that bridge when we come to it…

This is an easier job than it used to be and doesn’t have to involve typing code into the Terminal. Marc Liyanage does a fantastic job of creating PHP installer packages if you want to keep your installation bang up to date, but for most purposes the instructions below should be sufficient.

Note: I have used Mac OS X 10.5 Leopard and MySQL 5.0.45 (the latest at the time of writing) on a MacBook Pro. I used TextMate to edit text.

Part 1 – Apache and PHP

  1. Go to Apache folder

    Start by editing the Apache config file to enable PHP. This file is hidden by default, but you can access it from the Finder’s “Go” menu. Enter /etc/apache2 and confirm to make the folder appear.

  2. Edit Apache config file

    Open httpd.conf in a text editor. Find the line that says:

    #LoadModule php5_module libexec/apache2/libphp5.so

    Uncomment it by removing the hash. Save the file (you will be asked to enter your admin password).

  3. System Preferences – Sharing

    Open System Preferences and go into “Sharing” (under “Internet & Network”).

    Turn on ”Web Sharing”. You now have an active Apache server with PHP. Test this by typing localhost into your browser. You should see the default Apache page.

  4. Turn on Web Sharing

    If you feel curious, create a PHP file with the phpinfo() function call in it to see the details of your installation.

    Place your own files in /Library/WebServer/Documents

Part 2 – MySQL

  1. MySQL Community Server

    First things first: Head on over to MySQL.com and download MySQL Community Server and the GUI Tools.

    As their names indicate, the former is the database software itself while the latter is a collection of graphical tools to make the task of administering MySQL easy for those of us that find the Terminal a bit too scary.

  2. MySQL GUI Tools

    I use an Intel Mac, so I got the Mac OS X 10.4 (x86) builds. Take care to download the most appropriate build for your computer and OS version.

    I recommend that you always use the latest GUI tools for the latest features and stability improvements.

  3. Mount the MySQL disk image and run the main package first, then install the startup item, finally the prefpane. I needed to restart before MySQL would turn on.

  4. MySQL prefpane

    Open System Preferences and go into “MySQL” (under “Other”). Tick the box to automatically start MySQL on startup.

    You can install the GUI Tools by dragging them from their disk image to your Applications folder. Nearly there now!

  5. It is crucial that you now set a password for the MySQL “root” account. Open MySQL Administrator and log into localhost with root (no password). Under “Accounts” you can assign a password to root, as well as create other database users.

    Avoid using the root account in your applications – use it only for administration.

    That’s it! You can start creating databases and coding the PHP applications that will run on them.

Recommended Reading

PHP and MySQL for Dynamic Web Sites

If PHP and MySQL are new to you, I recommend PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide by Larry Ullman. In common with other books in the series, this book gives you a solid grounding in the subject, with plain English examples.

If you are already familiar with HTML and maybe a scripting language or two, you should hit the ground running!

If this guide was useful to you or you would like me to elaborate further, please feel free to comment. I’m thinking about writing a series of how-tos in this manner and your feedback would be appreciated.

simpleContact 1.2 is available

Monday, December 10th, 2007

If you arrived here via a certain update link you’ll already know what this post is about! I’ve released simpleContact 1.2. This is a maintenance release, which doesn’t bring radical changes but improves compatibility and existing features.

New additions

  • User options page to edit your email address and password
  • Paging in the inbox (the control appears when you have over fifty messages)
  • Email addresses in the mailing list and recipients pages are now mailto links
  • You can remove someone from the mailing list inside the message view
  • “Remember me” checkbox at login (uses a cookie)

Tweaks and fixes

  • The function that cleans submitted data now strips out HTML markup
  • Dates and times are now formatted in a more clear and international manner
  • Fixed for certain server configurations where include paths could break
  • The email sending script correctly formats line breaks and quotemarks
  • Update check tries again with cURL if fopen is disabled
  • password.php updates the sc_admins table when a password is reset
  • Formatting of received messages is improved
  • The “simpleContact” name now links to the inbox or the login page
  • General copy and layout improvements

This will be the last version before the release of simpleContact Pro, which I will start work on in the new year. The applications will exist side by side, with an upgrade path for those that want the advanced features of the Pro version (e.g. custom fields). I also have many ideas up my sleeve for the free version…

But all that’s for another day! Today, head on over to my downloads page and grab version 1.2. I hope you find it useful!

Downloads RSS feed

Friday, December 7th, 2007

I’ve made a new RSS feed to support the ongoing changes in my website. Instead of a dedicated feed for each project, I’ll have one Downloads feed, um, to rule them all.

I’ll remove the simpleContact blog category and feed in the new year. If you are already subscribed to the simpleContact feed, please subscribe to the new feed.

On my recent quiet spell

Friday, November 2nd, 2007

I think it’s fair to say that I’ve not posted much this last month. This is mainly because I’ve been very busy. Busy at work, with a significant update to Symphony and with projects for d3creative and MC2. Yessir, I’ve had rather a lot on.

I’ve managed to clear the decks of freelance work, so I’m able to focus on personal projects. I’ve fought down the urge to buy one of these (for now). My immediate task is to back up all my stuff because I’m going to give my trusty iMac G5 a fresh start on Mac OS X Leopard. After that I’ll start work on simpleContact 1.2.

Version 1.2 will include admin account editing and inbox paging in addition to a raft of compatibility and interface improvements.

I will endeavour to get back to regular posts from here on. I think a report on the status of the Refresh project is long overdue.

My website is one year old!

Tuesday, October 16th, 2007

First birthday

I thought I’d take a moment to observe the first birthday of my website. A year ago today I went live with a basic WordPress install. So far the site has undergone:

On blogging…

It’s still very early days for me on this score. I’ve been slowly narrowing my focus and finding my style. I think the quality of my writing has come a long way this last year, but still leaves a great deal to be desired. I want this blog to have worth (rather than just an account of my activities), so I am thinking about fleshing out some previous posts into articles and tutorials. I am open to suggestions in this matter.

On design…

I don’t feel an urgent need to change the basic design of the website, since this look-and-feel is only eight months old anyway. It has held up under additions without any signs of creaking, so I think it will be good for another year.

When I come to redesign the site I’ll be paying close attention to my statistics. I’ve gained some interesting insights into how this site is used (ie: what is popular and what is not) and these factors will be taken into account. One result is likely to be a blog that is more visual, with less categorisation.

On projects…

I have lots of ideas going forward. I plan to release simpleContact 1.2 in November, and version 1.3 is pencilled in for February. I’ve made no secret of my intention to release a commercial product next year, which will exist alongside the free version and offer more sophisticated functionality (custom fields, for starters).

I’ll start work on simpleContact 2.0 “Pro” in the new year. Watch this space…

This period of focusing solely on a free version is proving immensely valuable, because it allows me to gauge people’s opinions. I can get a feel for what people need, how much active support I will have to perform and respond to bug reports or compatibility issues (which I’m pleased to say have been very few).

As always, I am open for feedback and support. I have a roadmap in place for the application, but will give requests due consideration. Contact me with yours…

Back to work!

Neat freak? Me?

Thursday, August 30th, 2007

It’s been brought to my attention that some invisible files from Mac OS X had stowed away in the simpleContact ZIP file. These files (called .DS_Store) hold Mac folder information such as the position of icons. Since they mean nothing to the Windows file system, they were visible in the folder as files of an unrecognised type.

The bottom line: simpleContact’s functionality is tested rigorously before a new version is released. These files were merely unnecessary and completely harmless. They have now been removed from the download.

simpleContact 1.1 is available

Monday, August 13th, 2007

I promised an update for “early August”, so here it is with a day or two to spare :)

simpleContact 1.1 is available now to download. It adds the following features:

  • Improvements to email validation
  • Now uses PHPMailer. You can give a from-name and reply-to address
  • Inbound messages now appear as being from the user’s name and email
  • Mailing list un-subscribe form
  • Group actions in inbox: “delete message” and “remove from mailing list”
  • Web address field for contact form
  • You can turn off the * required indicator, in case you want to require every field
  • Logout screen with feedback options
  • Update check (nothing is logged, it simply reads an XML file)

Several of these additions are the result of user feedback, so thank you to everyone who got in touch. If there are other features that you’d like to see in a future version, please feel free to contact me.

Holiday time!

Tuesday, July 3rd, 2007

I’m going on holiday tomorrow! First stop: Chicago, for a wedding and a week of mooching around the Windy City. Then it’s down to Baton Rouge for a long overdue visit with my friends Brent and Lisa. There’ll be a weekend stay in New Orleans (that hopefully I’ll retain enough brain cells undestroyed by alchohol) to remember…

I’ve explained firmly to my girlfriend Steph that I don’t care how desperate she is to see the Transformers movie on opening night, we’re going to see the Independence Day celebrations *nods*.

Expect my Flickr page to be stuffed full of photos from the trip…

My posts have been infrequent lately, mainly because of social commitments. Normal service on this website will resume from Monday July 23rd, with version 1.1 of simpleContact following in early August.

I’d like to thank all the early adopters who have downloaded it so far. Your feedback and encouragement has been most gratifying. Some of you will find your requests answered very soon :)

Time to pack my suitcase!

Order a branded installation of simpleContact for your website

Sunday, June 10th, 2007

Get a branded installation of simpleContact for only £30

I designed simpleContact to be easy to install, but there are still times when you just want something done for you.

Maybe you’re a business owner and you don’t want to get hands-on with maintaining your website. You may not have the knowledge or the tools. Most importantly, perhaps you just don’t have the time.

That is why I’m offering a service: branded installations of simpleContact done for you. For just £30 ($60) not only is the technical work taken care of, but you can have a special version that reflects your own identity.

Branded

Supply me with your logo, colours etc and I’ll deliver a tailored version that sits neatly alongside your website. No need to settle for a mere formmail script, get a branded inbox that you can access from anywhere.

Installed For You

I’ll create a database and install the current version of simpleContact. You must have PHP and MySQL on your website as part of your hosting package. If you are unsure whether you have this facility, contact me with the name of your host and service package and I can investigate for you.

Satisfaction Or Your Money Back

If for any reason simpleContact cannot be installed on your website, I will refund your money in full.

To order this service, just use my donation button to send me £30. I will respond within one working day and you can be receiving messages from potential customers very soon. If you have any questions that you’d like answered prior to ordering, feel free to contact me.

Rate simpleContact

Monday, June 4th, 2007

If you have downloaded simpleContact, please take a moment to give your opinion:

Rate simpleContact at the PHP Resource Index.

Please vote objectively and only once. Your response will not just help to promote it, but give me the user insight I need to improve it with future versions.